From d48f69d0f5f265d1c091a614098cae3ff4325fbe Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 8 Oct 2016 12:21:37 +0200 Subject: cmLocalGenerator: Move flag determination up in the function This content is independent of any targets. --- Source/cmLocalGenerator.cxx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index 9e32fd3..aec658a 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -1419,6 +1419,15 @@ void cmLocalGenerator::OutputLinkLibraries( std::string libPathTerminator = this->Makefile->GetSafeDefinition("CMAKE_LIBRARY_PATH_TERMINATOR"); + // Add standard libraries for this language. + std::string standardLibsVar = "CMAKE_"; + standardLibsVar += cli.GetLinkLanguage(); + standardLibsVar += "_STANDARD_LIBRARIES"; + std::string stdLibString; + if (const char* stdLibs = this->Makefile->GetDefinition(standardLibsVar)) { + stdLibString = stdLibs; + } + // Append the framework search path flags. std::string fwSearchFlagVar = "CMAKE_"; fwSearchFlagVar += linkLanguage; @@ -1502,14 +1511,6 @@ void cmLocalGenerator::OutputLinkLibraries( fout << " "; } - // Add standard libraries for this language. - std::string standardLibsVar = "CMAKE_"; - standardLibsVar += cli.GetLinkLanguage(); - standardLibsVar += "_STANDARD_LIBRARIES"; - std::string stdLibString; - if (const char* stdLibs = this->Makefile->GetDefinition(standardLibsVar)) { - stdLibString = stdLibs; - } if (!stdLibString.empty()) { fout << stdLibString << " "; } -- cgit v0.12