summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-03-23 14:23:34 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2019-03-23 20:15:32 (GMT)
commit46075091d55334d04a2f11207cfedee10149b1d3 (patch)
treea08cf6e9d905ab4ed8e496bbf8e9e6026bacac20
parent2cd41046007de479f660a7794292105908276345 (diff)
downloadCMake-46075091d55334d04a2f11207cfedee10149b1d3.zip
CMake-46075091d55334d04a2f11207cfedee10149b1d3.tar.gz
CMake-46075091d55334d04a2f11207cfedee10149b1d3.tar.bz2
cmTarget: Move member `Properties` to impl class
-rw-r--r--Source/cmTarget.cxx13
-rw-r--r--Source/cmTarget.h8
2 files changed, 13 insertions, 8 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 74402da..ae29a05 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -21,6 +21,7 @@
#include "cmMessageType.h"
#include "cmMessenger.h"
#include "cmProperty.h"
+#include "cmPropertyMap.h"
#include "cmRange.h"
#include "cmSourceFile.h"
#include "cmSourceFileLocation.h"
@@ -166,6 +167,7 @@ class cmTargetInternals
public:
cmStateEnums::TargetType TargetType;
cmMakefile* Makefile;
+ cmPropertyMap Properties;
std::vector<std::string> IncludeDirectoriesEntries;
std::vector<cmListFileBacktrace> IncludeDirectoriesBacktraces;
std::vector<std::string> CompileOptionsEntries;
@@ -1050,7 +1052,7 @@ void cmTarget::SetProperty(const std::string& prop, const char* value)
impl->Makefile->IssueMessage(MessageType::FATAL_ERROR, e.str());
return;
} else {
- this->Properties.SetProperty(prop, value);
+ impl->Properties.SetProperty(prop, value);
}
}
@@ -1140,7 +1142,7 @@ void cmTarget::AppendProperty(const std::string& prop, const char* value,
impl->Makefile->IssueMessage(MessageType::FATAL_ERROR,
prop + " property may not be APPENDed.");
} else {
- this->Properties.AppendProperty(prop, value, asString);
+ impl->Properties.AppendProperty(prop, value, asString);
}
}
@@ -1484,7 +1486,7 @@ const char* cmTarget::GetProperty(const std::string& prop) const
}
}
- const char* retVal = this->Properties.GetPropertyValue(prop);
+ const char* retVal = impl->Properties.GetPropertyValue(prop);
if (!retVal) {
const bool chain =
impl->Makefile->GetState()->IsPropertyChained(prop, cmProperty::TARGET);
@@ -1510,6 +1512,11 @@ bool cmTarget::GetPropertyAsBool(const std::string& prop) const
return cmSystemTools::IsOn(this->GetProperty(prop));
}
+cmPropertyMap const& cmTarget::GetProperties() const
+{
+ return impl->Properties;
+}
+
const char* cmTarget::GetSuffixVariableInternal(
cmStateEnums::ArtifactType artifact) const
{
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 58ab255..a1245a8 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -16,13 +16,13 @@
#include "cmCustomCommand.h"
#include "cmListFileCache.h"
#include "cmPolicies.h"
-#include "cmPropertyMap.h"
#include "cmStateTypes.h"
#include "cmTargetLinkLibraryType.h"
class cmGlobalGenerator;
class cmMakefile;
class cmMessenger;
+class cmPropertyMap;
class cmSourceFile;
class cmTargetInternals;
@@ -208,6 +208,8 @@ public:
const char* GetComputedProperty(const std::string& prop,
cmMessenger* messenger,
cmListFileBacktrace const& context) const;
+ ///! Get all properties
+ cmPropertyMap const& GetProperties() const;
bool IsImported() const { return this->IsImportedTarget; }
bool IsImportedGloballyVisible() const
@@ -215,9 +217,6 @@ public:
return this->ImportedGloballyVisible;
}
- // Get the properties
- cmPropertyMap const& GetProperties() const { return this->Properties; }
-
bool GetMappedConfig(std::string const& desired_config, const char** loc,
const char** imp, std::string& suffix) const;
@@ -305,7 +304,6 @@ private:
private:
bool IsGeneratorProvided;
- cmPropertyMap Properties;
std::set<std::string> SystemIncludeDirectories;
std::set<BT<std::string>> Utilities;
cmPolicies::PolicyMap PolicyMap;