File tree Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Expand file tree Collapse file tree 2 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -56,21 +56,34 @@ function(add_subdirectories_with_options base_dir output_dir prefix)
5656endfunction ()
5757
5858function (enable_all base_dir enable prefix )
59+ cmake_parse_arguments (
60+ EA
61+ "QUIET"
62+ ""
63+ ""
64+ ${ARGN}
65+ )
5966 file (GLOB CHILDREN RELATIVE ${base_dir} ${base_dir} /*)
6067 foreach (child ${CHILDREN} )
6168 if (IS_DIRECTORY ${base_dir} /${child} )
6269 string (TOUPPER ${child} CHILD_UPPER)
6370 set (ENABLE_CHILD_VAR "${prefix} _${CHILD_UPPER} " )
6471
65- if (NOT DEFINED ${ENABLE_CHILD_VAR} )
66- set (${ENABLE_CHILD_VAR} ${enable} CACHE BOOL "Enable ${prefix} ${child} " )
72+ if (EA_QUIET)
73+ # Quiet behavior
74+ if (NOT DEFINED ${ENABLE_CHILD_VAR} )
75+ set (${ENABLE_CHILD_VAR} ${enable} CACHE BOOL "Enable ${prefix} ${child} " )
76+ endif ()
77+ else ()
78+ # Default behavior
79+ set (${ENABLE_CHILD_VAR} ${enable} CACHE BOOL "Enable ${prefix} ${child} " FORCE)
6780 endif ()
6881 endif ()
6982 endforeach ()
7083endfunction ()
7184
7285function (enable_all_packages base_dir enable)
73- enable_all(${base_dir} ${enable} "ENABLE_PACKAGE" )
86+ enable_all(${base_dir} ${enable} "ENABLE_PACKAGE" ${ARGN} )
7487endfunction ()
7588
7689function (add_packages base_dir output_dir)
Original file line number Diff line number Diff line change @@ -35,9 +35,9 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
3535endif ()
3636include (PackageUtils)
3737
38- set (ENABLE_PACKAGE_TEST-PLUGINS OFF )
39- set (ENABLE_PACKAGE_EXTPROC OFF )
40- if (DISABLE_ALL_PACKAGES)
38+ set (ENABLE_PACKAGE_TEST-PLUGINS OFF CACHE BOOL "Enable test plugins package" FORCE )
39+ set (ENABLE_PACKAGE_EXTPROC OFF CACHE BOOL "Enable extproc package" FORCE )
40+ if (DISABLE_ALL_PACKAGES MATCHES ON )
4141 enable_all_packages(${CMAKE_CURRENT_SOURCE_DIR} OFF )
4242 message (STATUS "DISABLE_ALL_PACKAGES is set." )
4343elseif (ENABLE_ALL_PACKAGES MATCHES ON )
You can’t perform that action at this time.
0 commit comments