Commit bf0c0f85 authored by Max Lyon's avatar Max Lyon

add option to disable MPI, PETSc and TAO

parent d89e52fe
Pipeline #7176 passed with stages
in 6 minutes and 47 seconds
......@@ -131,35 +131,50 @@ else()
set (COMISO_SUITESPARSE_SPQR_CONFIG_FILE_SETTINGS "#define COMISO_SUITESPARSE_SPQR_AVAILABLE 0" )
endif()
find_package (MPI)
if (MPI_FOUND )
set (COMISO_MPI_CONFIG_FILE_SETTINGS "#define COMISO_MPI_AVAILABLE 1" )
list( APPEND COMISO_INCLUDE_DIRECTORIES ${MPI_INCLUDE_PATH} )
list( APPEND COMISO_LINK_LIBRARIES ${MPI_CXX_LIBRARIES} )
if(NOT DISABLE_MPI)
find_package (MPI)
if (MPI_FOUND )
set (COMISO_MPI_CONFIG_FILE_SETTINGS "#define COMISO_MPI_AVAILABLE 1" )
list( APPEND COMISO_INCLUDE_DIRECTORIES ${MPI_INCLUDE_PATH} )
list( APPEND COMISO_LINK_LIBRARIES ${MPI_CXX_LIBRARIES} )
else ()
message (STATUS "MPI not found!")
set (COMISO_MPI_CONFIG_FILE_SETTINGS "#define COMISO_MPI_AVAILABLE 0" )
endif ()
else ()
message (STATUS "MPI not found!")
message (STATUS "MPI disabled!")
set (COMISO_MPI_CONFIG_FILE_SETTINGS "#define COMISO_MPI_AVAILABLE 0" )
endif ()
find_package (PETSC)
if (PETSC_FOUND AND MPI_FOUND)
set (COMISO_PETSC_CONFIG_FILE_SETTINGS "#define COMISO_PETSC_AVAILABLE 1" )
list( APPEND COMISO_INCLUDE_DIRECTORIES ${PETSC_INCLUDE_DIRS} )
list( APPEND COMISO_LINK_LIBRARIES ${PETSC_LIBRARY} )
if(NOT DISABLE_PETSC)
find_package (PETSC)
if (PETSC_FOUND AND MPI_FOUND)
set (COMISO_PETSC_CONFIG_FILE_SETTINGS "#define COMISO_PETSC_AVAILABLE 1" )
list( APPEND COMISO_INCLUDE_DIRECTORIES ${PETSC_INCLUDE_DIRS} )
list( APPEND COMISO_LINK_LIBRARIES ${PETSC_LIBRARY} )
else ()
message (STATUS "PETSC or MPI not found!")
set (COMISO_PETSC_CONFIG_FILE_SETTINGS "#define COMISO_PETSC_AVAILABLE 0" )
endif ()
else ()
message (STATUS "PETSC or MPI not found!")
message (STATUS "PETSC disabled!")
set (COMISO_PETSC_CONFIG_FILE_SETTINGS "#define COMISO_PETSC_AVAILABLE 0" )
endif ()
endif()
find_package (TAO)
if (TAO_FOUND AND PETSC_FOUND AND MPI_FOUND)
set (COMISO_TAO_CONFIG_FILE_SETTINGS "#define COMISO_TAO_AVAILABLE 1" )
list( APPEND COMISO_INCLUDE_DIRECTORIES ${TAO_INCLUDE_DIRS} )
list( APPEND COMISO_LINK_DIRECTORIES ${TAO_LIBRARY_DIR} )
list( APPEND COMISO_LINK_LIBRARIES ${TAO_LIBRARY} )
if(NOT DISABLE_TAO)
find_package (TAO)
if (TAO_FOUND AND PETSC_FOUND AND MPI_FOUND)
set (COMISO_TAO_CONFIG_FILE_SETTINGS "#define COMISO_TAO_AVAILABLE 1" )
list( APPEND COMISO_INCLUDE_DIRECTORIES ${TAO_INCLUDE_DIRS} )
list( APPEND COMISO_LINK_DIRECTORIES ${TAO_LIBRARY_DIR} )
list( APPEND COMISO_LINK_LIBRARIES ${TAO_LIBRARY} )
else ()
message (STATUS "TAO or PETSC or MPI not found!")
set (COMISO_TAO_CONFIG_FILE_SETTINGS "#define COMISO_TAO_AVAILABLE 0" )
endif ()
else ()
message (STATUS "TAO or PETSC or MPI not found!")
message (STATUS "TAO disabled!")
set (COMISO_TAO_CONFIG_FILE_SETTINGS "#define COMISO_TAO_AVAILABLE 0" )
endif ()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment