diff options
author | Brad King <brad.king@kitware.com> | 2012-12-10 21:53:56 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-02-07 16:08:32 (GMT) |
commit | e3841cf4a275a65ea6306e980da7dfef78a8c57d (patch) | |
tree | ae2b6f839780130f869a20b23df356251167868b /Source/CTest/cmCTestConfigureCommand.cxx | |
parent | f980a8049522782779b3a721c37f976de1e38dcc (diff) | |
download | CMake-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.cxx | 9 |
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 += "\""; |