Commit 46f74612 authored by Jan Möbius's avatar Jan Möbius
Browse files

Fixed Comiso finder when comiso is not available

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@12232 383ad7c9-94d9-4d36-a494-682f7c89f535
parent c3db9f18
......@@ -16,67 +16,71 @@ ENDIF (COMISO_INCLUDE_DIR)
FIND_PATH( COMISO_INCLUDE_DIR CoMISo/Config/config.hh
PATHS "${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_TAO_AVAILABLE 1" COMISO_TAO_BUILD_TIME_AVAILABLE ${CURRENT_COMISO_CONFIG} )
endif()
if ( COMISO_TAO_BUILD_TIME_AVAILABLE )
STRING(REGEX MATCH "\#define COMISO_TAO_AVAILABLE 1" COMISO_TAO_BUILD_TIME_AVAILABLE ${CURRENT_COMISO_CONFIG} )
find_package(TAO)
if ( COMISO_TAO_BUILD_TIME_AVAILABLE )
if ( NOT TAO_FOUND )
message(ERROR "COMISO configured with tao but tao not available")
endif()
find_package(TAO)
list (APPEND COMISO_OPT_DEPS "TAO")
endif()
if ( NOT TAO_FOUND )
message(ERROR "COMISO configured with tao but tao not available")
endif()
add_definitions (-DCOMISODLL -DUSECOMISO )
list (APPEND COMISO_OPT_DEPS "TAO")
endif()
add_definitions (-DCOMISODLL -DUSECOMISO )
endif(COMISO_INCLUDE_DIR)
IF (COMISO_INCLUDE_DIR)
SET(COMISO_FOUND TRUE)
......
Supports Markdown
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