From b397eae82e14fdf75eddcbfd022d9f2d5933eb1e Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 24 Oct 2015 09:29:49 +0200 Subject: cmGeneratorTarget: Move LinkLanguagePropagatesToDependents from cmTarget --- Source/cmGeneratorExpressionNode.cxx | 2 +- Source/cmGeneratorTarget.cxx | 4 ++-- Source/cmGeneratorTarget.h | 3 +++ Source/cmTarget.h | 3 --- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 7e75d93..df6e3fb 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -999,7 +999,7 @@ static const struct TargetPropertyNode : public cmGeneratorExpressionNode if (propertyName == "LINKER_LANGUAGE") { - if (target->Target->LinkLanguagePropagatesToDependents() && + if (target->LinkLanguagePropagatesToDependents() && dagCheckerParent && (dagCheckerParent->EvaluatingLinkLibraries() || dagCheckerParent->EvaluatingSources())) { diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index eb433f5..651c89c 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -4770,7 +4770,7 @@ void cmGeneratorTarget::ComputeLinkInterface(const std::string& config, iface.WrongConfigLibraries = impl->WrongConfigLibraries; } - if(this->Target->LinkLanguagePropagatesToDependents()) + if(this->LinkLanguagePropagatesToDependents()) { // Targets using this archive need its language runtime libraries. if(cmLinkImplementation const* impl = @@ -5485,7 +5485,7 @@ void cmGeneratorTarget::ComputeImportInfo(std::string const& desired_config, } // Get the link languages. - if(this->Target->LinkLanguagePropagatesToDependents()) + if(this->LinkLanguagePropagatesToDependents()) { std::string linkProp = "IMPORTED_LINK_INTERFACE_LANGUAGES"; linkProp += suffix; diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index 588ff33..58c3421 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -189,6 +189,9 @@ public: std::setconst& GetUtilities() const; cmListFileBacktrace const* GetUtilityBacktrace(const std::string& u) const; + bool LinkLanguagePropagatesToDependents() const + { return this->GetType() == cmState::STATIC_LIBRARY; } + /** Get the macro to define when building sources in this target. If no macro should be defined null is returned. */ const char* GetExportMacro() const; diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 17a1d4d..541e850 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -227,9 +227,6 @@ public: std::set const & GetSystemIncludeDirectories() const { return this->SystemIncludeDirectories; } - bool LinkLanguagePropagatesToDependents() const - { return this->TargetTypeValue == cmState::STATIC_LIBRARY; } - cmStringRange GetIncludeDirectoriesEntries() const; cmBacktraceRange GetIncludeDirectoriesBacktraces() const; -- cgit v0.12