瀏覽代碼

cmLocalGenerator: Avoid using upper-case config when not necessary

Calls to `GetLinkerLanguage`, `GetSourceFiles`, etc. can accept
the original-case config name.
Brad King 5 年之前
父節點
當前提交
ff02a592bc
共有 1 個文件被更改,包括 3 次插入4 次删除
  1. 3 4
      Source/cmLocalGenerator.cxx

+ 3 - 4
Source/cmLocalGenerator.cxx

@@ -1357,7 +1357,7 @@ void cmLocalGenerator::GetTargetFlags(
     "CMAKE_SHARED_LINKER_FLAGS"; // default to shared library
     "CMAKE_SHARED_LINKER_FLAGS"; // default to shared library
 
 
   const std::string linkLanguage =
   const std::string linkLanguage =
-    linkLineComputer->GetLinkerLanguage(target, configUpper);
+    linkLineComputer->GetLinkerLanguage(target, config);
 
 
   switch (target->GetType()) {
   switch (target->GetType()) {
     case cmStateEnums::STATIC_LIBRARY:
     case cmStateEnums::STATIC_LIBRARY:
@@ -1386,7 +1386,7 @@ void cmLocalGenerator::GetTargetFlags(
             !(this->Makefile->IsOn("CYGWIN") ||
             !(this->Makefile->IsOn("CYGWIN") ||
               this->Makefile->IsOn("MINGW"))) {
               this->Makefile->IsOn("MINGW"))) {
           std::vector<cmSourceFile*> sources;
           std::vector<cmSourceFile*> sources;
-          target->GetSourceFiles(sources, configUpper);
+          target->GetSourceFiles(sources, config);
           std::string defFlag =
           std::string defFlag =
             this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG");
             this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG");
           for (cmSourceFile* sf : sources) {
           for (cmSourceFile* sf : sources) {
@@ -1461,8 +1461,7 @@ void cmLocalGenerator::GetTargetFlags(
         }
         }
       }
       }
 
 
-      this->AddLanguageFlagsForLinking(flags, target, linkLanguage,
-                                       configUpper);
+      this->AddLanguageFlagsForLinking(flags, target, linkLanguage, config);
       if (pcli) {
       if (pcli) {
         this->OutputLinkLibraries(pcli, linkLineComputer, linkLibs,
         this->OutputLinkLibraries(pcli, linkLineComputer, linkLibs,
                                   frameworkPath, linkPath);
                                   frameworkPath, linkPath);