Selaa lähdekoodia

cmGeneratorTarget: make GetManagedType() return 'Native' for static targets

Michael Stürmer 7 vuotta sitten
vanhempi
sitoutus
73ee599a82
1 muutettua tiedostoa jossa 5 lisäystä ja 3 poistoa
  1. 5 3
      Source/cmGeneratorTarget.cxx

+ 5 - 3
Source/cmGeneratorTarget.cxx

@@ -5510,12 +5510,14 @@ cmGeneratorTarget::ManagedType cmGeneratorTarget::GetManagedType(
   const std::string& config) const
 {
   // Only libraries and executables can be managed targets.
-  if (this->GetType() != cmStateEnums::SHARED_LIBRARY &&
-      this->GetType() != cmStateEnums::STATIC_LIBRARY &&
-      this->GetType() != cmStateEnums::EXECUTABLE) {
+  if (this->GetType() > cmStateEnums::SHARED_LIBRARY) {
     return ManagedType::Undefined;
   }
 
+  if (this->GetType() == cmStateEnums::STATIC_LIBRARY) {
+    return ManagedType::Native;
+  }
+
   // Check imported target.
   if (this->IsImported()) {
     if (cmGeneratorTarget::ImportInfo const* info =