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/cmCoreTryCompile.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/cmCoreTryCompile.cxx')
-rw-r--r-- | Source/cmCoreTryCompile.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index 1109aca..dd276a8 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -242,8 +242,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv) } // Detect languages to enable. - cmLocalGenerator* lg = this->Makefile->GetLocalGenerator(); - cmGlobalGenerator* gg = lg->GetGlobalGenerator(); + cmGlobalGenerator* gg = this->Makefile->GetGlobalGenerator(); std::set<std::string> testLangs; for(std::vector<std::string>::iterator si = sources.begin(); si != sources.end(); ++si) @@ -323,7 +322,7 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv) std::string langFlags = "CMAKE_" + *li + "_FLAGS"; const char* flags = this->Makefile->GetDefinition(langFlags); fprintf(fout, "set(CMAKE_%s_FLAGS %s)\n", li->c_str(), - lg->EscapeForCMake(flags?flags:"").c_str()); + cmLocalGenerator::EscapeForCMake(flags?flags:"").c_str()); fprintf(fout, "set(CMAKE_%s_FLAGS \"${CMAKE_%s_FLAGS}" " ${COMPILE_DEFINITIONS}\")\n", li->c_str(), li->c_str()); } @@ -356,7 +355,8 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> const& argv) const char* exeLinkFlags = this->Makefile->GetDefinition("CMAKE_EXE_LINKER_FLAGS"); fprintf(fout, "set(CMAKE_EXE_LINKER_FLAGS %s)\n", - lg->EscapeForCMake(exeLinkFlags?exeLinkFlags:"").c_str()); + cmLocalGenerator::EscapeForCMake( + exeLinkFlags ? exeLinkFlags : "").c_str()); } break; } fprintf(fout, "set(CMAKE_EXE_LINKER_FLAGS \"${CMAKE_EXE_LINKER_FLAGS}" |