Browse Source

Merge branch '235-provide-build-all-cmake-options'

* 235-provide-build-all-cmake-options:
  #235: Use the cache values for plugin, library, and app options
Sascha Zelzer 12 years ago
parent
commit
30fa4a68c5
1 changed files with 7 additions and 3 deletions
  1. 7 3
      SuperBuild.cmake

+ 7 - 3
SuperBuild.cmake

@@ -84,9 +84,6 @@ set(ctk_cmake_boolean_args
   CTEST_USE_LAUNCHERS
   CTK_WRAP_PYTHONQT_FULL
   CTK_ENABLE_Python_Wrapping
-  ${ctk_libs_bool_vars}
-  ${ctk_plugins_bool_vars}
-  ${ctk_applications_bool_vars}
   ${ctk_lib_options_list}
   )
 
@@ -95,6 +92,13 @@ foreach(ctk_cmake_arg ${ctk_cmake_boolean_args})
   list(APPEND ctk_superbuild_boolean_args -D${ctk_cmake_arg}:BOOL=${${ctk_cmake_arg}})
 endforeach()
 
+foreach(ctk_cmake_arg ${ctk_libs_bool_vars} ${ctk_plugins_bool_vars} ${ctk_applications_bool_vars})
+  # Use the cached value of the option in case the current value has been
+  # overridden by a "CTK_BUILD_ALL" option.
+  get_property(arg_value CACHE ${ctk_cmake_arg} PROPERTY VALUE)
+  list(APPEND ctk_superbuild_boolean_args -D${ctk_cmake_arg}:BOOL=${arg_value})
+endforeach()
+
 # message("CMake boolean args:")
 # foreach(arg ${ctk_superbuild_boolean_args})
 #   message("  ${arg}")