diff options
author | Anas Nashif <anas.nashif@intel.com> | 2013-08-13 07:48:01 -0400 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2013-08-13 07:48:01 -0400 |
commit | 297c63fa65327491a2b50e521b661c5835a19fe4 (patch) | |
tree | cf30d58014e240eb5e4417727d8f137cdbe75828 /Source/CTest/cmCTestBuildAndTestHandler.cxx | |
parent | ef8aa19c33e83ff019595fd7f8fdc29c35c336a3 (diff) | |
download | cmake-297c63fa65327491a2b50e521b661c5835a19fe4.tar.gz cmake-297c63fa65327491a2b50e521b661c5835a19fe4.tar.bz2 cmake-297c63fa65327491a2b50e521b661c5835a19fe4.zip |
Imported Upstream version 2.8.11.2upstream/2.8.11.2sandbox/pcoval/previous/upstream
Diffstat (limited to 'Source/CTest/cmCTestBuildAndTestHandler.cxx')
-rw-r--r-- | Source/CTest/cmCTestBuildAndTestHandler.cxx | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/Source/CTest/cmCTestBuildAndTestHandler.cxx b/Source/CTest/cmCTestBuildAndTestHandler.cxx index 554efb5bb..4fa3c53b9 100644 --- a/Source/CTest/cmCTestBuildAndTestHandler.cxx +++ b/Source/CTest/cmCTestBuildAndTestHandler.cxx @@ -67,6 +67,12 @@ int cmCTestBuildAndTestHandler::RunCMake(std::string* outstring, generator += this->BuildGenerator; args.push_back(generator); } + if(this->BuildGeneratorToolset.size()) + { + std::string toolset = "-T"; + toolset += this->BuildGeneratorToolset; + args.push_back(toolset); + } const char* config = 0; if ( this->CTest->GetConfigType().size() > 0 ) @@ -229,10 +235,14 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring) // should we cmake? cmake cm; cm.SetProgressCallback(CMakeProgressCallback, &cmakeOutString); - cm.SetGlobalGenerator(cm.CreateGlobalGenerator( - this->BuildGenerator.c_str())); - if(!this->BuildNoCMake) + if(this->BuildNoCMake) + { + cm.SetGlobalGenerator(cm.CreateGlobalGenerator( + this->BuildGenerator.c_str())); + cm.SetGeneratorToolset(this->BuildGeneratorToolset); + } + else { // do the cmake step, no timeout here since it is not a sub process if (this->RunCMake(outstring,out,cmakeOutString,cwd,&cm)) @@ -466,11 +476,17 @@ int cmCTestBuildAndTestHandler::ProcessCommandLineArguments( idx++; this->Timeout = atof(allArgs[idx].c_str()); } - if(currentArg.find("--build-generator",0) == 0 && idx < allArgs.size() - 1) + if(currentArg == "--build-generator" && idx < allArgs.size() - 1) { idx++; this->BuildGenerator = allArgs[idx]; } + if(currentArg == "--build-generator-toolset" && + idx < allArgs.size() - 1) + { + idx++; + this->BuildGeneratorToolset = allArgs[idx]; + } if(currentArg.find("--build-project",0) == 0 && idx < allArgs.size() - 1) { idx++; |