summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-03-06 19:03:55 (GMT)
committerBrad King <brad.king@kitware.com>2018-03-06 19:38:23 (GMT)
commit2124a1364a620084c24d5654c2106e5aea88c55c (patch)
tree7c9548fbfc9920b87b6a42c7c196b86dabff8440
parent1c5bfab532e96bc728691a15b092d388a9e0a0d5 (diff)
downloadCMake-2124a1364a620084c24d5654c2106e5aea88c55c.zip
CMake-2124a1364a620084c24d5654c2106e5aea88c55c.tar.gz
CMake-2124a1364a620084c24d5654c2106e5aea88c55c.tar.bz2
cmTarget: Remove unnecessary RecordDependencies member
Inline the condition in the one remaining place it is checked.
-rw-r--r--Source/cmTarget.cxx13
-rw-r--r--Source/cmTarget.h1
2 files changed, 3 insertions, 11 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index b868e84..97f7847 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -186,14 +186,6 @@ cmTarget::cmTarget(std::string const& name, cmStateEnums::TargetType type,
this->ImportedGloballyVisible = vis == VisibilityImportedGlobally;
this->BuildInterfaceIncludesAppended = false;
- // only add dependency information for library targets
- if (this->TargetTypeValue >= cmStateEnums::STATIC_LIBRARY &&
- this->TargetTypeValue <= cmStateEnums::MODULE_LIBRARY) {
- this->RecordDependencies = true;
- } else {
- this->RecordDependencies = false;
- }
-
// Check whether this is a DLL platform.
this->DLLPlatform =
(this->Makefile->IsOn("WIN32") || this->Makefile->IsOn("CYGWIN") ||
@@ -736,7 +728,7 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf, const std::string& lib,
this->OriginalLinkLibraries.emplace_back(lib, llt);
}
- // Add the explicit dependency information for this target. This is
+ // Add the explicit dependency information for libraries. This is
// simply a set of libraries separated by ";". There should always
// be a trailing ";". These library names are not canonical, in that
// they may be "-framework x", "-ly", "/path/libz.a", etc.
@@ -744,7 +736,8 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf, const std::string& lib,
// may be purposefully duplicated to handle recursive dependencies,
// and we removing one instance will break the link line. Duplicates
// will be appropriately eliminated at emit time.
- if (this->RecordDependencies) {
+ if (this->TargetTypeValue >= cmStateEnums::STATIC_LIBRARY &&
+ this->TargetTypeValue <= cmStateEnums::MODULE_LIBRARY) {
std::string targetEntry = this->Name;
targetEntry += "_LIB_DEPENDS";
std::string dependencies;
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 56f8975..62c4e22 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -310,7 +310,6 @@ private:
cmTargetInternalPointer Internal;
cmStateEnums::TargetType TargetTypeValue;
bool HaveInstallRule;
- bool RecordDependencies;
bool DLLPlatform;
bool IsAndroid;
bool IsImportedTarget;