test/CMakeLists.txt
changeset 929 d3b041452dd8
parent 679 9c7639f3a741
child 930 8e39ccaabf48
child 933 66156a3498ea
equal deleted inserted replaced
35:1e50ff577c29 52:5ce197ae3738
    39   time_measure_test
    39   time_measure_test
    40   unionfind_test
    40   unionfind_test
    41 )
    41 )
    42 
    42 
    43 IF(LEMON_HAVE_LP)
    43 IF(LEMON_HAVE_LP)
    44   ADD_EXECUTABLE(lp_test lp_test.cc)
    44   IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
       
    45     ADD_EXECUTABLE(lp_test lp_test.cc)
       
    46   ELSE()
       
    47     ADD_EXECUTABLE(lp_test EXCLUDE_FROM_ALL lp_test.cc)
       
    48   ENDIF()
       
    49 
    45   SET(LP_TEST_LIBS lemon)
    50   SET(LP_TEST_LIBS lemon)
    46 
    51 
    47   IF(LEMON_HAVE_GLPK)
    52   IF(LEMON_HAVE_GLPK)
    48     SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES})
    53     SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES})
    49   ENDIF()
    54   ENDIF()
    75     )
    80     )
    76   ENDIF()
    81   ENDIF()
    77 ENDIF()
    82 ENDIF()
    78 
    83 
    79 IF(LEMON_HAVE_MIP)
    84 IF(LEMON_HAVE_MIP)
    80   ADD_EXECUTABLE(mip_test mip_test.cc)
    85   IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
       
    86     ADD_EXECUTABLE(mip_test mip_test.cc)
       
    87   ELSE()
       
    88     ADD_EXECUTABLE(mip_test EXCLUDE_FROM_ALL mip_test.cc)
       
    89   ENDIF()
       
    90 
    81   SET(MIP_TEST_LIBS lemon)
    91   SET(MIP_TEST_LIBS lemon)
    82 
    92 
    83   IF(LEMON_HAVE_GLPK)
    93   IF(LEMON_HAVE_GLPK)
    84     SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES})
    94     SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES})
    85   ENDIF()
    95   ENDIF()
   111     )
   121     )
   112   ENDIF()
   122   ENDIF()
   113 ENDIF()
   123 ENDIF()
   114 
   124 
   115 FOREACH(TEST_NAME ${TESTS})
   125 FOREACH(TEST_NAME ${TESTS})
   116   ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
   126   IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
       
   127     ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
       
   128   ELSE()
       
   129     ADD_EXECUTABLE(${TEST_NAME} EXCLUDE_FROM_ALL ${TEST_NAME}.cc)
       
   130   ENDIF()
   117   TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
   131   TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
   118   ADD_TEST(${TEST_NAME} ${TEST_NAME})
   132   ADD_TEST(${TEST_NAME} ${TEST_NAME})
       
   133   ADD_DEPENDENCIES(check ${TEST_NAME})
   119 ENDFOREACH()
   134 ENDFOREACH()