summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-06-02 12:02:14 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-06-02 12:02:24 (GMT)
commita432b1075c8808c6e4c925d3f4d4ce94c5477bab (patch)
treecbf85da9bdbfdd82e2e0fa6d210478840f82b2da /Source/cmGeneratorTarget.cxx
parentec7b5f21eef8bc0d6da729aa0f61ddccc7a06f3b (diff)
parent7ed8c9ebe33ccafc41ec9e096bf2884d617a0ebf (diff)
downloadCMake-a432b1075c8808c6e4c925d3f4d4ce94c5477bab.zip
CMake-a432b1075c8808c6e4c925d3f4d4ce94c5477bab.tar.gz
CMake-a432b1075c8808c6e4c925d3f4d4ce94c5477bab.tar.bz2
Merge topic 'getdef-expand'
7ed8c9ebe3 cmMakefile: add GetDefExpandList() that splits value into std::vector Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4819
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx63
1 files changed, 18 insertions, 45 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index dcdaaea..250910a 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -1486,11 +1486,8 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetSourceFilePaths(
}
std::vector<std::string> debugProperties;
- const char* debugProp =
- this->Makefile->GetDefinition("CMAKE_DEBUG_TARGET_PROPERTIES");
- if (debugProp) {
- cmExpandList(debugProp, debugProperties);
- }
+ this->Makefile->GetDefExpandList("CMAKE_DEBUG_TARGET_PROPERTIES",
+ debugProperties);
bool debugSources =
!this->DebugSourcesDone && cm::contains(debugProperties, "SOURCES");
@@ -3306,11 +3303,8 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetIncludeDirectories(
nullptr, nullptr);
std::vector<std::string> debugProperties;
- const char* debugProp =
- this->Makefile->GetDefinition("CMAKE_DEBUG_TARGET_PROPERTIES");
- if (debugProp) {
- cmExpandList(debugProp, debugProperties);
- }
+ this->Makefile->GetDefExpandList("CMAKE_DEBUG_TARGET_PROPERTIES",
+ debugProperties);
bool debugIncludes = !this->DebugIncludesDone &&
cm::contains(debugProperties, "INCLUDE_DIRECTORIES");
@@ -3493,11 +3487,8 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetCompileOptions(
nullptr);
std::vector<std::string> debugProperties;
- const char* debugProp =
- this->Makefile->GetDefinition("CMAKE_DEBUG_TARGET_PROPERTIES");
- if (debugProp) {
- cmExpandList(debugProp, debugProperties);
- }
+ this->Makefile->GetDefExpandList("CMAKE_DEBUG_TARGET_PROPERTIES",
+ debugProperties);
bool debugOptions = !this->DebugCompileOptionsDone &&
cm::contains(debugProperties, "COMPILE_OPTIONS");
@@ -3538,11 +3529,8 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetCompileFeatures(
nullptr);
std::vector<std::string> debugProperties;
- const char* debugProp =
- this->Makefile->GetDefinition("CMAKE_DEBUG_TARGET_PROPERTIES");
- if (debugProp) {
- cmExpandList(debugProp, debugProperties);
- }
+ this->Makefile->GetDefExpandList("CMAKE_DEBUG_TARGET_PROPERTIES",
+ debugProperties);
bool debugFeatures = !this->DebugCompileFeaturesDone &&
cm::contains(debugProperties, "COMPILE_FEATURES");
@@ -3585,11 +3573,8 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetCompileDefinitions(
nullptr, nullptr);
std::vector<std::string> debugProperties;
- const char* debugProp =
- this->Makefile->GetDefinition("CMAKE_DEBUG_TARGET_PROPERTIES");
- if (debugProp) {
- cmExpandList(debugProp, debugProperties);
- }
+ this->Makefile->GetDefExpandList("CMAKE_DEBUG_TARGET_PROPERTIES",
+ debugProperties);
bool debugDefines = !this->DebugCompileDefinitionsDone &&
cm::contains(debugProperties, "COMPILE_DEFINITIONS");
@@ -3645,11 +3630,8 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetPrecompileHeaders(
nullptr, nullptr);
std::vector<std::string> debugProperties;
- const char* debugProp =
- this->Makefile->GetDefinition("CMAKE_DEBUG_TARGET_PROPERTIES");
- if (debugProp) {
- cmExpandList(debugProp, debugProperties);
- }
+ this->Makefile->GetDefExpandList("CMAKE_DEBUG_TARGET_PROPERTIES",
+ debugProperties);
bool debugDefines = !this->DebugPrecompileHeadersDone &&
std::find(debugProperties.begin(), debugProperties.end(),
@@ -4024,11 +4006,8 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetLinkOptions(
nullptr);
std::vector<std::string> debugProperties;
- const char* debugProp =
- this->Makefile->GetDefinition("CMAKE_DEBUG_TARGET_PROPERTIES");
- if (debugProp) {
- cmExpandList(debugProp, debugProperties);
- }
+ this->Makefile->GetDefExpandList("CMAKE_DEBUG_TARGET_PROPERTIES",
+ debugProperties);
bool debugOptions = !this->DebugLinkOptionsDone &&
cm::contains(debugProperties, "LINK_OPTIONS");
@@ -4286,11 +4265,8 @@ std::vector<BT<std::string>> cmGeneratorTarget::GetLinkDirectories(
nullptr);
std::vector<std::string> debugProperties;
- const char* debugProp =
- this->Makefile->GetDefinition("CMAKE_DEBUG_TARGET_PROPERTIES");
- if (debugProp) {
- cmExpandList(debugProp, debugProperties);
- }
+ this->Makefile->GetDefExpandList("CMAKE_DEBUG_TARGET_PROPERTIES",
+ debugProperties);
bool debugDirectories = !this->DebugLinkDirectoriesDone &&
cm::contains(debugProperties, "LINK_DIRECTORIES");
@@ -5811,11 +5787,8 @@ void cmGeneratorTarget::ReportPropertyOrigin(
const std::string& compatibilityType) const
{
std::vector<std::string> debugProperties;
- const char* debugProp = this->Target->GetMakefile()->GetDefinition(
- "CMAKE_DEBUG_TARGET_PROPERTIES");
- if (debugProp) {
- cmExpandList(debugProp, debugProperties);
- }
+ this->Target->GetMakefile()->GetDefExpandList(
+ "CMAKE_DEBUG_TARGET_PROPERTIES", debugProperties);
bool debugOrigin = !this->DebugCompatiblePropertiesDone[p] &&
cm::contains(debugProperties, p);