# HG changeset patch
# User John Doe <john@example.com>
# Date 1364478763 -3600
# Node ID 1dc418bde13d8d6e94fcdf5bf4cee58611f1624b
# Parent 473c71baff72fa87fce601589e9ac07e88c3e98d
Added cmake support to find SoPlex
diff -r 473c71baff72 -r 1dc418bde13d CMakeLists.txt
a
|
b
|
|
64 | 64 | FIND_PACKAGE(GLPK 4.33) |
65 | 65 | FIND_PACKAGE(CPLEX) |
66 | 66 | FIND_PACKAGE(COIN) |
| 67 | FIND_PACKAGE(SOPLEX) |
67 | 68 | |
68 | 69 | IF(DEFINED ENV{LEMON_CXX_WARNING}) |
69 | 70 | SET(CXX_WARNING $ENV{LEMON_CXX_WARNING}) |
diff -r 473c71baff72 -r 1dc418bde13d cmake/FindSOPLEX.cmake
-
|
+
|
|
| 1 | SET(SOPLEX_ROOT_DIR "" CACHE PATH "SoPlex root directory") |
| 2 | |
| 3 | FIND_PATH(SOPLEX_INCLUDE_DIR |
| 4 | soplex.h |
| 5 | HINTS ${SOPLEX_ROOT_DIR}/src |
| 6 | ) |
| 7 | FIND_LIBRARY(SOPLEX_LIBRARY |
| 8 | soplex |
| 9 | HINTS ${SOPLEX_ROOT_DIR}/lib |
| 10 | ) |
| 11 | |
| 12 | INCLUDE(FindPackageHandleStandardArgs) |
| 13 | FIND_PACKAGE_HANDLE_STANDARD_ARGS(SOPLEX DEFAULT_MSG SOPLEX_LIBRARY SOPLEX_INCLUDE_DIR) |
| 14 | |
| 15 | IF(SOPLEX_FOUND) |
| 16 | SET(SOPLEX_INCLUDE_DIRS ${SOPLEX_INCLUDE_DIR}) |
| 17 | SET(SOPLEX_LIBRARIES ${SOPLEX_LIBRARY}) |
| 18 | IF(CMAKE_SYSTEM_NAME STREQUAL "Linux") |
| 19 | SET(SOPLEX_LIBRARIES "${SOPLEX_LIBRARIES};z") |
| 20 | ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux") |
| 21 | ENDIF(SOPLEX_FOUND) |
| 22 | |
| 23 | MARK_AS_ADVANCED(SOPLEX_LIBRARY SOPLEX_INCLUDE_DIR) |
| 24 | |
| 25 | IF(SOPLEX_FOUND) |
| 26 | SET(LEMON_HAVE_LP TRUE) |
| 27 | SET(LEMON_HAVE_SOPLEX TRUE) |
| 28 | ENDIF(SOPLEX_FOUND) |
diff -r 473c71baff72 -r 1dc418bde13d lemon/CMakeLists.txt
a
|
b
|
|
49 | 49 | INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS}) |
50 | 50 | ENDIF() |
51 | 51 | |
| 52 | IF(LEMON_HAVE_SOPLEX) |
| 53 | SET(LEMON_SOURCES ${LEMON_SOURCES} soplex.cc) |
| 54 | INCLUDE_DIRECTORIES(${SOPLEX_INCLUDE_DIRS}) |
| 55 | ENDIF() |
| 56 | |
52 | 57 | ADD_LIBRARY(lemon ${LEMON_SOURCES}) |
53 | 58 | IF(UNIX) |
54 | 59 | SET_TARGET_PROPERTIES(lemon PROPERTIES OUTPUT_NAME emon) |
diff -r 473c71baff72 -r 1dc418bde13d lemon/config.h.in
a
|
b
|
|
4 | 4 | #cmakedefine LEMON_HAVE_MIP 1 |
5 | 5 | #cmakedefine LEMON_HAVE_GLPK 1 |
6 | 6 | #cmakedefine LEMON_HAVE_CPLEX 1 |
| 7 | #cmakedefine LEMON_HAVE_SOPLEX 1 |
7 | 8 | #cmakedefine LEMON_HAVE_CLP 1 |
8 | 9 | #cmakedefine LEMON_HAVE_CBC 1 |
9 | 10 | #cmakedefine LEMON_USE_PTHREAD 1 |