Browse Source

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

Michael Stürmer 7 years ago
parent
commit
73ee599a82
1 changed files with 5 additions and 3 deletions
  1. 5 3
      Source/cmGeneratorTarget.cxx

+ 5 - 3
Source/cmGeneratorTarget.cxx

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