diff options
author | Josh Blum | 2011-09-13 20:24:18 -0400 |
---|---|---|
committer | Josh Blum | 2011-09-13 20:24:18 -0400 |
commit | 6926847510ba9d342cacb8126f1cdd1503e5b387 (patch) | |
tree | 8eddb908b33715c2f124461830a6d2ad0d54947b /cmake/Modules | |
parent | 31459c668fc3494fd54b535a2082d9076632de3b (diff) | |
download | gnuradio-6926847510ba9d342cacb8126f1cdd1503e5b387.tar.gz gnuradio-6926847510ba9d342cacb8126f1cdd1503e5b387.tar.bz2 gnuradio-6926847510ba9d342cacb8126f1cdd1503e5b387.zip |
cmake: added ENABLE_DEFAULT to disable components by default
Diffstat (limited to 'cmake/Modules')
-rw-r--r-- | cmake/Modules/GrComponent.cmake | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cmake/Modules/GrComponent.cmake b/cmake/Modules/GrComponent.cmake index 8a94e219a..cbae1c4ff 100644 --- a/cmake/Modules/GrComponent.cmake +++ b/cmake/Modules/GrComponent.cmake @@ -25,6 +25,13 @@ SET(__INCLUDED_GR_COMPONENT_CMAKE TRUE) SET(_gr_enabled_components "" CACHE INTERNAL "" FORCE) SET(_gr_disabled_components "" CACHE INTERNAL "" FORCE) +IF(NOT DEFINED ENABLE_DEFAULT) + SET(ENABLE_DEFAULT ON) + MESSAGE(STATUS "") + MESSAGE(STATUS "The build system will automatically enable all components.") + MESSAGE(STATUS "Use -DENABLE_DEFAULT=OFF to disable components by default.") +ENDIF() + ######################################################################## # Register a component into the system # - name: canonical component name @@ -40,7 +47,7 @@ FUNCTION(GR_REGISTER_COMPONENT name var) ENDFOREACH(dep) #setup the dependent option for this component - CMAKE_DEPENDENT_OPTION(${var} "enable ${name} support" ON "${ARGN}" OFF) + CMAKE_DEPENDENT_OPTION(${var} "enable ${name} support" ${ENABLE_DEFAULT} "${ARGN}" OFF) SET(${var}_ "${${var}}" CACHE INTERNAL "" FORCE) #append the component into one of the lists |