Переглянути джерело

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

* 235-provide-build-all-cmake-options:
  Added special "build all" CMake options.
Sascha Zelzer 13 роки тому
батько
коміт
e6008b7200
3 змінених файлів з 33 додано та 0 видалено
  1. 9 0
      CMake/ctkMacroOptionUtils.cmake
  2. 20 0
      CMakeLists.txt
  3. 4 0
      SuperBuild.cmake

+ 9 - 0
CMake/ctkMacroOptionUtils.cmake

@@ -37,14 +37,23 @@ endmacro()
 
 macro(ctk_lib_option name doc default)
   ctk_option(CTK_LIB ${name} ${doc} ${default} ${ARGN})
+  if(CTK_BUILD_ALL_LIBRARIES)
+    set(CTK_LIB_${name} 1)
+  endif()
 endmacro()
 
 macro(ctk_plugin_option name doc default)
   ctk_option(CTK_PLUGIN ${name} ${doc} ${default} ${ARGN})
+  if(CTK_BUILD_ALL_PLUGINS)
+    set(CTK_PLUGIN_${name} 1)
+  endif()
 endmacro()
 
 macro(ctk_app_option name doc default)
   ctk_option(CTK_APP ${name} ${doc} ${default} ${ARGN})
+  if(CTK_BUILD_ALL_APPS)
+    set(CTK_APP_${name} 1)
+  endif()
 endmacro()
 
 macro(ctk_enable_option_raw name doc default)

+ 20 - 0
CMakeLists.txt

@@ -371,6 +371,26 @@ ctk_enable_option(PluginFramework "Enable Plugin Framework" OFF
                   CTK_LIB_PluginFramework)
 
 #-----------------------------------------------------------------------------
+# Special "BUILD ALL" options
+
+# Build all CTK plug-ins
+option(CTK_BUILD_ALL_PLUGINS "Build all CTK plug-ins" OFF)
+
+# Build all CTK libraries
+option(CTK_BUILD_ALL_LIBRARIES "Build all CTK libraries" OFF)
+
+# Build all CTK applications
+option(CTK_BUILD_ALL_APPS "Build all CTK applications" OFF)
+
+# Build everything
+option(CTK_BUILD_ALL "Build everything in CTK" OFF)
+if(CTK_BUILD_ALL)
+  set(CTK_BUILD_ALL_PLUGINS 1)
+  set(CTK_BUILD_ALL_LIBRARIES 1)
+  set(CTK_BUILD_ALL_APPS 1)
+endif()
+
+#-----------------------------------------------------------------------------
 # Other options
 
 # The CTK Python Wrapping

+ 4 - 0
SuperBuild.cmake

@@ -72,6 +72,10 @@ endforeach()
 
 set(ctk_cmake_boolean_args
   BUILD_TESTING
+  CTK_BUILD_ALL
+  CTK_BUILD_ALL_APPS
+  CTK_BUILD_ALL_LIBRARIES
+  CTK_BUILD_ALL_PLUGINS
   CTK_BUILD_QTDESIGNER_PLUGINS
   CTK_USE_QTTESTING
   CTK_USE_KWSTYLE