Enabling testing in the CMakeList

... which allows to use "make test" and/or "ctest -V"
This commit is contained in:
hvellyr 2016-05-29 23:13:39 +02:00 committed by gck
parent b031727fa2
commit d0c6cd55ad
2 changed files with 4 additions and 0 deletions

View File

@ -1,6 +1,8 @@
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8)
add_definitions("-std=c++1y") add_definitions("-std=c++1y")
enable_testing()
add_subdirectory(lint) add_subdirectory(lint)
add_subdirectory(test) add_subdirectory(test)
add_subdirectory(example) add_subdirectory(example)

View File

@ -4,3 +4,5 @@ add_definitions("-std=c++1y")
add_executable(test-main test.cc) add_executable(test-main test.cc)
target_link_libraries(test-main pthread) target_link_libraries(test-main pthread)
add_test(TestMain test-main)