From 4030126f9f524c780e0c189a28984ff0c5aa5ffd Mon Sep 17 00:00:00 2001 From: Daniel Chappuis Date: Sun, 12 Jul 2015 12:11:20 +0200 Subject: [PATCH] Modify CMakeLists file to automatically launch the tests --- CMakeLists.txt | 2 ++ test/CMakeLists.txt | 2 ++ 2 files changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 10ddb5cb..75592736 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,8 @@ SET(LIBRARY_OUTPUT_PATH "lib") # Where to build the executables SET(OUR_EXECUTABLE_OUTPUT_PATH "${PROJECT_BINARY_DIR}/bin") +ENABLE_TESTING() + # Options OPTION(COMPILE_EXAMPLES "Select this if you want to build the examples" OFF) OPTION(COMPILE_TESTS "Select this if you want to build the tests" OFF) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index ff69eb31..d54ea89b 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -18,3 +18,5 @@ file ( ADD_EXECUTABLE(tests ${TESTS_SOURCE_FILES}) TARGET_LINK_LIBRARIES(tests reactphysics3d) + +ADD_TEST(Test tests)