| 5715 | } |
| 5716 | |
| 5717 | cmGeneratorTarget::ManagedType cmGeneratorTarget::GetManagedType( |
| 5718 | std::string const& config) const |
| 5719 | { |
| 5720 | // Only libraries and executables can be managed targets. |
| 5721 | if (this->GetType() > cmStateEnums::SHARED_LIBRARY) { |
| 5722 | return ManagedType::Undefined; |
| 5723 | } |
| 5724 | |
| 5725 | if (this->GetType() == cmStateEnums::STATIC_LIBRARY) { |
| 5726 | return ManagedType::Native; |
| 5727 | } |
| 5728 | |
| 5729 | // Check imported target. |
| 5730 | if (this->IsImported()) { |
| 5731 | if (cmGeneratorTarget::ImportInfo const* info = |
| 5732 | this->GetImportInfo(config)) { |
| 5733 | return info->Managed; |
| 5734 | } |
| 5735 | return ManagedType::Undefined; |
| 5736 | } |
| 5737 | |
| 5738 | // Check for explicitly set clr target property. |
| 5739 | if (cmValue clr = this->GetProperty("COMMON_LANGUAGE_RUNTIME")) { |
| 5740 | return this->CheckManagedType(*clr); |
| 5741 | } |
| 5742 | |
| 5743 | // C# targets are always managed. This language specific check |
| 5744 | // is added to avoid that the COMMON_LANGUAGE_RUNTIME target property |
| 5745 | // has to be set manually for C# targets. |
| 5746 | return this->IsCSharpOnly() ? ManagedType::Managed : ManagedType::Native; |
| 5747 | } |
| 5748 | |
| 5749 | bool cmGeneratorTarget::AddHeaderSetVerification() |
| 5750 | { |
no test coverage detected