[Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-572-g2f779b2

Brad King brad.king at kitware.com
Mon Oct 17 11:20:25 EDT 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  2f779b24d65321dc05974c46a69cc3150f3d09cd (commit)
       via  19beee46cc6e9b7a05694b29420ad49487648501 (commit)
      from  6b400f503118e894685bb88f7b18ade37bca5dfe (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2f779b24d65321dc05974c46a69cc3150f3d09cd
commit 2f779b24d65321dc05974c46a69cc3150f3d09cd
Merge: 6b400f5 19beee4
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Oct 17 11:20:24 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Oct 17 11:20:24 2016 -0400

    Merge topic 'propagate_ctest_use_launchers' into next
    
    19beee46 ctest_configure: Propagate CTEST_USE_LAUNCHERS from caller to project


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=19beee46cc6e9b7a05694b29420ad49487648501
commit 19beee46cc6e9b7a05694b29420ad49487648501
Author:     Bill Hoffman <bill.hoffman at kitware.com>
AuthorDate: Fri Oct 14 14:01:50 2016 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Oct 17 11:15:36 2016 -0400

    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.

diff --git a/Modules/CTestUseLaunchers.cmake b/Modules/CTestUseLaunchers.cmake
index 1cf20eb..dc90513 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}"
diff --git a/Source/CTest/cmCTestConfigureCommand.cxx b/Source/CTest/cmCTestConfigureCommand.cxx
index 62802ef..73e893d 100644
--- a/Source/CTest/cmCTestConfigureCommand.cxx
+++ b/Source/CTest/cmCTestConfigureCommand.cxx
@@ -102,6 +102,10 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
         cmakeConfigureCommand += "\"";
       }
 
+      if (this->Makefile->IsOn("CTEST_USE_LAUNCHERS")) {
+        cmakeConfigureCommand += " \"-DCTEST_USE_LAUNCHERS:BOOL=TRUE\"";
+      }
+
       cmakeConfigureCommand += " \"-G";
       cmakeConfigureCommand += cmakeGeneratorName;
       cmakeConfigureCommand += "\"";
diff --git a/Tests/RunCMake/ctest_build/CMakeLists.txt.in b/Tests/RunCMake/ctest_build/CMakeLists.txt.in
index 82cb7c4..133ae36 100644
--- a/Tests/RunCMake/ctest_build/CMakeLists.txt.in
+++ b/Tests/RunCMake/ctest_build/CMakeLists.txt.in
@@ -1,4 +1,5 @@
 cmake_minimum_required(VERSION 3.1)
+ at CASE_CMAKELISTS_PREFIX_CODE@
 project(CTestBuild at CASE_NAME@ NONE)
 include(CTest)
 add_test(NAME RunCMakeVersion COMMAND "${CMAKE_COMMAND}" --version)
diff --git a/Tests/RunCMake/ctest_build/RunCMakeTest.cmake b/Tests/RunCMake/ctest_build/RunCMakeTest.cmake
index 324f25c..1092d2a 100644
--- a/Tests/RunCMake/ctest_build/RunCMakeTest.cmake
+++ b/Tests/RunCMake/ctest_build/RunCMakeTest.cmake
@@ -13,6 +13,11 @@ function(run_BuildFailure)
   set(CASE_CMAKELISTS_SUFFIX_CODE [[
 add_custom_target(BuildFailure ALL COMMAND command-does-not-exist)
 ]])
+  set(CASE_CMAKELISTS_PREFIX_CODE [[
+if(NOT CTEST_USE_LAUNCHERS)
+  message(FATAL_ERROR "CTEST_USE_LAUNCHERS not set")
+endif()
+]])
   set(CASE_TEST_PREFIX_CODE [[
 cmake_policy(SET CMP0061 NEW)
 ]])
diff --git a/Tests/RunCMake/ctest_build/test.cmake.in b/Tests/RunCMake/ctest_build/test.cmake.in
index 768f1c6..6f15ec9 100644
--- a/Tests/RunCMake/ctest_build/test.cmake.in
+++ b/Tests/RunCMake/ctest_build/test.cmake.in
@@ -9,6 +9,7 @@ set(CTEST_CMAKE_GENERATOR               "@RunCMake_GENERATOR@")
 set(CTEST_CMAKE_GENERATOR_PLATFORM      "@RunCMake_GENERATOR_PLATFORM@")
 set(CTEST_CMAKE_GENERATOR_TOOLSET       "@RunCMake_GENERATOR_TOOLSET@")
 set(CTEST_BUILD_CONFIGURATION           "$ENV{CMAKE_CONFIG_TYPE}")
+set(CTEST_USE_LAUNCHERS                 TRUE)
 
 set(ctest_build_args "@CASE_CTEST_BUILD_ARGS@")
 ctest_start(Experimental)

-----------------------------------------------------------------------

Summary of changes:
 Modules/CTestUseLaunchers.cmake               |    4 +++-
 Source/CTest/cmCTestConfigureCommand.cxx      |    4 ++++
 Tests/RunCMake/ctest_build/CMakeLists.txt.in  |    1 +
 Tests/RunCMake/ctest_build/RunCMakeTest.cmake |    5 +++++
 Tests/RunCMake/ctest_build/test.cmake.in      |    1 +
 5 files changed, 14 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list