Skip to content

Commit

Permalink
Merge pull request #3148 from gtrensch/fix-issue2993-with-mpi-option
Browse files Browse the repository at this point in the history
Make -Dwith-mpi respect provided path and ensure "default off" options are turned on only by explicit ON
  • Loading branch information
terhorstd committed Mar 25, 2024
2 parents 22a7bf3 + c280bdc commit 3ddf5eb
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions cmake/ProcessOptions.cmake
Expand Up @@ -420,7 +420,11 @@ endfunction()
function( NEST_PROCESS_WITH_MPI )
# Find MPI
set( HAVE_MPI OFF PARENT_SCOPE )
if ( with-mpi )
if ( NOT "${with-mpi}" STREQUAL "OFF" )
if ( NOT ${with-mpi} STREQUAL "ON" )
# if set, use this prefix
set( MPI_ROOT "${with-mpi}" )
endif ()
find_package( MPI REQUIRED )
if ( MPI_CXX_FOUND )
set( HAVE_MPI ON PARENT_SCOPE )
Expand Down Expand Up @@ -649,7 +653,7 @@ function( NEST_PROCESS_WITH_MPI4PY )
endfunction ()

function( NEST_PROCESS_USERDOC )
if ( with-userdoc )
if ( ${with-userdoc} STREQUAL "ON")
message( STATUS "Configuring user documentation" )
find_package( Sphinx REQUIRED)
find_package( Pandoc REQUIRED)
Expand All @@ -660,7 +664,7 @@ function( NEST_PROCESS_USERDOC )
endfunction ()

function( NEST_PROCESS_DEVDOC )
if ( with-devdoc )
if ( ${with-devdoc} STREQUAL "ON" )
message( STATUS "Configuring developer documentation" )
find_package( Doxygen REQUIRED dot )
set( BUILD_DOXYGEN_DOCS ON PARENT_SCOPE )
Expand All @@ -669,7 +673,7 @@ function( NEST_PROCESS_DEVDOC )
endfunction ()

function( NEST_PROCESS_FULL_LOGGING )
if ( with-full-logging )
if ( ${with-full-logging} STREQUAL "ON" )
message( STATUS "Configuring full logging" )
set( ENABLE_FULL_LOGGING ON PARENT_SCOPE )
endif ()
Expand Down

0 comments on commit 3ddf5eb

Please sign in to comment.