Commit 323100cd authored by David Bommes's avatar David Bommes
Browse files

improved cplex finder

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@14412 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 60cba617
......@@ -7,66 +7,42 @@
if (CPLEX_INCLUDE_DIR)
# in cache already
set(CPLEX_FOUND TRUE)
set(CPLEX_INCLUDE_DIRS "${CPLEX_INCLUDE_DIR};${CPLEX_CONCERT_INCLUDE_DIR}" )
set(CPLEX_LIBRARIES "${CPLEX_LIBRARY};${CPLEX_ILO_LIBRARY};${CPLEX_CONCERT_LIBRARY}" )
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()
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"
)
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"
)
set(CPLEX_INCLUDE_DIRS "${CPLEX_INCLUDE_DIR};${CPLEX_CONCERT_INCLUDE_DIR}" )
set(CPLEX_LIBRARIES "${CPLEX_LIBRARY};${CPLEX_ILO_LIBRARY};${CPLEX_CONCERT_LIBRARY}" )
# use c++ headers as default
set(CPLEX_COMPILER_FLAGS "-DIL_STD" CACHE STRING "Cplex Compiler Flags")
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBCPLEX_FOUND to TRUE
# if all listed variables are 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