From 7254d5f75e796da58ec631ff8db196833129309d Mon Sep 17 00:00:00 2001 From: Noel Eck Date: Tue, 13 Mar 2018 14:15:33 -0700 Subject: [PATCH] gtest: Added custom target for all unit tests Create a target which depends on all unit test executables for ease of building/running. Signed-off-by: Noel Eck --- tests/unit/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/unit/CMakeLists.txt b/tests/unit/CMakeLists.txt index 2f4ae621..e9878b1d 100644 --- a/tests/unit/CMakeLists.txt +++ b/tests/unit/CMakeLists.txt @@ -17,3 +17,11 @@ add_executable(json_tests json/json_tests.cxx) target_link_libraries(json_tests GTest::GTest GTest::Main) target_include_directories(json_tests PRIVATE "${UPM_COMMON_HEADER_DIRS}/") gtest_add_tests(json_tests "" AUTO) + +# Add a custom target for unit tests +add_custom_target(tests-unit ALL + DEPENDS + utilities_tests + json_tests + COMMENT "UPM unit test collection") +