COIN-OR::LEMON - Graph Library

Changeset 475:f59df77f5c8d in lemon-1.2 for test


Ignore:
Timestamp:
01/21/09 19:08:31 (11 years ago)
Author:
Akos Ladanyi <ladanyi@…>
Branch:
default
Phase:
public
Message:

Fix CMAKE build without GLPK

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/CMakeLists.txt

    r473 r475  
    22  ${CMAKE_SOURCE_DIR}
    33  ${CMAKE_BINARY_DIR}
    4   ${GLPK_INCLUDE_DIR}
    54)
     5
     6IF(HAVE_GLPK)
     7  INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIR})
     8ENDIF(HAVE_GLPK)
    69
    710LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon)
     
    3639IF(HAVE_LP)
    3740  ADD_EXECUTABLE(lp_test lp_test.cc)
    38   TARGET_LINK_LIBRARIES(lp_test lemon ${GLPK_LIBRARIES})
     41  IF(HAVE_GLPK)
     42    TARGET_LINK_LIBRARIES(lp_test lemon ${GLPK_LIBRARIES})
     43  ENDIF(HAVE_GLPK)
    3944  ADD_TEST(lp_test lp_test)
    4045
    41   IF(WIN32)
     46  IF(WIN32 AND HAVE_GLPK)
    4247    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
    4348    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
     
    4752      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
    4853    )
    49   ENDIF(WIN32)
     54  ENDIF(WIN32 AND HAVE_GLPK)
    5055ENDIF(HAVE_LP)
    5156
    5257IF(HAVE_MIP)
    5358  ADD_EXECUTABLE(mip_test mip_test.cc)
    54   TARGET_LINK_LIBRARIES(mip_test lemon ${GLPK_LIBRARIES})
     59  IF(HAVE_GLPK)
     60    TARGET_LINK_LIBRARIES(mip_test lemon ${GLPK_LIBRARIES})
     61  ENDIF(HAVE_GLPK)
    5562  ADD_TEST(mip_test mip_test)
    5663
    57   IF(WIN32)
     64  IF(WIN32 AND HAVE_GLPK)
    5865    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
    5966    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
     
    6370      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
    6471    )
    65   ENDIF(WIN32)
     72  ENDIF(WIN32 AND HAVE_GLPK)
    6673ENDIF(HAVE_MIP)
    6774
Note: See TracChangeset for help on using the changeset viewer.