diff options
author | Brad King <brad.king@kitware.com> | 2014-09-05 19:14:13 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-09-05 19:18:21 (GMT) |
commit | 8d332091702f34fd1e6c1554f137ac6d85b15dc8 (patch) | |
tree | 40dbc7fe62f956230bac68faa359078466a3be69 /Source/CTest/cmCTestConfigureCommand.cxx | |
parent | b97736a23d5d83eb65b6ee0b0429ada9fb331c12 (diff) | |
download | CMake-8d332091702f34fd1e6c1554f137ac6d85b15dc8.zip CMake-8d332091702f34fd1e6c1554f137ac6d85b15dc8.tar.gz CMake-8d332091702f34fd1e6c1554f137ac6d85b15dc8.tar.bz2 |
CTest: Add options to set generator platform
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_PLATFORM to pass on as CMAKE_GENERATOR_PLATFORM.
The "ctest --build-and-test" mode already has "--build-generator" to
specify the -G option to CMake. Add a "--build-generator-platform" option
to specify a value to pass on as CMAKE_GENERATOR_PLATFORM.
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 1aa8768..8ab5037 100644 --- a/Source/CTest/cmCTestConfigureCommand.cxx +++ b/Source/CTest/cmCTestConfigureCommand.cxx @@ -118,6 +118,15 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler() cmakeConfigureCommand += cmakeGeneratorName; cmakeConfigureCommand += "\""; + const char* cmakeGeneratorPlatform = + this->Makefile->GetDefinition("CTEST_CMAKE_GENERATOR_PLATFORM"); + if(cmakeGeneratorPlatform && *cmakeGeneratorPlatform) + { + cmakeConfigureCommand += " \"-DCMAKE_GENERATOR_PLATFORM="; + cmakeConfigureCommand += cmakeGeneratorPlatform; + cmakeConfigureCommand += "\""; + } + const char* cmakeGeneratorToolset = this->Makefile->GetDefinition("CTEST_CMAKE_GENERATOR_TOOLSET"); if(cmakeGeneratorToolset && *cmakeGeneratorToolset) |