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 <noel.eck@intel.com>
This commit is contained in:
Noel Eck 2018-03-13 14:15:33 -07:00
parent f907ebcf2e
commit 7254d5f75e

View File

@ -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")