summaryrefslogtreecommitdiff
path: root/Modules/CTestUseLaunchers.cmake
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2016-10-14 14:01:50 -0400
committerBrad King <brad.king@kitware.com>2016-10-17 11:15:36 -0400
commit19beee46cc6e9b7a05694b29420ad49487648501 (patch)
treeb1a70aac9e26172f3a4e22283a330d649f66e812 /Modules/CTestUseLaunchers.cmake
parentb2cf1cba07633a242d5d13f694609a505c6a6235 (diff)
downloadcmake-19beee46cc6e9b7a05694b29420ad49487648501.tar.gz
ctest_configure: Propagate CTEST_USE_LAUNCHERS from caller to project
If `CTEST_USE_LAUNCHERS` is `TRUE` in a CTest script then the `ctest_configure` command will add `-DCTEST_USE_LAUNCHERS:BOOL=TRUE` to the cmake command used to configure the project. This allows a project to only set `CTEST_USE_LAUNCHERS` in a ctest script and have launchers work.
Diffstat (limited to 'Modules/CTestUseLaunchers.cmake')
-rw-r--r--Modules/CTestUseLaunchers.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/CTestUseLaunchers.cmake b/Modules/CTestUseLaunchers.cmake
index 1cf20eb879..dc90513a9c 100644
--- a/Modules/CTestUseLaunchers.cmake
+++ b/Modules/CTestUseLaunchers.cmake
@@ -24,7 +24,9 @@
# include(CTestUseLaunchers), it will use the value of the ENV variable
# to initialize a CTEST_USE_LAUNCHERS cache variable. This cache
# variable initialization only occurs if CTEST_USE_LAUNCHERS is not
-# already defined.
+# already defined. If CTEST_USE_LAUNCHERS is on in a ctest -S script
+# the ctest_configure command will add -DCTEST_USE_LAUNCHERS:BOOL=TRUE
+# to the cmake command used to configure the project.
if(NOT DEFINED CTEST_USE_LAUNCHERS AND DEFINED ENV{CTEST_USE_LAUNCHERS_DEFAULT})
set(CTEST_USE_LAUNCHERS "$ENV{CTEST_USE_LAUNCHERS_DEFAULT}"