diff options
author | Alex Neundorf <neundorf@kde.org> | 2011-12-18 21:24:11 +0100 |
---|---|---|
committer | Alex Neundorf <neundorf@kde.org> | 2011-12-18 21:24:11 +0100 |
commit | fe76108ad56f0481c80afbf42791a106d7b038ca (patch) | |
tree | 4d3367c1e20d4215559321ccbdf340ecc3da622d /tests/CMakeLists.txt | |
parent | 9e2e47d30d7a566423a91f1a12e832be0b3948fd (diff) | |
download | extra-cmake-modules-fe76108ad56f0481c80afbf42791a106d7b038ca.tar.gz extra-cmake-modules-fe76108ad56f0481c80afbf42791a106d7b038ca.tar.bz2 |
-enable testing
-add test ExecuteAllModules, which is the same as FindModulesExecuteAll in CMake: include (and execute) all *cmake files, to make sure they are not completely broken
Alex
Diffstat (limited to 'tests/CMakeLists.txt')
-rw-r--r-- | tests/CMakeLists.txt | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt new file mode 100644 index 00000000..4347a92d --- /dev/null +++ b/tests/CMakeLists.txt @@ -0,0 +1,20 @@ +# a macro for tests that have a simple format where the name matches the +# directory and project +macro(ADD_TEST_MACRO NAME COMMAND) + string(REPLACE "." "/" dir "${NAME}") + string(REGEX REPLACE "[^.]*\\." "" proj "${NAME}") + add_test(${NAME} ${CMAKE_CTEST_COMMAND} + --build-and-test + "${CMAKE_SOURCE_DIR}/tests/${dir}" + "${CMAKE_BINARY_DIR}/tests/${dir}" + --build-two-config + --build-generator ${CMAKE_GENERATOR} + --build-makeprogram ${CMAKE_MAKE_PROGRAM} + --build-project ${proj} + ${${NAME}_EXTRA_OPTIONS} + --test-command ${COMMAND} ${ARGN}) +# list(APPEND TEST_BUILD_DIRS "${CMAKE_BINARY_DIR}/tests/${dir}") +endmacro(ADD_TEST_MACRO) + + +add_test_macro(ExecuteAllModules ExecuteAllModules) |