CTest: Use -A option to pass generator platform selection

This is less verbose than defining CMAKE_GENERATOR_PLATFORM.
This commit is contained in:
Brad King 2014-09-12 10:37:07 -04:00
parent eb7d815649
commit 29bd843e8b
2 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@ int cmCTestBuildAndTestHandler::RunCMake(std::string* outstring,
} }
if(!this->BuildGeneratorPlatform.empty()) if(!this->BuildGeneratorPlatform.empty())
{ {
std::string platform = "-DCMAKE_GENERATOR_PLATFORM="; std::string platform = "-A";
platform += this->BuildGeneratorPlatform; platform += this->BuildGeneratorPlatform;
args.push_back(platform); args.push_back(platform);
} }

View File

@ -122,7 +122,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
this->Makefile->GetDefinition("CTEST_CMAKE_GENERATOR_PLATFORM"); this->Makefile->GetDefinition("CTEST_CMAKE_GENERATOR_PLATFORM");
if(cmakeGeneratorPlatform && *cmakeGeneratorPlatform) if(cmakeGeneratorPlatform && *cmakeGeneratorPlatform)
{ {
cmakeConfigureCommand += " \"-DCMAKE_GENERATOR_PLATFORM="; cmakeConfigureCommand += " \"-A";
cmakeConfigureCommand += cmakeGeneratorPlatform; cmakeConfigureCommand += cmakeGeneratorPlatform;
cmakeConfigureCommand += "\""; cmakeConfigureCommand += "\"";
} }