diff options
author | Brad King <brad.king@kitware.com> | 2019-07-12 17:36:15 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-07-12 21:35:49 (GMT) |
commit | 79f5ef19fe418efe2d9bfc55fcd16dfd75f18d49 (patch) | |
tree | 59b8b9e5e496443b9751533cb38398fb63cca5dc /Source/cmTarget.cxx | |
parent | 22d3eb5d5e4ce9c6371ab709655928552453fbda (diff) | |
download | CMake-79f5ef19fe418efe2d9bfc55fcd16dfd75f18d49.zip CMake-79f5ef19fe418efe2d9bfc55fcd16dfd75f18d49.tar.gz CMake-79f5ef19fe418efe2d9bfc55fcd16dfd75f18d49.tar.bz2 |
De-duplicate checks for whether a platform uses Windows DLLs
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index b10b30f..2237d9b 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -168,7 +168,7 @@ public: cmPropertyMap Properties; bool IsGeneratorProvided; bool HaveInstallRule; - bool DLLPlatform; + bool IsDLLPlatform; bool IsAndroid; bool IsImportedTarget; bool ImportedGloballyVisible; @@ -216,7 +216,7 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, impl->Name = name; impl->IsGeneratorProvided = false; impl->HaveInstallRule = false; - impl->DLLPlatform = false; + impl->IsDLLPlatform = false; impl->IsAndroid = false; impl->IsImportedTarget = (vis == VisibilityImported || vis == VisibilityImportedGlobally); @@ -224,7 +224,7 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type, impl->BuildInterfaceIncludesAppended = false; // Check whether this is a DLL platform. - impl->DLLPlatform = + impl->IsDLLPlatform = !impl->Makefile->GetSafeDefinition("CMAKE_IMPORT_LIBRARY_SUFFIX").empty(); // Check whether we are targeting an Android platform. @@ -1657,6 +1657,11 @@ cmPropertyMap const& cmTarget::GetProperties() const return impl->Properties; } +bool cmTarget::IsDLLPlatform() const +{ + return impl->IsDLLPlatform; +} + bool cmTarget::IsImported() const { return impl->IsImportedTarget; @@ -1872,7 +1877,7 @@ bool cmTarget::GetMappedConfig(std::string const& desired_config, // If we needed to find one of the mapped configurations but did not // On a DLL platform there may be only IMPORTED_IMPLIB for a shared // library or an executable with exports. - bool allowImp = (impl->DLLPlatform && + bool allowImp = (this->IsDLLPlatform() && (this->GetType() == cmStateEnums::SHARED_LIBRARY || this->IsExecutableWithExports())); |