Commit d85955e4 authored by Matthias Möller's avatar Matthias Möller

- add Lapack dependencies to GMM

- fix Lapack dependencies for Tacus and suitsparse

git-svn-id: http://www.openflipper.org/svnrepo/CoMISo/trunk@281 1355f012-dd97-4b2f-ae87-10fa9f823a57
parent d3984b77
...@@ -52,6 +52,7 @@ include (ACGOutput) ...@@ -52,6 +52,7 @@ include (ACGOutput)
set(COMISO_INCLUDE_DIRECTORIES "") set(COMISO_INCLUDE_DIRECTORIES "")
set(COMISO_LINK_DIRECTORIES "") set(COMISO_LINK_DIRECTORIES "")
set(COMISO_LINK_LIBRARIES "") set(COMISO_LINK_LIBRARIES "")
set(NEED_LAPACK "")
FIND_PACKAGE( Boost 1.42.0 COMPONENTS system filesystem regex QUIET) FIND_PACKAGE( Boost 1.42.0 COMPONENTS system filesystem regex QUIET)
if(Boost_FOUND) if(Boost_FOUND)
...@@ -69,6 +70,8 @@ find_package (GMM) ...@@ -69,6 +70,8 @@ find_package (GMM)
if (GMM_FOUND) if (GMM_FOUND)
set (COMISO_GMM_CONFIG_FILE_SETTINGS "#define COMISO_GMM_AVAILABLE 1" ) set (COMISO_GMM_CONFIG_FILE_SETTINGS "#define COMISO_GMM_AVAILABLE 1" )
list( APPEND COMISO_INCLUDE_DIRECTORIES ${GMM_INCLUDE_DIR} ) list( APPEND COMISO_INCLUDE_DIRECTORIES ${GMM_INCLUDE_DIR} )
list (APPEND NEED_LAPACK "GMM")
set (LAPACK_REQUIRED ON)
else() else()
set (COMISO_GMM_CONFIG_FILE_SETTINGS "#define COMISO_GMM_AVAILABLE 0" ) set (COMISO_GMM_CONFIG_FILE_SETTINGS "#define COMISO_GMM_AVAILABLE 0" )
message (FATAL_ERROR "GMM not found!") message (FATAL_ERROR "GMM not found!")
...@@ -112,7 +115,7 @@ endif () ...@@ -112,7 +115,7 @@ endif ()
find_package (SUITESPARSE) find_package (SUITESPARSE)
if (SUITESPARSE_FOUND ) if (SUITESPARSE_FOUND )
FIND_PACKAGE(LAPACK) list (APPEND NEED_LAPACK "SUITESPARSE")
set (COMISO_SUITESPARSE_CONFIG_FILE_SETTINGS "#define COMISO_SUITESPARSE_AVAILABLE 1" ) set (COMISO_SUITESPARSE_CONFIG_FILE_SETTINGS "#define COMISO_SUITESPARSE_AVAILABLE 1" )
...@@ -272,12 +275,11 @@ endif () ...@@ -272,12 +275,11 @@ endif ()
find_package (Taucs) find_package (Taucs)
if (TAUCS_FOUND ) if (TAUCS_FOUND )
list (APPEND NEED_LAPACK "Tacus")
set (COMISO_TAUCS_CONFIG_FILE_SETTINGS "#define COMISO_TAUCS_AVAILABLE 1" ) set (COMISO_TAUCS_CONFIG_FILE_SETTINGS "#define COMISO_TAUCS_AVAILABLE 1" )
list( APPEND COMISO_INCLUDE_DIRECTORIES ${TAUCS_INCLUDE_DIR} ) list( APPEND COMISO_INCLUDE_DIRECTORIES ${TAUCS_INCLUDE_DIR} )
list( APPEND COMISO_INCLUDE_DIRECTORIES ${LAPACK_INCLUDE_DIR} )
list( APPEND COMISO_LINK_DIRECTORIES ${LAPACK_LIBRARY_DIR} )
list( APPEND COMISO_LINK_LIBRARIES ${TAUCS_LIBRARY} ) list( APPEND COMISO_LINK_LIBRARIES ${TAUCS_LIBRARY} )
list( APPEND COMISO_LINK_LIBRARIES ${LAPACK_LIBRARIES} )
else () else ()
message (STATUS "TAUCS not found!") message (STATUS "TAUCS not found!")
set (COMISO_TAUCS_CONFIG_FILE_SETTINGS "#define COMISO_TAUCS_AVAILABLE 0" ) set (COMISO_TAUCS_CONFIG_FILE_SETTINGS "#define COMISO_TAUCS_AVAILABLE 0" )
...@@ -318,6 +320,21 @@ else () ...@@ -318,6 +320,21 @@ else ()
set (COMISO_CPLEX_CONFIG_FILE_SETTINGS "#define COMISO_CPLEX_AVAILABLE 0" ) set (COMISO_CPLEX_CONFIG_FILE_SETTINGS "#define COMISO_CPLEX_AVAILABLE 0" )
endif () endif ()
if (NEED_LAPACK)
FIND_PACKAGE(LAPACK)
if (LAPACK_FOUND)
list( APPEND COMISO_INCLUDE_DIRECTORIES ${LAPACK_INCLUDE_DIR} )
list( APPEND COMISO_LINK_DIRECTORIES ${LAPACK_LIBRARY_DIR} )
list( APPEND COMISO_LINK_LIBRARIES ${LAPACK_LIBRARIES} )
else()
if (LAPACK_REQUIRED)
message (FATAL_ERROR "GMM not found!")
else()
message(STATUS "LAPACK not found! Required by ${NEED_LAPACK}")
endif()
endif()
endif(NEED_LAPACK)
include_directories ( include_directories (
.. ..
${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}
......
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