diff options
Diffstat (limited to 'Modules/CTestUseLaunchers.cmake')
-rw-r--r-- | Modules/CTestUseLaunchers.cmake | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/Modules/CTestUseLaunchers.cmake b/Modules/CTestUseLaunchers.cmake index 2fab247..c79119f 100644 --- a/Modules/CTestUseLaunchers.cmake +++ b/Modules/CTestUseLaunchers.cmake @@ -46,9 +46,31 @@ if(NOT "${CMAKE_GENERATOR}" MATCHES "Make|Ninja") endif() if(CTEST_USE_LAUNCHERS) - set(CTEST_LAUNCH_COMPILE "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <OBJECT> --source <SOURCE> --language <LANGUAGE> --") - set(CTEST_LAUNCH_LINK "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <TARGET> --target-type <TARGET_TYPE> --language <LANGUAGE> --") - set(CTEST_LAUNCH_CUSTOM "\"${CMAKE_CTEST_COMMAND}\" --launch --target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR> --output <OUTPUT> --") + set(__launch_common_options + "--target-name <TARGET_NAME> --build-dir <CMAKE_CURRENT_BINARY_DIR>") + + set(__launch_compile_options + "${__launch_common_options} --output <OBJECT> --source <SOURCE> --language <LANGUAGE>") + + set(__launch_link_options + "${__launch_common_options} --output <TARGET> --target-type <TARGET_TYPE> --language <LANGUAGE>") + + set(__launch_custom_options + "${__launch_common_options} --output <OUTPUT>") + + if("${CMAKE_GENERATOR}" MATCHES "Ninja") + set(__launch_compile_options "${__launch_compile_options} --filter-prefix <CMAKE_CL_SHOWINCLUDES_PREFIX>") + endif() + + set(CTEST_LAUNCH_COMPILE + "\"${CMAKE_CTEST_COMMAND}\" --launch ${__launch_compile_options} --") + + set(CTEST_LAUNCH_LINK + "\"${CMAKE_CTEST_COMMAND}\" --launch ${__launch_link_options} --") + + set(CTEST_LAUNCH_CUSTOM + "\"${CMAKE_CTEST_COMMAND}\" --launch ${__launch_custom_options} --") + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CTEST_LAUNCH_COMPILE}") set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CTEST_LAUNCH_LINK}") set_property(GLOBAL PROPERTY RULE_LAUNCH_CUSTOM "${CTEST_LAUNCH_CUSTOM}") |