diff --git a/CMakeLists.txt b/CMakeLists.txt index 16dda92348caf45faa2d8855d8b6cf3ed48ed990..b7287fa978964c837fbdae946c768143d58c3da5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ ##################### # Specify minimum CMake version -cmake_minimum_required(VERSION 3.2) +cmake_minimum_required(VERSION 3.3) # Set CMake policies cmake_policy(SET CMP0011 NEW) @@ -110,6 +110,26 @@ foreach(process ${ProcessesList}) option(OGS_BUILD_PROCESS_${process} "Build the ${process} process." ON) endforeach() +set(OGS_BUILD_PROCESSES "" CACHE STRING "Semicolon-separated list of processes to build") +if(NOT "${OGS_BUILD_PROCESSES}" STREQUAL "") + foreach(process ${OGS_BUILD_PROCESSES}) + if(NOT "${process}" IN_LIST ProcessesList) + message(FATAL_ERROR "${process} given in OGS_BUILD_PROCESSES is " + "not a valid process name! Valid names are ${ProcessesList}") + endif() + endforeach() + message(STATUS "Enabled processes:") + foreach(process ${ProcessesList}) + if("${process}" IN_LIST OGS_BUILD_PROCESSES) + set(OGS_BUILD_PROCESS_${process} ON CACHE BOOL "" FORCE) + message(STATUS " ${process}") + else() + set(OGS_BUILD_PROCESS_${process} OFF CACHE BOOL "" FORCE) + endif() + endforeach() + +endif() + if(WIN32) option(OGS_BUILD_SWMM "Should the SWMM interface be built?" OFF) endif() diff --git a/web/content/docs/devguide/advanced/configuration-options.pandoc b/web/content/docs/devguide/advanced/configuration-options.pandoc index 8a69340a906af087182e682e69247b070f385c60..98db954253f82fdc7a756b2e162f3d06a0f6a3af 100644 --- a/web/content/docs/devguide/advanced/configuration-options.pandoc +++ b/web/content/docs/devguide/advanced/configuration-options.pandoc @@ -22,8 +22,9 @@ CMake switches to enable / disable parts of OGS. - `OGS_BUILD_TESTS` - Builds the test executables. *Defaults* to *ON*. - `OGS_BUILD_UTILS` - Builds several utilities. - `OGS_NO_EXTERNAL_LIBS` - Disables all external optional dependencies. -- `OGS_BUILD_PROCESS_X=OFF` - For disabling compilation of process `X`. +- `OGS_BUILD_PROCESS_X` - For enabling/disabling compilation of process `X`. Run the CMake-Gui to see a list of processes. +- `OGS_BUILD_PROCESSES` - A `;`-separated list specifying processes to build. *Defaults* to an *empty string*. This will alter the `OGS_BUILD_PROCESS_X`-options. For e.g. building just the two processes `HT` and `LIE`: `-DOGS_BUILD_PROCESSES="HT;LIE"`. Setting this variable back to an empty string **does not reset** the `OGS_BUILD_PROCESS_X`-options. #### Debugging