diff options
author | Jose Fonseca <jfonseca@vmware.com> | 2015-08-27 17:36:49 +0100 |
---|---|---|
committer | Jose Fonseca <jfonseca@vmware.com> | 2015-08-27 17:36:49 +0100 |
commit | d497b8dc245649e9b7fc5be76c4a77203dbf208b (patch) | |
tree | f03bbe32df63bb9a9121574ca6788e22753a25f7 | |
parent | ddb25711ef03fb15dc0d8bad44e2a527b2108cf2 (diff) |
cmake: Fix check target on single-configuration builds.
-rw-r--r-- | CMakeLists.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 88ff417e..6558d279 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -475,7 +475,11 @@ target_link_libraries (gtest ${CMAKE_THREAD_LIBS_INIT}) enable_testing () if (CMAKE_CROSSCOMPILING) add_custom_target (check) +elseif (DEFINED CMAKE_BUILD_TYPE) + # Single configuration + add_custom_target (check COMMAND ${CMAKE_CTEST_COMMAND} --output-on-failure) else () + # Multiple configuration add_custom_target (check COMMAND ${CMAKE_CTEST_COMMAND} -C "$<CONFIG>" --output-on-failure) endif () |