| 5095 | } |
| 5096 | |
| 5097 | bool 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 | |
| 5115 | bool cmGeneratorTarget::IsDotNetSdkTarget() const |
| 5116 | { |
no test coverage detected