Link libm and libpthread if using CPLEX (#277)
authorAkos Ladanyi <ladanyi@tmit.bme.hu>
Tue, 28 Apr 2009 11:55:43 +0100
changeset 6366dc44006c1a8
parent 635 89705c452130
child 637 4faa0c763906
Link libm and libpthread if using CPLEX (#277)
cmake/FindCPLEX.cmake
     1.1 --- a/cmake/FindCPLEX.cmake	Mon Apr 27 18:03:18 2009 +0100
     1.2 +++ b/cmake/FindCPLEX.cmake	Tue Apr 28 11:55:43 2009 +0100
     1.3 @@ -24,6 +24,9 @@
     1.4  IF(CPLEX_FOUND)
     1.5    SET(CPLEX_INCLUDE_DIRS ${CPLEX_INCLUDE_DIR})
     1.6    SET(CPLEX_LIBRARIES ${CPLEX_LIBRARY})
     1.7 +  IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
     1.8 +    SET(CPLEX_LIBRARIES "${CPLEX_LIBRARIES};m;pthread")
     1.9 +  ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
    1.10  ENDIF(CPLEX_FOUND)
    1.11  
    1.12  MARK_AS_ADVANCED(CPLEX_LIBRARY CPLEX_INCLUDE_DIR CPLEX_BIN_DIR)