Skip to content
Snippets Groups Projects
Verified Commit 9d372e89 authored by Lars Bilke's avatar Lars Bilke
Browse files

[cmake] Use cmake_dependent_option().

parent dfc87894
No related branches found
No related tags found
No related merge requests found
......@@ -43,12 +43,9 @@ option(OGS_USE_PYTHON "Interface with Python" ON)
option(OGS_USE_POETRY
"Enables automatic Python virtual environment handling with poetry." ON
)
if(WIN32)
option(OGS_BUILD_SWMM "Should the SWMM interface be built?" ON)
endif()
if(NOT WIN32 AND OGS_BUILD_SWMM)
message(FATAL_ERROR "OGS_BUILD_SWMM requires Windows!")
endif()
cmake_dependent_option(
OGS_BUILD_SWMM "Should the SWMM interface be built?" ON "WIN32" OFF
)
if(OGS_USE_PETSC)
set(OGS_USE_MPI ON CACHE BOOL "Use MPI" FORCE)
......
......@@ -37,6 +37,7 @@ include(GNUInstallDirs)
include(ProcessorCount)
ProcessorCount(NUM_PROCESSORS)
set(NUM_PROCESSORS ${NUM_PROCESSORS} CACHE STRING "Processor count")
include(CMakeDependentOption)
# Check if this project is included in another
if(NOT PROJECT_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment