summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-03-23 14:45:44 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2019-03-23 20:45:09 (GMT)
commit3c09bf0fa7139be0215224ef85a4c2d3c38227f0 (patch)
tree581c5ae319130348670b0bb79a0f9a81332c2264
parent856a271fb7023e5ee1a251a9ebe55c91072d9cf6 (diff)
downloadCMake-3c09bf0fa7139be0215224ef85a4c2d3c38227f0.zip
CMake-3c09bf0fa7139be0215224ef85a4c2d3c38227f0.tar.gz
CMake-3c09bf0fa7139be0215224ef85a4c2d3c38227f0.tar.bz2
cmTarget: Move member `Utilities` to impl
-rw-r--r--Source/cmTarget.cxx16
-rw-r--r--Source/cmTarget.h11
2 files changed, 15 insertions, 12 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 1638c64..8244c84 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -168,6 +168,7 @@ public:
cmStateEnums::TargetType TargetType;
cmMakefile* Makefile;
cmPropertyMap Properties;
+ std::set<BT<std::string>> Utilities;
std::set<std::string> SystemIncludeDirectories;
std::vector<std::string> IncludeDirectoriesEntries;
std::vector<cmListFileBacktrace> IncludeDirectoriesBacktraces;
@@ -481,10 +482,15 @@ cmGlobalGenerator* cmTarget::GetGlobalGenerator() const
return impl->Makefile->GetGlobalGenerator();
}
-void cmTarget::AddUtility(std::string const& u, cmMakefile* mf)
+void cmTarget::AddUtility(std::string const& name, cmMakefile* mf)
{
- BT<std::string> util(u, mf ? mf->GetBacktrace() : cmListFileBacktrace());
- this->Utilities.insert(util);
+ impl->Utilities.insert(
+ BT<std::string>(name, mf ? mf->GetBacktrace() : cmListFileBacktrace()));
+}
+
+std::set<BT<std::string>> const& cmTarget::GetUtilities() const
+{
+ return impl->Utilities;
}
cmListFileBacktrace const& cmTarget::GetBacktrace() const
@@ -1461,12 +1467,12 @@ const char* cmTarget::GetProperty(const std::string& prop) const
return output.c_str();
}
if (prop == propMANUALLY_ADDED_DEPENDENCIES) {
- if (this->Utilities.empty()) {
+ if (impl->Utilities.empty()) {
return nullptr;
}
static std::string output;
- output = cmJoin(this->Utilities, ";");
+ output = cmJoin(impl->Utilities, ";");
return output.c_str();
}
if (prop == propIMPORTED) {
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index dca3dd4..f552d23 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -184,16 +184,14 @@ public:
bool GetIsGeneratorProvided() const { return this->IsGeneratorProvided; }
void SetIsGeneratorProvided(bool igp) { this->IsGeneratorProvided = igp; }
- /** Add a utility on which this project depends. A utility is an executable
+ /**
+ * Add a utility on which this project depends. A utility is an executable
* name as would be specified to the ADD_EXECUTABLE or UTILITY_SOURCE
* commands. It is not a full path nor does it have an extension.
*/
- void AddUtility(std::string const& u, cmMakefile* mf = nullptr);
+ void AddUtility(std::string const& name, cmMakefile* mf = nullptr);
///! Get the utilities used by this target
- std::set<BT<std::string>> const& GetUtilities() const
- {
- return this->Utilities;
- }
+ std::set<BT<std::string>> const& GetUtilities() const;
///! Set/Get a property of this target file
void SetProperty(const std::string& prop, const char* value);
@@ -301,7 +299,6 @@ private:
private:
bool IsGeneratorProvided;
- std::set<BT<std::string>> Utilities;
cmPolicies::PolicyMap PolicyMap;
std::string Name;
std::string InstallPath;