diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2013-09-26 09:37:19 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2013-09-26 09:37:19 +0200 |
commit | 62c87692b8c21b2e1dfe344a36161b5b1c1096c2 (patch) | |
tree | f0262e58b94422d832139697293928eb3b0a7cd8 /tests | |
parent | 8af5b5a28280c30d384a6094d46edce73813affd (diff) |
Re-arrange CMake files for easier packaging
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CMakeLists.txt | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 5298e06..254bfa7 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,6 +1,5 @@ -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 2.6) -# configure unit tests set(TEST_SRCS test-suite.c test-buffer.c @@ -12,20 +11,12 @@ set(TEST_SRCS set(SUITE_BIN "test-suite") -option(WITH_TESTS "Build test suite" ON) +add_executable(${SUITE_BIN} ${TEST_SRCS}) -if (WITH_TESTS) - include_directories( - {CMAKE_CURRENT_SOURCE_DIR}) +target_link_libraries(${SUITE_BIN} ufo ${UFOCORE_DEPS}) - add_executable(${SUITE_BIN} ${TEST_SRCS}) +add_test(${SUITE_BIN} ${SUITE_BIN}) - target_link_libraries(${SUITE_BIN} - ufo - ${UFOCORE_DEPS}) - - add_test(${SUITE_BIN} ${SUITE_BIN}) - - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/gtester.xsl" - "${CMAKE_CURRENT_BINARY_DIR}/gtester.xsl" @ONLY IMMEDIATE) -endif() +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/gtester.xsl" + "${CMAKE_CURRENT_BINARY_DIR}/gtester.xsl" + @ONLY IMMEDIATE) |