Browse Source

cmLocalGenerator: Extract definition retrieval out of loop

pull/275/head
Stephen Kelly 9 years ago
committed by Brad King
parent
commit
3d0e95f64c
  1. 5
      Source/cmLocalGenerator.cxx

5
Source/cmLocalGenerator.cxx

@ -1176,12 +1176,13 @@ void cmLocalGenerator::GetTargetFlags(
!(this->Makefile->IsOn("CYGWIN") || this->Makefile->IsOn("MINGW"))) {
std::vector<cmSourceFile*> sources;
target->GetSourceFiles(sources, buildType);
std::string defFlag =
this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG");
for (std::vector<cmSourceFile*>::const_iterator i = sources.begin();
i != sources.end(); ++i) {
cmSourceFile* sf = *i;
if (sf->GetExtension() == "def") {
linkFlags +=
this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG");
linkFlags += defFlag;
linkFlags += this->ConvertToOutputFormat(
cmSystemTools::CollapseFullPath(sf->GetFullPath()), SHELL);
linkFlags += " ";

Loading…
Cancel
Save