diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index f41243ec6..1483af719 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1708,6 +1708,16 @@ cmListFileBacktrace cmGeneratorTarget::GetBacktrace() const return this->Target->GetBacktrace(); } +//---------------------------------------------------------------------------- +bool cmGeneratorTarget::HaveWellDefinedOutputFiles() const +{ + return + this->GetType() == cmState::STATIC_LIBRARY || + this->GetType() == cmState::SHARED_LIBRARY || + this->GetType() == cmState::MODULE_LIBRARY || + this->GetType() == cmState::EXECUTABLE; +} + //---------------------------------------------------------------------------- const char* cmGeneratorTarget::GetExportMacro() const { @@ -4819,7 +4829,7 @@ cmGeneratorTarget::OutputInfo const* cmGeneratorTarget::GetOutputInfo( } // Only libraries and executables have well-defined output files. - if(!this->Target->HaveWellDefinedOutputFiles()) + if(!this->HaveWellDefinedOutputFiles()) { std::string msg = "cmGeneratorTarget::GetOutputInfo called for "; msg += this->GetName(); diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index b32bfd93c..26b229d17 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -196,6 +196,9 @@ public: std::string GetModuleDefinitionFile(const std::string& config) const; + /** @return whether this target have a well defined output file name. */ + bool HaveWellDefinedOutputFiles() const; + /** Link information from the transitive closure of the link implementation and the interfaces of its dependencies. */ struct LinkClosure diff --git a/Source/cmOSXBundleGenerator.cxx b/Source/cmOSXBundleGenerator.cxx index 490759ffb..e9dc43320 100644 --- a/Source/cmOSXBundleGenerator.cxx +++ b/Source/cmOSXBundleGenerator.cxx @@ -34,7 +34,7 @@ cmOSXBundleGenerator(cmGeneratorTarget* target, //---------------------------------------------------------------------------- bool cmOSXBundleGenerator::MustSkip() { - return !this->GT->Target->HaveWellDefinedOutputFiles(); + return !this->GT->HaveWellDefinedOutputFiles(); } //---------------------------------------------------------------------------- diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 58dea0328..63d3d072d 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1559,16 +1559,6 @@ void cmTarget::MarkAsImported() this->IsImportedTarget = true; } -//---------------------------------------------------------------------------- -bool cmTarget::HaveWellDefinedOutputFiles() const -{ - return - this->GetType() == cmState::STATIC_LIBRARY || - this->GetType() == cmState::SHARED_LIBRARY || - this->GetType() == cmState::MODULE_LIBRARY || - this->GetType() == cmState::EXECUTABLE; -} - //---------------------------------------------------------------------------- bool cmTarget::HandleLocationPropertyPolicy(cmMakefile* context) const { diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 865bc8dc3..26f0d638c 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -241,9 +241,6 @@ public: /** Get a backtrace from the creation of the target. */ cmListFileBacktrace const& GetBacktrace() const; - /** @return whether this target have a well defined output file name. */ - bool HaveWellDefinedOutputFiles() const; - void InsertInclude(std::string const& entry, cmListFileBacktrace const& bt, bool before = false);