summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-07-15 11:41:43 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-07-15 11:41:52 (GMT)
commitd7e53b427428bc23778d1b094e8893df4573e22e (patch)
treee0a3870052ce31b0ecac6c0dc4631684d22d62f6 /Source/cmTarget.cxx
parenta92b7fd46bcf1ecd255290d84c691a244c8ecb26 (diff)
parent7ff9ab3b101b131bd4a91a459f66ce27f97f4757 (diff)
downloadCMake-d7e53b427428bc23778d1b094e8893df4573e22e.zip
CMake-d7e53b427428bc23778d1b094e8893df4573e22e.tar.gz
CMake-d7e53b427428bc23778d1b094e8893df4573e22e.tar.bz2
Merge topic 'cleanup-gen-lookups'
7ff9ab3b10 Makefile: De-duplicate executable link rule lookup 79f5ef19fe De-duplicate checks for whether a platform uses Windows DLLs 22d3eb5d5e Refactor checks for whether a target has an import library Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3550
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx13
1 files changed, 9 insertions, 4 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 28d8c64..773487e 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -170,7 +170,7 @@ public:
cmPropertyMap Properties;
bool IsGeneratorProvided;
bool HaveInstallRule;
- bool DLLPlatform;
+ bool IsDLLPlatform;
bool IsAndroid;
bool IsImportedTarget;
bool ImportedGloballyVisible;
@@ -218,7 +218,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);
@@ -226,7 +226,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.
@@ -1659,6 +1659,11 @@ cmPropertyMap const& cmTarget::GetProperties() const
return impl->Properties;
}
+bool cmTarget::IsDLLPlatform() const
+{
+ return impl->IsDLLPlatform;
+}
+
bool cmTarget::IsImported() const
{
return impl->IsImportedTarget;
@@ -1874,7 +1879,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()));