From 00fee22e3772a0461cbb3d3e7e865960d4cbcd5c Mon Sep 17 00:00:00 2001 From: Justin Carpentier Date: Tue, 28 Aug 2018 00:36:31 +0200 Subject: [PATCH] [CMake] Update tests to use ADD_UNIT_TEST from the cmake module --- CMakeLists.txt | 1 + tests/CMakeLists.txt | 5 ++--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a46f37f..a7abd3f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,7 @@ INCLUDE(cmake/base.cmake) INCLUDE(cmake/idl.cmake) INCLUDE(cmake/python.cmake) INCLUDE(cmake/boost.cmake) +INCLUDE(cmake/test.cmake) SET(PROJECT_NAME gepetto-viewer-corba) SET(PROJECT_DESCRIPTION "Corba server for gepetto-viewer") diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index dd037c4..128f5f3 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -31,11 +31,10 @@ ADD_DEFINITIONS(${QT_DEFINITIONS}) MACRO(ADD_TESTCASE NAME GENERATED) IF (${GENERATED} STREQUAL TRUE) - ADD_EXECUTABLE(${NAME} ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.cc) + ADD_UNIT_TEST(${NAME} ${CMAKE_CURRENT_BINARY_DIR}/${NAME}.cc) ELSE() - ADD_EXECUTABLE(${NAME} ${NAME}.cc) + ADD_UNIT_TEST(${NAME} ${NAME}.cc) ENDIF() - ADD_TEST(${NAME} ${EXECUTABLE_OUTPUT_PATH}/${NAME}) TARGET_LINK_LIBRARIES(${NAME} ${QT_LIBRARIES}) PKG_CONFIG_USE_DEPENDENCY(${NAME} openscenegraph)