examples/CMakeLists.txt
author Alpar Juttner <alpar@cs.elte.hu>
Sun, 05 Dec 2010 17:35:23 +0100
changeset 2 4c8956a7bdf4
permissions -rw-r--r--
Set up CMAKE build environment
alpar@2
     1
ADD_EXECUTABLE(glpsol
alpar@2
     2
  glpsol.c)
alpar@2
     3
alpar@2
     4
TARGET_LINK_LIBRARIES(glpsol glpk-static)
alpar@2
     5
IF(UNIX)
alpar@2
     6
  TARGET_LINK_LIBRARIES(glpsol glpk-static m)
alpar@2
     7
ENDIF()
alpar@2
     8
alpar@2
     9
INSTALL(
alpar@2
    10
  TARGETS glpsol
alpar@2
    11
  RUNTIME DESTINATION bin
alpar@2
    12
  COMPONENT bin
alpar@2
    13
)
alpar@2
    14
alpar@2
    15
ADD_TEST(NAME glpsol-test-1
alpar@2
    16
  COMMAND glpsol --version)
alpar@2
    17
ADD_TEST(NAME glpsol-test-2
alpar@2
    18
  COMMAND glpsol --mps ${CMAKE_CURRENT_SOURCE_DIR}/plan.mps)
alpar@2
    19
ADD_DEPENDENCIES(check glpsol)
alpar@2
    20