File tree Expand file tree Collapse file tree 2 files changed +17
-22
lines changed Expand file tree Collapse file tree 2 files changed +17
-22
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ function(add_subdirectories_with_options base_dir output_dir prefix)
2424 file (GLOB CHILDREN RELATIVE ${base_dir} ${base_dir} /*)
2525
2626 foreach (child ${CHILDREN} )
27+ message ("" )
2728 if (IS_DIRECTORY ${base_dir} /${child} )
2829 string (TOUPPER ${child} CHILD_UPPER)
2930 set (ENABLE_CHILD_VAR "${prefix} _${CHILD_UPPER} " )
@@ -50,40 +51,27 @@ function(add_subdirectories_with_options base_dir output_dir prefix)
5051 endif ()
5152 else ()
5253 message (STATUS "Skipping: ${child} " )
54+ message (STATUS "To enable this package use -D${ENABLE_CHILD_VAR} =ON" )
5355 endif ()
5456 endif ()
5557 endforeach ()
5658endfunction ()
5759
5860function (enable_all base_dir enable prefix )
59- cmake_parse_arguments (
60- EA
61- "QUIET"
62- ""
63- ""
64- ${ARGN}
65- )
6661 file (GLOB CHILDREN RELATIVE ${base_dir} ${base_dir} /*)
6762 foreach (child ${CHILDREN} )
6863 if (IS_DIRECTORY ${base_dir} /${child} )
6964 string (TOUPPER ${child} CHILD_UPPER)
7065 set (ENABLE_CHILD_VAR "${prefix} _${CHILD_UPPER} " )
71-
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
66+ if (NOT DEFINED ${ENABLE_CHILD_VAR} )
7967 set (${ENABLE_CHILD_VAR} ${enable} CACHE BOOL "Enable ${prefix} ${child} " FORCE)
8068 endif ()
8169 endif ()
8270 endforeach ()
8371endfunction ()
8472
8573function (enable_all_packages base_dir enable)
86- enable_all(${base_dir} ${enable} "ENABLE_PACKAGE" ${ARGN} )
74+ enable_all(${base_dir} ${enable} "ENABLE_PACKAGE" )
8775endfunction ()
8876
8977function (add_packages base_dir output_dir)
Original file line number Diff line number Diff line change @@ -35,13 +35,20 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
3535endif ()
3636include (PackageUtils)
3737
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)
4038if (DISABLE_ALL_PACKAGES MATCHES ON )
41- enable_all_packages(${CMAKE_CURRENT_SOURCE_DIR} OFF )
42- message (STATUS "DISABLE_ALL_PACKAGES is set." )
39+ enable_all_packages(${CMAKE_CURRENT_SOURCE_DIR} OFF )
40+ message (STATUS "DISABLE_ALL_PACKAGES is set." )
4341elseif (ENABLE_ALL_PACKAGES MATCHES ON )
44- enable_all_packages(${CMAKE_CURRENT_SOURCE_DIR} ON )
45- message (STATUS "ENABLE_ALL_PACKAGES is set." )
42+ enable_all_packages(${CMAKE_CURRENT_SOURCE_DIR} ON )
43+ message (STATUS "ENABLE_ALL_PACKAGES is set." )
44+ endif ()
45+
46+ # Default disabled packages
47+ if (NOT DEFINED ENABLE_PACKAGE_TEST-PLUGINS)
48+ set (ENABLE_PACKAGE_TEST-PLUGINS ON CACHE BOOL "Enable test plugins package" FORCE)
49+ endif ()
50+
51+ if (NOT DEFINED ENABLE_PACKAGE_EXTPROC)
52+ set (ENABLE_PACKAGE_EXTPROC ON CACHE BOOL "Enable extproc package" FORCE)
4653endif ()
4754add_packages(${CMAKE_CURRENT_SOURCE_DIR} ${SCOPY_PACKAGE_BUILD_PATH} )
You can’t perform that action at this time.
0 commit comments