Permalink
Browse files

[CMake] Added option OGS_BUILD_PROCESSES.

;-separated list of processes to build, e.g.:

cmake . -DOGS_BUILD_PROCESSES="HT;LIE"
  • Loading branch information...
bilke committed Oct 4, 2018
1 parent 04631b2 commit 7ff2243c678916ed9cef21d1c60ad0cbaa5dfa37
Showing with 17 additions and 2 deletions.
  1. +15 −1 CMakeLists.txt
  2. +2 −1 web/content/docs/devguide/advanced/configuration-options.pandoc
@@ -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,20 @@ 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 "")
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()
@@ -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

0 comments on commit 7ff2243

Please sign in to comment.