MCPcopy Create free account
hub / github.com/Kitware/CMake / TargetIsFortranOnly

Method TargetIsFortranOnly

Source/cmGlobalVisualStudioGenerator.cxx:587–607  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

585 }
586}
587bool cmGlobalVisualStudioGenerator::TargetIsFortranOnly(
588 cmGeneratorTarget const* gt) const
589{
590 // If there's only one source language, Fortran has to be used
591 // in order for the sources to compile.
592 std::set<std::string> languages = gt->GetAllConfigCompileLanguages();
593 // Consider an explicit linker language property, but *not* the
594 // computed linker language that may depend on linked targets.
595 // This allows the project to control the language choice in
596 // a target with none of its own sources, e.g. when also using
597 // object libraries.
598 cmValue linkLang = gt->GetProperty("LINKER_LANGUAGE");
599 if (cmNonempty(linkLang)) {
600 languages.insert(*linkLang);
601 }
602
603 // Intel Fortran .vfproj files do support the resource compiler.
604 languages.erase("RC");
605
606 return languages.size() == 1 && *languages.begin() == "Fortran"_s;
607}
608
609bool cmGlobalVisualStudioGenerator::IsInSolution(
610 cmGeneratorTarget const* gt) const

Callers 4

CreateSolutionMethod · 0.95
GenerateTargetMethod · 0.80
GenerateTargetMethod · 0.80

Calls 7

cmNonemptyFunction · 0.85
eraseMethod · 0.80
GetPropertyMethod · 0.45
insertMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected