Commit 75338fad authored by David Bommes's avatar David Bommes

CoMISo Finder update

git-svn-id: http://www.openflipper.org/svnrepo/CoMISo/trunk@66 1355f012-dd97-4b2f-ae87-10fa9f823a57
parent 22522835
......@@ -16,82 +16,85 @@ ENDIF (COMISO_INCLUDE_DIR)
FIND_PATH( COMISO_INCLUDE_DIR CoMISo/Config/config.hh
PATHS "${CMAKE_SOURCE_DIR}/../" "${CMAKE_SOURCE_DIR}/libs/" )
FILE(READ ${COMISO_INCLUDE_DIR}/CoMISo/Config/config.hh CURRENT_COMISO_CONFIG)
if ( COMISO_INCLUDE_DIR )
set(COMISO_OPT_DEPS "")
FILE(READ ${COMISO_INCLUDE_DIR}/CoMISo/Config/config.hh CURRENT_COMISO_CONFIG)
set(COMISO_OPT_DEPS "")
STRING(REGEX MATCH "\#define COMISO_MPI_AVAILABLE 1" COMISO_MPI_BUILD_TIME_AVAILABLE ${CURRENT_COMISO_CONFIG} )
if ( COMISO_MPI_BUILD_TIME_AVAILABLE )
STRING(REGEX MATCH "\#define COMISO_MPI_AVAILABLE 1" COMISO_MPI_BUILD_TIME_AVAILABLE ${CURRENT_COMISO_CONFIG} )
find_package(MPI)
if ( COMISO_MPI_BUILD_TIME_AVAILABLE )
if ( NOT MPI_FOUND )
message(ERROR "COMISO configured with mpi but mpi not available")
endif()
find_package(MPI)
list (APPEND COMISO_OPT_DEPS "MPI")
if ( NOT MPI_FOUND )
message(ERROR "COMISO configured with mpi but mpi not available")
endif()
endif()
list (APPEND COMISO_OPT_DEPS "MPI")
STRING(REGEX MATCH "\#define COMISO_PETSC_AVAILABLE 1" COMISO_PETSC_BUILD_TIME_AVAILABLE ${CURRENT_COMISO_CONFIG} )
endif()
if ( COMISO_PETSC_BUILD_TIME_AVAILABLE )
STRING(REGEX MATCH "\#define COMISO_PETSC_AVAILABLE 1" COMISO_PETSC_BUILD_TIME_AVAILABLE ${CURRENT_COMISO_CONFIG} )
find_package(PETSC)
if ( COMISO_PETSC_BUILD_TIME_AVAILABLE )
if ( NOT PETSC_FOUND )
message(ERROR "COMISO configured with petsc but petsc not available")
endif()
find_package(PETSC)
list (APPEND COMISO_OPT_DEPS "PETSC")
if ( NOT PETSC_FOUND )
message(ERROR "COMISO configured with petsc but petsc not available")
endif()
endif()
list (APPEND COMISO_OPT_DEPS "PETSC")
STRING(REGEX MATCH "\#define COMISO_IPOPT_AVAILABLE 1" COMISO_IPOPT_BUILD_TIME_AVAILABLE ${CURRENT_COMISO_CONFIG} )
endif()
if ( COMISO_IPOPT_BUILD_TIME_AVAILABLE )
STRING(REGEX MATCH "\#define COMISO_IPOPT_AVAILABLE 1" COMISO_IPOPT_BUILD_TIME_AVAILABLE ${CURRENT_COMISO_CONFIG} )
find_package(IPOPT)
if ( COMISO_IPOPT_BUILD_TIME_AVAILABLE )
if ( NOT IPOPT_FOUND )
message(ERROR "COMISO configured with ipopt but ipopt not available")
endif()
find_package(IPOPT)
list (APPEND COMISO_OPT_DEPS "IPOPT")
if ( NOT IPOPT_FOUND )
message(ERROR "COMISO configured with ipopt but ipopt not available")
endif()
endif()
list (APPEND COMISO_OPT_DEPS "IPOPT")
STRING(REGEX MATCH "\#define COMISO_MUMPS_AVAILABLE 1" COMISO_MUMPS_BUILD_TIME_AVAILABLE ${CURRENT_COMISO_CONFIG} )
endif()
if ( COMISO_MUMPS_BUILD_TIME_AVAILABLE )
STRING(REGEX MATCH "\#define COMISO_MUMPS_AVAILABLE 1" COMISO_MUMPS_BUILD_TIME_AVAILABLE ${CURRENT_COMISO_CONFIG} )
find_package(MUMPS)
if ( COMISO_MUMPS_BUILD_TIME_AVAILABLE )
if ( NOT MUMPS_FOUND )
message(ERROR "COMISO configured with mumps but mumps not available")
endif()
find_package(MUMPS)
list (APPEND COMISO_OPT_DEPS "MUMPS")
if ( NOT MUMPS_FOUND )
message(ERROR "COMISO configured with mumps but mumps not available")
endif()
endif()
list (APPEND COMISO_OPT_DEPS "MUMPS")
endif()
STRING(REGEX MATCH "\#define COMISO_TAO_AVAILABLE 1" COMISO_TAO_BUILD_TIME_AVAILABLE ${CURRENT_COMISO_CONFIG} )
STRING(REGEX MATCH "\#define COMISO_TAO_AVAILABLE 1" COMISO_TAO_BUILD_TIME_AVAILABLE ${CURRENT_COMISO_CONFIG} )
if ( COMISO_TAO_BUILD_TIME_AVAILABLE )
if ( COMISO_TAO_BUILD_TIME_AVAILABLE )
find_package(TAO)
find_package(TAO)
if ( NOT TAO_FOUND )
message(ERROR "COMISO configured with tao but tao not available")
endif()
if ( NOT TAO_FOUND )
message(ERROR "COMISO configured with tao but tao not available")
endif()
list (APPEND COMISO_OPT_DEPS "TAO")
endif()
list (APPEND COMISO_OPT_DEPS "TAO")
endif()
add_definitions (-DCOMISODLL -DUSECOMISO )
add_definitions (-DCOMISODLL -DUSECOMISO )
endif(COMISO_INCLUDE_DIR)
IF (COMISO_INCLUDE_DIR)
SET(COMISO_FOUND TRUE)
......
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