1 #-----------------------------------------------------------------------------
2 # If --BUILD_ALL is set to ON then all options
3 # for which the macro SWITCH_ON_IF_BUILD_ALL have been used are set to ON
4 # The -- prepended to the options ensure that it will appear as the
5 # first option when running ccmake/CMakeSetup
6 #IF (BBTK_CORE_PACKAGE)
7 OPTION(--BUILD_ALL "Build all ?" OFF)
8 #OPTION(--SET_BUILD_ALL_OFF "Build all ?" OFF)
9 #MARK_AS_ADVANCED(--SET_BUILD_ALL_OFF)
11 MACRO(SWITCH_ON_IF_BUILD_ALL VAR)
12 #OPTION(--${VAR}_SET_BUILD_ALL_OFF "Build all ?" OFF)
13 #MARK_AS_ADVANCED(--${VAR}_SET_BUILD_ALL_OFF)
15 # IF (--${VAR}_SET_BUILD_ALL_OFF)
16 # MESSAGE(ERROR "${VAR} -> Build All OFF")
17 # SET(--BUILD_ALL OFF CACHE BOOL "Build all ?" FORCE)
18 # SET(--${VAR}_SET_BUILD_ALL_OFF OFF CACHE BOOL "" FORCE)
19 # ELSE (--${VAR}_SET_BUILD_ALL_OFF)
20 SET(${VAR} ON CACHE BOOL "Forced to ON by --BUILD_ALL" FORCE)
21 # SET(--${VAR}_SET_BUILD_ALL_OFF ON CACHE BOOL "" FORCE)
22 # MESSAGE(ERROR "Build All -> ${VAR}")
23 # ENDIF (--${VAR}_SET_BUILD_ALL_OFF)
25 ENDMACRO(SWITCH_ON_IF_BUILD_ALL)
26 #ELSE (BBTK_CORE_PACKAGE)
27 # MACRO(SWITCH_ON_IF_BUILD_ALL VAR)
28 # ENDMACRO(SWITCH_ON_IF_BUILD_ALL)
29 #ENDIF (BBTK_CORE_PACKAGE)
30 #-----------------------------------------------------------------------------