summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestConfigureCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-12-10 21:53:56 (GMT)
committerBrad King <brad.king@kitware.com>2013-02-07 16:08:32 (GMT)
commite3841cf4a275a65ea6306e980da7dfef78a8c57d (patch)
treeae2b6f839780130f869a20b23df356251167868b /Source/CTest/cmCTestConfigureCommand.cxx
parentf980a8049522782779b3a721c37f976de1e38dcc (diff)
downloadCMake-e3841cf4a275a65ea6306e980da7dfef78a8c57d.zip
CMake-e3841cf4a275a65ea6306e980da7dfef78a8c57d.tar.gz
CMake-e3841cf4a275a65ea6306e980da7dfef78a8c57d.tar.bz2
CTest: Add options to set generator toolset
The ctest_configure command already reads the CTEST_CMAKE_GENERATOR variable to get the value for the cmake -G option. Read new variable CTEST_CMAKE_GENERATOR_TOOLSET for -T. The "ctest --build-and-test" mode already has "--build-generator" to specify the -G option to CMake. Add a "--build-generator-toolset" option to specify the -T value.
Diffstat (limited to 'Source/CTest/cmCTestConfigureCommand.cxx')
-rw-r--r--Source/CTest/cmCTestConfigureCommand.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/CTest/cmCTestConfigureCommand.cxx b/Source/CTest/cmCTestConfigureCommand.cxx
index 7a99ddf..d6d39a9 100644
--- a/Source/CTest/cmCTestConfigureCommand.cxx
+++ b/Source/CTest/cmCTestConfigureCommand.cxx
@@ -144,6 +144,15 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
cmakeConfigureCommand += cmakeGeneratorName;
cmakeConfigureCommand += "\"";
+ const char* cmakeGeneratorToolset =
+ this->Makefile->GetDefinition("CTEST_CMAKE_GENERATOR_TOOLSET");
+ if(cmakeGeneratorToolset && *cmakeGeneratorToolset)
+ {
+ cmakeConfigureCommand += " \"-T";
+ cmakeConfigureCommand += cmakeGeneratorToolset;
+ cmakeConfigureCommand += "\"";
+ }
+
cmakeConfigureCommand += " \"";
cmakeConfigureCommand += source_dir;
cmakeConfigureCommand += "\"";