COIN-OR::LEMON - Graph Library

source: lemon-main/cmake/FindILOG.cmake @ 1142:2f479109a71d

Last change on this file since 1142:2f479109a71d was 1126:043a787c3cee, checked in by Alpar Juttner <alpar@…>, 10 years ago

Support for CPLEX 12.6

File size: 3.3 KB
Line 
1FIND_PATH(ILOG_ROOT_DIR
2  NAMES cplex
3  DOC "CPLEX STUDIO root directory"
4  PATHS /opt/ibm/ILOG /usr/local/ibm/ILOG /usr/local/ILOG /usr/local/ilog
5  PATHS "$ENV{HOME}/ILOG" "$ENV{HOME}/.local/ILOG"
6  PATHS "$ENV{HOME}/ibm/ILOG" "$ENV{HOME}/.local/ibm/ILOG"
7  PATHS "C:/Program Files/IBM/ILOG"
8  PATH_SUFFIXES "CPLEX_Studio126" "CPLEX_Studio125"
9  "CPLEX_Studio124" "CPLEX_Studio123" "CPLEX_Studio122"
10  NO_DEFAULT_PATH
11)
12
13IF(WIN32)
14  IF(MSVC_VERSION STREQUAL "1400")
15    SET(ILOG_WIN_COMPILER "windows_vs2005")
16  ELSEIF(MSVC_VERSION STREQUAL "1500")
17    SET(ILOG_WIN_COMPILER "windows_vs2008")
18  ELSEIF(MSVC_VERSION STREQUAL "1600")
19    SET(ILOG_WIN_COMPILER "windows_vs2010")
20  ELSE()
21    SET(ILOG_WIN_COMPILER "windows_vs2008")
22  ENDIF()
23  IF(CMAKE_CL_64)
24    SET(ILOG_WIN_COMPILER "x64_${ILOG_WIN_COMPILER}")
25    SET(ILOG_WIN_PLATFORM "x64_win32")
26  ELSE()
27    SET(ILOG_WIN_COMPILER "x86_${ILOG_WIN_COMPILER}")
28    SET(ILOG_WIN_PLATFORM "x86_win32")
29  ENDIF()
30ENDIF()
31
32FIND_PATH(ILOG_CPLEX_ROOT_DIR
33  NAMES include/ilcplex
34  HINTS ${ILOG_ROOT_DIR}/cplex ${ILOG_ROOT_DIR}/cplex121
35  ${ILOG_ROOT_DIR}/cplex122 ${ILOG_ROOT_DIR}/cplex123
36  DOC "CPLEX root directory"
37  NO_DEFAULT_PATH
38)
39
40FIND_PATH(ILOG_CONCERT_ROOT_DIR
41  NAMES include/ilconcert
42  HINTS ${ILOG_ROOT_DIR}/concert ${ILOG_ROOT_DIR}/concert29
43  DOC "CONCERT root directory"
44  NO_DEFAULT_PATH
45)
46
47FIND_PATH(ILOG_CPLEX_INCLUDE_DIR
48  ilcplex/cplex.h
49  HINTS ${ILOG_CPLEX_ROOT_DIR}/include
50  NO_DEFAULT_PATH
51)
52
53FIND_PATH(ILOG_CONCERT_INCLUDE_DIR
54  ilconcert/ilobasic.h
55  HINTS ${ILOG_CONCERT_ROOT_DIR}/include
56  NO_DEFAULT_PATH
57)
58
59FIND_LIBRARY(ILOG_CPLEX_LIBRARY
60  cplex cplex121 cplex122 cplex123 cplex124
61  HINTS ${ILOG_CPLEX_ROOT_DIR}/lib/x86_sles10_4.1/static_pic
62  ${ILOG_CPLEX_ROOT_DIR}/lib/x86-64_sles10_4.1/static_pic
63  ${ILOG_CPLEX_ROOT_DIR}/lib/x86_debian4.0_4.1/static_pic
64  ${ILOG_CPLEX_ROOT_DIR}/lib/x86-64_debian4.0_4.1/static_pic
65  ${ILOG_CPLEX_ROOT_DIR}/lib/x86_linux/static_pic
66  ${ILOG_CPLEX_ROOT_DIR}/lib/x86-64_linux/static_pic
67  ${ILOG_CPLEX_ROOT_DIR}/lib/${ILOG_WIN_COMPILER}/stat_mda
68  NO_DEFAULT_PATH
69  )
70
71FIND_LIBRARY(ILOG_CONCERT_LIBRARY
72  concert
73  HINTS ${ILOG_CONCERT_ROOT_DIR}/lib/x86_sles10_4.1/static_pic
74  ${ILOG_CONCERT_ROOT_DIR}/lib/x86-64_sles10_4.1/static_pic
75  ${ILOG_CONCERT_ROOT_DIR}/lib/x86_debian4.0_4.1/static_pic
76  ${ILOG_CONCERT_ROOT_DIR}/lib/x86-64_debian4.0_4.1/static_pic
77  ${ILOG_CONCERT_ROOT_DIR}/lib/x86_linux/static_pic
78  ${ILOG_CONCERT_ROOT_DIR}/lib/x86-64_linux/static_pic
79  ${ILOG_CONCERT_ROOT_DIR}/lib/${ILOG_WIN_COMPILER}/stat_mda
80  NO_DEFAULT_PATH
81  )
82
83FIND_FILE(ILOG_CPLEX_DLL
84  cplex121.dll cplex122.dll cplex123.dll cplex124.dll
85  HINTS ${ILOG_CPLEX_ROOT_DIR}/bin/${ILOG_WIN_PLATFORM}
86  NO_DEFAULT_PATH
87  )
88
89INCLUDE(FindPackageHandleStandardArgs)
90FIND_PACKAGE_HANDLE_STANDARD_ARGS(ILOG
91  DEFAULT_MSG ILOG_CPLEX_LIBRARY ILOG_CPLEX_INCLUDE_DIR
92  )
93
94IF(ILOG_FOUND)
95  SET(ILOG_INCLUDE_DIRS ${ILOG_CPLEX_INCLUDE_DIR} ${ILOG_CONCERT_INCLUDE_DIR})
96  SET(ILOG_LIBRARIES ${ILOG_CPLEX_LIBRARY} ${ILOG_CONCERT_LIBRARY})
97  IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
98    # SET(CPLEX_LIBRARIES "${CPLEX_LIBRARIES};m;pthread")
99    SET(ILOG_LIBRARIES ${ILOG_LIBRARIES} "m" "pthread")
100  ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
101ENDIF(ILOG_FOUND)
102
103MARK_AS_ADVANCED(
104  ILOG_CPLEX_LIBRARY ILOG_CPLEX_INCLUDE_DIR ILOG_CPLEX_DLL
105  ILOG_CONCERT_LIBRARY ILOG_CONCERT_INCLUDE_DIR ILOG_CONCERT_DLL
106  )
Note: See TracBrowser for help on using the repository browser.