Browse Source

Teach check for single-language targets to consider all configurations

Brad King 6 years ago
parent
commit
bcaecf6bcd
2 changed files with 2 additions and 4 deletions
  1. 1 2
      Source/cmGeneratorTarget.cxx
  2. 1 2
      Source/cmGlobalVisualStudioGenerator.cxx

+ 1 - 2
Source/cmGeneratorTarget.cxx

@@ -6356,8 +6356,7 @@ bool cmGeneratorTarget::IsCSharpOnly() const
       this->GetType() != cmStateEnums::EXECUTABLE) {
       this->GetType() != cmStateEnums::EXECUTABLE) {
     return false;
     return false;
   }
   }
-  std::set<std::string> languages;
-  this->GetLanguages(languages, "");
+  std::set<std::string> languages = this->GetAllConfigCompileLanguages();
   // Consider an explicit linker language property, but *not* the
   // Consider an explicit linker language property, but *not* the
   // computed linker language that may depend on linked targets.
   // computed linker language that may depend on linked targets.
   const char* linkLang = this->GetProperty("LINKER_LANGUAGE");
   const char* linkLang = this->GetProperty("LINKER_LANGUAGE");

+ 1 - 2
Source/cmGlobalVisualStudioGenerator.cxx

@@ -810,8 +810,7 @@ bool cmGlobalVisualStudioGenerator::TargetIsFortranOnly(
 
 
   // If there's only one source language, Fortran has to be used
   // If there's only one source language, Fortran has to be used
   // in order for the sources to compile.
   // in order for the sources to compile.
-  std::set<std::string> languages;
-  gt->GetLanguages(languages, "");
+  std::set<std::string> languages = gt->GetAllConfigCompileLanguages();
   // Consider an explicit linker language property, but *not* the
   // Consider an explicit linker language property, but *not* the
   // computed linker language that may depend on linked targets.
   // computed linker language that may depend on linked targets.
   // This allows the project to control the language choice in
   // This allows the project to control the language choice in