Commit e7307fca authored by Jan Möbius's avatar Jan Möbius

Comiso finder with config file parser and deps opt_deps system

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@11888 383ad7c9-94d9-4d36-a494-682f7c89f535
parent e4ade3b4
......@@ -12,15 +12,77 @@ IF (COMISO_INCLUDE_DIR)
SET(COMISO_FIND_QUIETLY TRUE)
ENDIF (COMISO_INCLUDE_DIR)
FIND_PATH( COMISO_INCLUDE_DIR CoMISo/Config/CoMISoDefines.hh
# Find CoMISo config file
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)
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 )
find_package(MPI)
if ( NOT MPI_FOUND )
message(ERROR "COMISO configured with mpi but mpi not available")
endif()
list (APPEND COMISO_OPT_DEPS "MPI")
endif()
STRING(REGEX MATCH "\#define COMISO_PETSC_AVAILABLE 1" COMISO_PETSC_BUILD_TIME_AVAILABLE ${CURRENT_COMISO_CONFIG} )
if ( COMISO_PETSC_BUILD_TIME_AVAILABLE )
find_package(PETSC)
if ( NOT PETSC_FOUND )
message(ERROR "COMISO configured with petsc but petsc not available")
endif()
list (APPEND COMISO_OPT_DEPS "PETSC")
endif()
STRING(REGEX MATCH "\#define COMISO_IPOPT_AVAILABLE 1" COMISO_IPOPT_BUILD_TIME_AVAILABLE ${CURRENT_COMISO_CONFIG} )
if ( COMISO_IPOPT_BUILD_TIME_AVAILABLE )
find_package(IPOPT)
if ( NOT IPOPT_FOUND )
message(ERROR "COMISO configured with ipopt but ipopt not available")
endif()
list (APPEND COMISO_OPT_DEPS "IPOPT")
endif()
STRING(REGEX MATCH "\#define COMISO_TAO_AVAILABLE 1" COMISO_TAO_BUILD_TIME_AVAILABLE ${CURRENT_COMISO_CONFIG} )
if ( COMISO_TAO_BUILD_TIME_AVAILABLE )
find_package(TAO)
if ( NOT TAO_FOUND )
message(ERROR "COMISO configured with tao but tao not available")
endif()
list (APPEND COMISO_OPT_DEPS "TAO")
endif()
add_definitions (-DCOMISODLL -DUSECOMISO )
IF (COMISO_INCLUDE_DIR)
SET(COMISO_FOUND TRUE)
SET( COMISO_LIBRARY_DIR "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}" )
SET( COMISO_LIBRARY "CoMISo")
SET( COMISO_DEPS "GMM;BLAS;SUITESPARSE" )
ELSE (COMISO_INCLUDE_DIR)
SET( COMISO_FOUND FALSE )
SET( COMISO_LIBRARY_DIR )
......
......@@ -13,7 +13,8 @@ ENDIF (SVM_INCLUDE_DIRS)
FIND_PATH( SVM_INCLUDE_DIR libsvm/svm.h
PATHS /usr/include/libsvm-2.0
/usr/include/libsvm-3.0 )
/usr/include/libsvm-3.0
/usr/include )
FIND_LIBRARY( SVM_LIBRARY
......
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