Commit 0e6cf0db authored by David Bommes's avatar David Bommes
Browse files

added Finder vor CPLEX and Metis

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@14405 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 5f243faa
# - Try to find CPLEX
# Once done this will define
# CPLEX_FOUND - System has Cplex
# CPLEX_INCLUDE_DIRS - The Cplex include directories
# CPLEX_LIBRARIES - The libraries needed to use Cplex
if (CPLEX_INCLUDE_DIR)
# in cache already
set(CPLEX_FOUND TRUE)
else (CPLEX_INCLUDE_DIR)
if (WIN32)
#TODO #######################################################################
find_path(CPLEX_INCLUDE_DIR NAMES SRC/gurobi_c++.h
PATHS
"C:\\libs\\gurobi45"
${GUROBI_INCLUDE_PATH}
)
find_library( GUROBI_LIBRARY_RELEASE
SuperLU
PATHS "C:\\libs\\gurobi45\\lib" )
find_library( GUROBI_LIBRARY_DEBUG
SuperLUd
PATHS "C:\\libs\\gurobi45\\lib" )
set ( GUROBI_LIBRARY "optimized;${GUROBI_LIBRARY_RELEASE};debug;${GUROBI_LIBRARY_DEBUG}" CACHE STRING "GUROBI Libraries" )
ELSEIF(APPLE)
#TODO #######################################################################
find_path(GUROBI_INCLUDE_DIR NAMES gurobi_c++.h
PATHS "${CMAKE_SOURCE_DIR}/MacOS/Libs/gurobi40"
${GUROBI_INCLUDE_PATH}
)
find_library( GUROBI_LIBRARY
SuperLU
PATHS "${CMAKE_SOURCE_DIR}/MacOS/Libs/gurobi40")
ELSE( WIN32 )
find_path(CPLEX_INCLUDE_DIR NAMES ilcplex/cplex.h
PATHS "$ENV{CPLEX_DIR}/cplex/include"
)
find_path(CPLEX_CONCERT_INCLUDE_DIR NAMES ilconcert/ilomodel.h
PATHS "$ENV{CPLEX_DIR}/concert/include"
)
# MESSAGE(STATUS "CPLEX include dir: ${CPLEX_INCLUDE_DIR}")
# MESSAGE(STATUS "CPLEX concert include dir: ${CPLEX_CONCERT_INCLUDE_DIR}")
find_library( CPLEX_LIBRARY
cplex
PATHS "$ENV{CPLEX_DIR}/cplex/lib/x86-64_sles10_4.1/static_pic" )
find_library( CPLEX_ILO_LIBRARY
ilocplex
PATHS "$ENV{CPLEX_DIR}/cplex/lib/x86-64_sles10_4.1/static_pic" )
find_library( CPLEX_CONCERT_LIBRARY
concert
PATHS "$ENV{CPLEX_DIR}/concert/lib/x86-64_sles10_4.1/static_pic" )
ENDIF()
set(CPLEX_INCLUDE_DIRS "${CPLEX_INCLUDE_DIR};${CPLEX_CONCERT_INCLUDE_DIR}" )
set(CPLEX_LIBRARIES "${CPLEX_LIBRARY};${CPLEX_ILO_LIBRARY};${CPLEX_CONCERT_LIBRARY}" )
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBCPLEX_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(CPLEX DEFAULT_MSG
CPLEX_LIBRARY CPLEX_INCLUDE_DIR)
mark_as_advanced(CPLEX_INCLUDE_DIR CPLEX_LIBRARY )
endif(CPLEX_INCLUDE_DIR)
\ No newline at end of file
# - Try to find METIS
# Once done this will define
# METIS_FOUND - System has Metis
# METIS_INCLUDE_DIRS - The Metis include directories
# METIS_LIBRARY_DIRS - The library directories needed to use Metis
# METIS_LIBRARIES - The libraries needed to use Metis
if (METIS_INCLUDE_DIR)
# in cache already
SET(METIS_FIND_QUIETLY TRUE)
endif (METIS_INCLUDE_DIR)
find_path(METIS_INCLUDE_DIR NAMES metis.h
PATHS "$ENV{IPOPT_HOME}/ThirdParty/Metis/metis-4.0/Lib/"
"/usr/include/"
"/usr/include/metis"
)
find_library( METIS_LIBRARY
metis coinmetis
PATHS "$ENV{IPOPT_HOME}/lib/"
"/usr/lib" )
set(METIS_INCLUDE_DIRS "${METIS_INCLUDE_DIR}" )
set(METIS_LIBRARIES "${METIS_LIBRARY}" )
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBCPLEX_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(METIS DEFAULT_MSG
METIS_LIBRARY METIS_INCLUDE_DIR)
mark_as_advanced(METIS_INCLUDE_DIR METIS_LIBRARY )
\ 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