浏览代码

ENH: Allow empty endif() and such with CMake 2.4

This allows us to use empty endif() and similar block terminators when
building with CMake 2.4.  It is allowed by default with 2.6 already.
Brad King 16 年之前
父节点
当前提交
7b299306fd
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      CMakeLists.txt

+ 2 - 0
CMakeLists.txt

@@ -6,6 +6,8 @@ ENDIF(COMMAND CMAKE_POLICY)
 
 MARK_AS_ADVANCED(CMAKE_BACKWARDS_COMPATIBILITY)
 
+# Allow empty endif() and such with CMake 2.4.
+SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS 1)
 
 
 #-----------------------------------------------------------------------