浏览代码

COMP: SuperBuild.cmake - Change macro ctk_set_superbuild_boolean_arg into a function

Jean-Christophe Fillion-Robin 15 年之前
父节点
当前提交
3c2eae0862
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 6 6
      SuperBuild.cmake

+ 6 - 6
SuperBuild.cmake

@@ -150,14 +150,14 @@ FOREACH(app ${CTK_APPLICATIONS_SUBDIRS})
 ENDFOREACH()
 
 #-----------------------------------------------------------------------------
-# Convenient macro allowing to define superbuild arg
+# Convenient function allowing to define superbuild arg
 #
-MACRO(ctk_set_superbuild_boolean_arg ctk_cmake_var)
-  SET(superbuild_${ctk_cmake_var} ON)
-  IF(DEFINED ${ctk_cmake_var} AND NOT ${ctk_cmake_var})
-    SET(superbuild_${ctk_cmake_var} OFF)
+FUNCTION(ctk_set_superbuild_boolean_arg ctk_cmake_var)
+  SET(superbuild_${ctk_cmake_var} OFF)
+  IF(DEFINED ${ctk_cmake_var})
+    SET(superbuild_${ctk_cmake_var} ${${ctk_cmake_var}} PARENT_SCOPE)
   ENDIF()
-ENDMACRO()
+ENDFUNCTION()
 
 #-----------------------------------------------------------------------------
 # Set superbuild boolean args