From 73ee599a8203271245ab7a55095eb92843768b54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20St=C3=BCrmer?= Date: Mon, 23 Apr 2018 07:16:04 +0200 Subject: cmGeneratorTarget: make GetManagedType() return 'Native' for static targets --- Source/cmGeneratorTarget.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index bf5ff65..799ae95 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/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 = -- cgit v0.12