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

Method IsCSharpOnly

Source/cmGeneratorTarget.cxx:5097–5113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5095}
5096
5097bool cmGeneratorTarget::IsCSharpOnly() const
5098{
5099 // Only certain target types may compile CSharp.
5100 if (this->GetType() != cmStateEnums::SHARED_LIBRARY &&
5101 this->GetType() != cmStateEnums::STATIC_LIBRARY &&
5102 this->GetType() != cmStateEnums::EXECUTABLE) {
5103 return false;
5104 }
5105 std::set<std::string> languages = this->GetAllConfigCompileLanguages();
5106 // Consider an explicit linker language property, but *not* the
5107 // computed linker language that may depend on linked targets.
5108 cmValue linkLang = this->GetProperty("LINKER_LANGUAGE");
5109 if (cmNonempty(linkLang)) {
5110 languages.insert(*linkLang);
5111 }
5112 return languages.size() == 1 && languages.count("CSharp") > 0;
5113}
5114
5115bool cmGeneratorTarget::IsDotNetSdkTarget() const
5116{

Callers 5

GetManagedTypeMethod · 0.95
CreateSolutionMethod · 0.80
computeProjectTypeFunction · 0.80

Calls 7

GetTypeMethod · 0.95
GetPropertyMethod · 0.95
cmNonemptyFunction · 0.85
insertMethod · 0.45
sizeMethod · 0.45
countMethod · 0.45

Tested by

no test coverage detected