From 1abc20d81df3ee9845904b356960870526fe3276 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 5 Aug 2015 18:47:35 +0200 Subject: cmGeneratorTarget: Move UsesDefaultOutputDir from cmTarget. --- Source/cmGeneratorTarget.cxx | 8 ++++++++ Source/cmGeneratorTarget.h | 4 ++++ Source/cmGlobalXCodeGenerator.cxx | 2 +- Source/cmTarget.cxx | 8 -------- Source/cmTarget.h | 4 ---- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index a2423cc..9f46909 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -4474,6 +4474,14 @@ std::string cmGeneratorTarget::GetDirectory(const std::string& config, } //---------------------------------------------------------------------------- +bool cmGeneratorTarget::UsesDefaultOutputDir(const std::string& config, + bool implib) const +{ + std::string dir; + return this->Target->ComputeOutputDir(config, implib, dir); +} + +//---------------------------------------------------------------------------- void cmGeneratorTarget::ComputeLinkInterfaceLibraries( const std::string& config, diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index b39ba9f..a1ad477 100644 --- a/Source/cmGeneratorTarget.h +++ b/Source/cmGeneratorTarget.h @@ -285,6 +285,10 @@ public: std::vector const* GetSourceDepends(cmSourceFile const* sf) const; + /** Return whether this target uses the default value for its output + directory. */ + bool UsesDefaultOutputDir(const std::string& config, bool implib) const; + /** Get the name of the pdb file for the target. */ std::string GetPDBName(const std::string& config="") const; diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 4144020..0370d74 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -1975,7 +1975,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target, { if(this->XcodeVersion >= 21) { - if(!target.UsesDefaultOutputDir(configName, false)) + if(!gtgt->UsesDefaultOutputDir(configName, false)) { std::string pncdir = gtgt->GetDirectory(configName); buildSettings->AddAttribute("CONFIGURATION_BUILD_DIR", diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 0fc0423..bf8b8a9 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -2667,14 +2667,6 @@ bool cmTarget::ComputePDBOutputDir(const std::string& kind, } //---------------------------------------------------------------------------- -bool cmTarget::UsesDefaultOutputDir(const std::string& config, - bool implib) const -{ - std::string dir; - return this->ComputeOutputDir(config, implib, dir); -} - -//---------------------------------------------------------------------------- std::string cmTarget::GetFrameworkVersion() const { assert(this->GetType() != INTERFACE_LIBRARY); diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 2f9a94b..3130660 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -312,10 +312,6 @@ public: /** Get a build-tree directory in which to place target support files. */ std::string GetSupportDirectory() const; - /** Return whether this target uses the default value for its output - directory. */ - bool UsesDefaultOutputDir(const std::string& config, bool implib) const; - /** @return whether this target have a well defined output file name. */ bool HaveWellDefinedOutputFiles() const; -- cgit v0.12