diff --git a/CMakeLists.txt b/CMakeLists.txt index 56b3e05fa..4de3c06e5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,10 @@ include(cmake/buildFiles.cmake REQUIRED) file(GLOB cfgs "cfg/*.cfg") +if (BUILD_TESTS) + enable_testing() +endif() + add_subdirectory(externals/tinyxml) add_subdirectory(lib) # CppCheck Library add_subdirectory(cli) # Client application diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 0d7380273..b85a80e33 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -20,4 +20,6 @@ if (BUILD_TESTS) add_dependencies(testrunner copy_cfg) + add_test(NAME testrunner COMMAND testrunner WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + endif()