From 16c58fe4c643eeefc41c6793b9783034233366bb Mon Sep 17 00:00:00 2001 From: heinrich5991 Date: Sun, 25 Dec 2022 23:47:55 +0100 Subject: [PATCH] Add target `run_cxx_tests` to only run C++ tests Requested by Chairn, because the Rust tests are slow on their computer. --- CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b1b8a3e8f..e1217c1b5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2751,12 +2751,15 @@ if(GTEST_FOUND OR DOWNLOAD_GTEST) list(APPEND TARGETS_OWN ${TARGET_TESTRUNNER}) list(APPEND TARGETS_LINK ${TARGET_TESTRUNNER}) - add_custom_target(run_tests + add_custom_target(run_cxx_tests COMMAND $ ${TESTRUNNER_ARGS} COMMENT Running unit tests DEPENDS ${TARGET_TESTRUNNER} USES_TERMINAL ) + add_custom_target(run_tests + DEPENDS run_cxx_tests + ) if(NOT MSVC OR CMAKE_BUILD_TYPE STREQUAL Release) # On MSVC, Rust tests only work in the release mode because we link our C++ # code with the debug C standard library (/MTd) but Rust only supports