diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-05-05 19:50:39 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-05-14 18:30:09 (GMT) |
commit | 9486769866661e3aa76dd588ca5a7466e2969dc3 (patch) | |
tree | 56cbe397c6a522aaf84990c5e8603cba81d5a37f /Source/cmTestGenerator.cxx | |
parent | a3139d4b1512195485cde49d919a13cdaec62660 (diff) | |
download | CMake-9486769866661e3aa76dd588ca5a7466e2969dc3.zip CMake-9486769866661e3aa76dd588ca5a7466e2969dc3.tar.gz CMake-9486769866661e3aa76dd588ca5a7466e2969dc3.tar.bz2 |
Don't use a cmLocalGenerator instance to call static methods.
Diffstat (limited to 'Source/cmTestGenerator.cxx')
-rw-r--r-- | Source/cmTestGenerator.cxx | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/Source/cmTestGenerator.cxx b/Source/cmTestGenerator.cxx index add80fa..7e11d8c 100644 --- a/Source/cmTestGenerator.cxx +++ b/Source/cmTestGenerator.cxx @@ -82,7 +82,6 @@ void cmTestGenerator::GenerateScriptForConfig(std::ostream& os, // be translated. std::string exe = command[0]; cmMakefile* mf = this->Test->GetMakefile(); - cmLocalGenerator* lg = mf->GetLocalGenerator(); cmTarget* target = mf->FindTargetToUse(exe); if(target && target->GetType() == cmTarget::EXECUTABLE) { @@ -98,13 +97,13 @@ void cmTestGenerator::GenerateScriptForConfig(std::ostream& os, cmSystemTools::ExpandListArgument(emulator, emulatorWithArgs); std::string emulatorExe(emulatorWithArgs[0]); cmSystemTools::ConvertToUnixSlashes(emulatorExe); - os << lg->EscapeForCMake(emulatorExe) << " "; + os << cmLocalGenerator::EscapeForCMake(emulatorExe) << " "; for(std::vector<std::string>::const_iterator ei = emulatorWithArgs.begin()+1; ei != emulatorWithArgs.end(); ++ei) { - os << lg->EscapeForCMake(*ei) << " "; + os << cmLocalGenerator::EscapeForCMake(*ei) << " "; } } } @@ -116,11 +115,12 @@ void cmTestGenerator::GenerateScriptForConfig(std::ostream& os, } // Generate the command line with full escapes. - os << lg->EscapeForCMake(exe); + os << cmLocalGenerator::EscapeForCMake(exe); for(std::vector<std::string>::const_iterator ci = command.begin()+1; ci != command.end(); ++ci) { - os << " " << lg->EscapeForCMake(ge.Parse(*ci)->Evaluate(mf, config)); + os << " " << cmLocalGenerator::EscapeForCMake( + ge.Parse(*ci)->Evaluate(mf, config)); } // Finish the test command. @@ -136,7 +136,7 @@ void cmTestGenerator::GenerateScriptForConfig(std::ostream& os, i != pm.end(); ++i) { os << " " << i->first - << " " << lg->EscapeForCMake( + << " " << cmLocalGenerator::EscapeForCMake( ge.Parse(i->second.GetValue())->Evaluate(mf, config)); } os << ")" << std::endl; @@ -197,8 +197,6 @@ void cmTestGenerator::GenerateOldStyle(std::ostream& fout, fout << ")" << std::endl; // Output properties for the test. - cmMakefile* mf = this->Test->GetMakefile(); - cmLocalGenerator* lg = mf->GetLocalGenerator(); cmPropertyMap& pm = this->Test->GetProperties(); if(!pm.empty()) { @@ -208,7 +206,7 @@ void cmTestGenerator::GenerateOldStyle(std::ostream& fout, i != pm.end(); ++i) { fout << " " << i->first - << " " << lg->EscapeForCMake(i->second.GetValue()); + << " " << cmLocalGenerator::EscapeForCMake(i->second.GetValue()); } fout << ")" << std::endl; } |