Add target run_cxx_tests to only run C++ tests

Requested by Chairn, because the Rust tests are slow on their computer.
This commit is contained in:
heinrich5991 2022-12-25 23:47:55 +01:00
parent 4f02f6da97
commit 16c58fe4c6

View file

@ -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 $<TARGET_FILE:${TARGET_TESTRUNNER}> ${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