mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-30 18:29:37 -06:00
CTestTargets: Include CMAKE_CTEST_ARGUMENTS in CTEST_TEST_TARGET_ALIAS
Extend the change from commit 4153d8445b (Add CMAKE_CTEST_ARGUMENTS
variable to pass command-line arguments to ctest, 2019-12-28,
v3.17.0-rc1~150^2) to cover the test target alias created by
`CTEST_TEST_TARGET_ALIAS` too.
This should allow:
set(CMAKE_CTEST_ARGUMENTS -T Test --no-compress-output)
set(CTEST_TEST_TARGET_ALIAS runtests)
include(CTest)
to use the arguments as part of `make runtests`.
Fixes: #22239
This commit is contained in:
@@ -86,7 +86,7 @@ if(NOT _CTEST_TARGETS_ADDED)
|
||||
# or "RUN_TESTS" target:
|
||||
if(CTEST_TEST_TARGET_ALIAS)
|
||||
add_custom_target(${CTEST_TEST_TARGET_ALIAS}
|
||||
${CMAKE_CTEST_COMMAND} ${__conf_types}
|
||||
${CMAKE_CTEST_COMMAND} ${CMAKE_CTEST_ARGUMENTS} ${__conf_types}
|
||||
USES_TERMINAL
|
||||
)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user