From 0dcef68cd8961f8b3d89edbf46093949778daac8 Mon Sep 17 00:00:00 2001 From: Sebastian Holtermann Date: Sat, 23 Mar 2019 16:42:11 +0100 Subject: cmTarget: Move member `InstallPath` to impl --- Source/cmInstallTargetsCommand.cxx | 2 +- Source/cmTarget.cxx | 11 +++++++++++ Source/cmTarget.h | 5 ++--- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/Source/cmInstallTargetsCommand.cxx b/Source/cmInstallTargetsCommand.cxx index d721ca0..8f417db 100644 --- a/Source/cmInstallTargetsCommand.cxx +++ b/Source/cmInstallTargetsCommand.cxx @@ -40,7 +40,7 @@ bool cmInstallTargetsCommand::InitialPass(std::vector const& args, } else { cmTargets::iterator ti = tgts.find(*s); if (ti != tgts.end()) { - ti->second.SetInstallPath(args[0].c_str()); + ti->second.SetInstallPath(args[0]); ti->second.SetRuntimeInstallPath(runtime_dir.c_str()); ti->second.SetHaveInstallRule(true); } else { diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index ebf5e6d..fa0e3e7 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -169,6 +169,7 @@ public: cmMakefile* Makefile; cmPolicies::PolicyMap PolicyMap; std::string Name; + std::string InstallPath; cmPropertyMap Properties; std::set> Utilities; std::set SystemIncludeDirectories; @@ -773,6 +774,16 @@ void cmTarget::GetTllSignatureTraces(std::ostream& s, TLLSignature sig) const } } +std::string const& cmTarget::GetInstallPath() const +{ + return impl->InstallPath; +} + +void cmTarget::SetInstallPath(std::string const& name) +{ + impl->InstallPath = name; +} + cmTarget::LinkLibraryVectorType const& cmTarget::GetOriginalLinkLibraries() const { diff --git a/Source/cmTarget.h b/Source/cmTarget.h index f9dd83e..7dfedf1 100644 --- a/Source/cmTarget.h +++ b/Source/cmTarget.h @@ -154,8 +154,8 @@ public: * Set the path where this target should be installed. This is relative to * INSTALL_PREFIX */ - std::string GetInstallPath() const { return this->InstallPath; } - void SetInstallPath(const char* name) { this->InstallPath = name; } + std::string const& GetInstallPath() const; + void SetInstallPath(std::string const& name); /** * Set the path where this target (if it has a runtime part) should be @@ -297,7 +297,6 @@ private: private: bool IsGeneratorProvided; - std::string InstallPath; std::string RuntimeInstallPath; std::vector PreBuildCommands; std::vector PreLinkCommands; -- cgit v0.12