diff options
| author | Eduard Braun <eduard.braun2@gmx.de> | 2017-07-14 17:55:07 +0000 |
|---|---|---|
| committer | Eduard Braun <eduard.braun2@gmx.de> | 2017-07-14 20:51:21 +0000 |
| commit | 8beca6ec5ec135d9547dfbf104439cfd42029910 (patch) | |
| tree | b8d6783f81e272872cb7a0c88e002998304712d6 /testfiles | |
| parent | cmake: fix targets to actually depend on inkscape-version.cpp (diff) | |
| download | inkscape-8beca6ec5ec135d9547dfbf104439cfd42029910.tar.gz inkscape-8beca6ec5ec135d9547dfbf104439cfd42029910.zip | |
cmake: Add build target 'tests' which builds all tests (but does not execute them)
- the recommended 'check' target depends on 'tests' (so "make check" will automatically build and run tests)
- the pre-defined 'test' target does not automatically build tests, so make sure to run "make tests" before running "make test" (if you want to use it)
Diffstat (limited to 'testfiles')
| -rw-r--r-- | testfiles/CMakeLists.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/testfiles/CMakeLists.txt b/testfiles/CMakeLists.txt index b1d68b1fb..388a04b11 100644 --- a/testfiles/CMakeLists.txt +++ b/testfiles/CMakeLists.txt @@ -20,9 +20,12 @@ set(TEST_LIBS gmock_main inkscape_base) + +add_custom_target(tests) foreach(source ${TEST_SOURCES}) add_executable(${source} src/${source}.cpp unittest.cpp doc-per-case-test.cpp) target_link_libraries(${source} ${TEST_LIBS}) add_test(NAME ${source} COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${source}) - add_dependencies(check ${source}) + set_tests_properties(${source} PROPERTIES ENVIRONMENT ${CMAKE_CTEST_ENV}) + add_dependencies(tests ${source}) endforeach()
\ No newline at end of file |
