summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorJulien Jomier <julien.jomier@kitware.com>2019-12-03 10:23:02 (GMT)
committerKyle Edwards <kyle.edwards@kitware.com>2019-12-09 18:10:59 (GMT)
commite6f758be6dcd11e901ed86f56c4fdd7e7cb86cca (patch)
tree3fec0870009c86bacbc37e170465f7565cba61bc /Source/CTest
parentc57bcf3b3025875dfbfd1d1f6eca1291abf4d2f7 (diff)
downloadCMake-e6f758be6dcd11e901ed86f56c4fdd7e7cb86cca.zip
CMake-e6f758be6dcd11e901ed86f56c4fdd7e7cb86cca.tar.gz
CMake-e6f758be6dcd11e901ed86f56c4fdd7e7cb86cca.tar.bz2
ctest: Populate CTEST_CONFIGURATION_TYPE from the -C command line when set
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestScriptHandler.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestScriptHandler.cxx b/Source/CTest/cmCTestScriptHandler.cxx
index 60facbd..7803e37 100644
--- a/Source/CTest/cmCTestScriptHandler.cxx
+++ b/Source/CTest/cmCTestScriptHandler.cxx
@@ -340,6 +340,13 @@ int cmCTestScriptHandler::ReadInScript(const std::string& total_script_arg)
this->SetRunCurrentScript(true);
this->UpdateElapsedTime();
+ // set the CTEST_CONFIGURATION_TYPE variable to the current value of the
+ // the -C argument on the command line.
+ if (!this->CTest->GetConfigType().empty()) {
+ this->Makefile->AddDefinition("CTEST_CONFIGURATION_TYPE",
+ this->CTest->GetConfigType());
+ }
+
// add the script arg if defined
if (!script_arg.empty()) {
this->Makefile->AddDefinition("CTEST_SCRIPT_ARG", script_arg);