summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorKyle Edwards <kyle.edwards@kitware.com>2019-12-11 15:59:41 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-12-11 16:00:13 (GMT)
commit106137492b2d396e292745c2cb344d414640d6be (patch)
treec097ccbeb5cbefe2a739cbac360a302d79566d8a /Source
parent651b5d157ae43c07e743af94ebf71b624734c4d5 (diff)
parente6f758be6dcd11e901ed86f56c4fdd7e7cb86cca (diff)
downloadCMake-106137492b2d396e292745c2cb344d414640d6be.zip
CMake-106137492b2d396e292745c2cb344d414640d6be.tar.gz
CMake-106137492b2d396e292745c2cb344d414640d6be.tar.bz2
Merge topic 'ctest-configuration-type'
e6f758be6d ctest: Populate CTEST_CONFIGURATION_TYPE from the -C command line when set Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4109
Diffstat (limited to 'Source')
-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);