From 1abc20d81df3ee9845904b356960870526fe3276 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 5 Aug 2015 18:47:35 +0200 Subject: [PATCH] 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 a2423cc57..9f4690958 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -4473,6 +4473,14 @@ std::string cmGeneratorTarget::GetDirectory(const std::string& config, return ""; } +//---------------------------------------------------------------------------- +bool cmGeneratorTarget::UsesDefaultOutputDir(const std::string& config, + bool implib) const +{ + std::string dir; + return this->Target->ComputeOutputDir(config, implib, dir); +} + //---------------------------------------------------------------------------- void cmGeneratorTarget::ComputeLinkInterfaceLibraries( diff --git a/Source/cmGeneratorTarget.h b/Source/cmGeneratorTarget.h index b39ba9fc0..a1ad47796 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 4144020f6..0370d74dd 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 0fc0423a5..bf8b8a93a 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -2666,14 +2666,6 @@ bool cmTarget::ComputePDBOutputDir(const std::string& kind, return true; } -//---------------------------------------------------------------------------- -bool cmTarget::UsesDefaultOutputDir(const std::string& config, - bool implib) const -{ - std::string dir; - return this->ComputeOutputDir(config, implib, dir); -} - //---------------------------------------------------------------------------- std::string cmTarget::GetFrameworkVersion() const { diff --git a/Source/cmTarget.h b/Source/cmTarget.h index 2f9a94b0a..313066008 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;