Commit 9e9957b2 authored by David Bommes's avatar David Bommes

added / adjusted finder for new CoMISo

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@11865 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 4e786cd3
# - Try to find ARPACK
# Once done this will define
#
# ARPACK_FOUND - system has ARPACK
# ARPACK_INCLUDE_DIR - the ARPACK include directories
# ARPACK_LIBRARY - Link this to use ARPACK
find_path (ARPACK_INCLUDE_DIR NAMES arpack++/argeig.h
HINTS ENV ARPACK_INCLUDE_DIR
PATHS /usr/include/arpack++ "C:\\libs\\arpack++\\include"
DOC "ARPACK Include Directory")
IF ( WIN32 )
find_library( ARPACK_LIBRARY arpack.lib
PATHS "C:\\libs\\arpack++\\lib"
)
ELSE( WIN32 )
find_library( ARPACK_LIBRARY arpack arpack++
PATHS /usr/lib
)
ENDIF( WIN32 )
IF (ARPACK_INCLUDE_DIR AND ARPACK_LIBRARY)
SET(ARPACK_FOUND TRUE)
ELSE ()
SET(ARPACK_FOUND FALSE)
ENDIF ()
if (IPOPT_INCLUDE_DIR)
# in cache already
SET(IPOPT_FIND_QUIETLY TRUE)
endif (IPOPT_INCLUDE_DIR)
if (WIN32)
find_path(IPOPT_INCLUDE_DIR NAMES tao.h
PREFIXES SRC
PATHS
"C:\\libs\\gurobi45"
${IPOPT_DIR}/include
)
find_library( IPOPT_LIBRARY_RELEASE
SuperLU
PATHS "C:\\libs\\gurobi45\\lib" )
find_library( IPOPT_LIBRARY_DEBUG
SuperLUd
PATHS "C:\\libs\\gurobi45\\lib" )
set ( IPOPT_LIBRARY "optimized;${IPOPT_LIBRARY_RELEASE};debug;${IPOPT_LIBRARY_DEBUG}" CACHE STRING "IPOPT Libraries" )
ELSEIF(APPLE)
find_path(IPOPT_INCLUDE_DIR NAMES gurobi_c++.h
PATHS "${CMAKE_SOURCE_DIR}/MacOS/Libs/gurobi40"
${IPOPT_INCLUDE_PATH}
)
find_library( IPOPT_LIBRARY
SuperLU
PATHS "${CMAKE_SOURCE_DIR}/MacOS/Libs/gurobi40")
ELSE( WIN32 )
find_path(IPOPT_INCLUDE_DIR NAMES IpNLP.hpp
PATHS "/usr/include/coin"
${IPOPT_INCLUDE_PATH}
)
# MESSAGE(STATUS "$ENV{IPOPT_HOME}/include")
IF(IPOPT_INCLUDE_DIR)
SET(IPOPT_FOUND TRUE)
SET(IPOPT_INCLUDE_DIR ${IPOPT_INCLUDE_DIR})
# SET(IPOPT_LIBRARY_DIR "$ENV{IPOPT_DIR}/lib/$ENV{IPOPT_ARCH}/" CACHE PATH "Path to IPOPT Library")
# SET(IPOPT_LIBRARY "tao;taopetsc;taofortran" CACHE STRING "IPOPT Libraries")
# MESSAGE(STATUS "${IPOPT_LIBRARY_DIR}")
# MESSAGE(STATUS "${IPOPT_LIBRARY}")
ELSE(IPOPT_INCLUDE_DIR)
SET(IPOPT_FOUND FALSE)
SET(IPOPT_INCLUDE_DIR ${IPOPT_INCLUDE_DIR})
ENDIF(IPOPT_INCLUDE_DIR)
find_library( IPOPT_LIBRARY
ipopt
PATHS "/usr/lib" )
# set optional path to HSL Solver
find_path(IPOPT_HSL_LIBRARY_DIR NAMES libhsl.so
PATHS "$ENV{HOME}/opt/HSL/lib"
)
set(IPOPT_LIBRARY_DIR ${IPOPT_HSL_LIBRARY_DIR})
ENDIF()
This diff is collapsed.
# - Try to find SUITESPARSE
# Once done this will define
#
# SUITESPARSE_FOUND - system has SUITESPARSE
# SUITESPARSE_INCLUDE_DIRS - the SUITESPARSE include directory
# SUITESPARSE_LIBRARIES - Link these to use SUITESPARSE
# SUITESPARSE_LIBRARY_DIR - Library directory containing suitesparse libs
# SUITESPARSE_FOUND - system has SUITESPARSE
# SUITESPARSE_INCLUDE_DIRS - the SUITESPARSE include directory
# SUITESPARSE_LIBRARIES - Link these to use SUITESPARSE
# SUITESPARSE_SPQR_LIBRARY - name of spqr library (necessary due to error in debian package)
# SUITESPARSE_SPQR_LIBRARY_DIR - name of spqr library (necessary due to error in debian package)
# SUITESPARSE_LIBRARY_DIR - Library main directory containing suitesparse libs
# SUITESPARSE_LIBRARY_DIRS - all Library directories containing suitesparse libs
#
IF (SUITESPARSE_INCLUDE_DIRS)
......@@ -25,21 +28,21 @@ if( WIN32 )
# find path suitesparse library
FIND_PATH( SUITESPARSE_LIBRARY_DIRS
FIND_PATH( SUITESPARSE_LIBRARY_DIR
amd.lib
PATHS "C:\\libs\\win32\\SuiteSparse\\libs" )
# if we found the library, add it to the defined libraries
IF ( SUITESPARSE_LIBRARY_DIRS )
IF ( SUITESPARSE_LIBRARY_DIR )
list ( APPEND SUITESPARSE_LIBRARIES optimized;amd;optimized;camd;optimized;ccolamd;optimized;cholmod;optimized;colamd;optimized;metis;optimized;spqr;optimized;umfpack;debug;amdd;debug;camdd;debug;ccolamdd;debug;cholmodd;debug;spqrd;debug;umfpackd;debug;colamdd;debug;metisd;optimized;blas;optimized;libf2c;optimized;lapack;debug;blasd;debug;libf2cd;debug;lapackd )
ENDIF( SUITESPARSE_LIBRARY_DIRS )
ENDIF( SUITESPARSE_LIBRARY_DIR )
else( WIN32 )
IF( APPLE)
FIND_PATH( CHOLMOD_INCLUDE_DIR cholmod.h
PATHS /opt/local/include/ufsparse )
FIND_PATH( SUITESPARSE_LIBRARY_DIR
FIND_PATH( SUITESPARSE_LIBRARY_DIRS
NAMES libcholmod.a
PATHS /opt/local/lib )
......@@ -66,14 +69,23 @@ else( WIN32 )
# if we found the library, add it to the defined libraries
IF ( SUITESPARSE_LIBRARY_DIR )
list ( APPEND SUITESPARSE_LIBRARY_DIRS ${SUITESPARSE_LIBRARY_DIR} )
FIND_LIBRARY( CHOLMOD_LIBRARY
NAMES cholmod CHOLMOD
PATHS ${SUITESPARSE_LIBRARY_DIR} )
FIND_LIBRARY( UMFPACK_LIBRARY
NAMES umfpack UMFPACK
PATHS ${SUITESPARSE_LIBRARY_DIR} )
FIND_LIBRARY( SUITESPARSE_SPQR_LIBRARY
NAMES spqr SPQR
HINTS $ENV{HOME}/opt/SPQR/lib
PATHS ${SUITESPARSE_LIBRARY_DIR} )
FIND_PATH( SUITESPARSE_SPQR_LIBRARY_DIR
NAMES libspqr.so
PATHS /usr/lib /usr/local/lib $ENV{HOME}/opt/SPQR/lib)
list ( APPEND SUITESPARSE_LIBRARY_DIRS ${SUITESPARSE_SPQR_LIBRARY_DIR} )
list ( APPEND SUITESPARSE_LIBRARY_DIRS ${SUITESPARSE_LIBRARY_DIR} )
IF(APPLE)
list ( APPEND SUITESPARSE_LIBRARIES ${SUITESPARSE_LIBRARY_DIR}/libamd.a
${SUITESPARSE_LIBRARY_DIR}/libbtf.a
......@@ -90,7 +102,7 @@ else( WIN32 )
ENDIF(APPLE)
list ( APPEND SUITESPARSE_LIBRARIES ${CHOLMOD_LIBRARY} ${UMFPACK_LIBRARY} )
list ( APPEND SUITESPARSE_LIBRARIES ${CHOLMOD_LIBRARY} ${UMFPACK_LIBRARY} ${SUITESPARSE_SPQR_LIBRARY})
ENDIF( SUITESPARSE_LIBRARY_DIR )
endif( WIN32 )
......
if (TAO_INCLUDE_DIRS)
# Already in cache, be silent
SET(TAO_FIND_QUIETLY TRUE)
endif (TAO_INCLUDE_DIRS)
if (WIN32)
find_path(TAO_INCLUDE_DIR NAMES tao.h
PREFIXES SRC
PATHS
"C:\\libs\\gurobi45"
${TAO_DIR}/include
)
find_library( TAO_LIBRARY_RELEASE
SuperLU
PATHS "C:\\libs\\gurobi45\\lib" )
find_library( TAO_LIBRARY_DEBUG
SuperLUd
PATHS "C:\\libs\\gurobi45\\lib" )
set ( TAO_LIBRARY "optimized;${TAO_LIBRARY_RELEASE};debug;${TAO_LIBRARY_DEBUG}" CACHE STRING "TAO Libraries" )
ELSEIF(APPLE)
find_path(TAO_INCLUDE_DIR NAMES gurobi_c++.h
PATHS "${CMAKE_SOURCE_DIR}/MacOS/Libs/gurobi40"
${TAO_INCLUDE_PATH}
)
find_library( TAO_LIBRARY
SuperLU
PATHS "${CMAKE_SOURCE_DIR}/MacOS/Libs/gurobi40")
ELSE( WIN32 )
find_path(TAO_INCLUDE_DIR NAMES "include/tao.h"
PATHS "$ENV{TAO_DIR}"
/usr/include/tao
)
# MESSAGE(STATUS "$ENV{TAO_HOME}/include")
IF(TAO_INCLUDE_DIR)
SET(TAO_FOUND TRUE)
SET(TAO_INCLUDE_DIRS "${TAO_INCLUDE_DIR}/include;${TAO_INCLUDE_DIR}")
SET(TAO_INCLUDE_DIR ${TAO_INCLUDE_DIR}/include;${TAO_INCLUDE_DIR} CACHE PATH "Path to TAO Includes")
SET(TAO_LIBRARY_DIR "$ENV{TAO_DIR}/lib/$ENV{PETSC_ARCH}/" CACHE PATH "Path to TAO Library")
SET(TAO_LIBRARY "tao;taopetsc;taofortran" CACHE STRING "TAO Libraries")
# MESSAGE(STATUS "${TAO_LIBRARY_DIR}")
# MESSAGE(STATUS "${TAO_LIBRARY}")
ELSE(TAO_INCLUDE_DIR)
SET(TAO_FOUND FALSE)
SET(TAO_INCLUDE_DIR ${TAO_INCLUDE_DIR})
ENDIF(TAO_INCLUDE_DIR)
#find_library( TAO_LIBRARY
# gurobi
# PATHS "${TAO_HOME}/lib" )
ENDIF()
\ No newline at end of file
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