diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-05-30 12:00:00 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-05-30 12:59:20 (GMT) |
commit | 7ed8c9ebe33ccafc41ec9e096bf2884d617a0ebf (patch) | |
tree | b17167b762c3257baf362b515fbf1a8fece7b356 /Source/cmGeneratorTarget.cxx | |
parent | 6bb20b51c9af40372b6a818826613e965cde5f19 (diff) | |
download | CMake-7ed8c9ebe33ccafc41ec9e096bf2884d617a0ebf.zip CMake-7ed8c9ebe33ccafc41ec9e096bf2884d617a0ebf.tar.gz CMake-7ed8c9ebe33ccafc41ec9e096bf2884d617a0ebf.tar.bz2 |
cmMakefile: add GetDefExpandList() that splits value into std::vector
Combines cmMakefile:GetDefinition() and cmExpandList()
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 63 |
1 files changed, 18 insertions, 45 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index f2a51ab..f4372a1 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"); @@ -3305,11 +3302,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"); @@ -3492,11 +3486,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"); @@ -3537,11 +3528,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"); @@ -3584,11 +3572,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"); @@ -3644,11 +3629,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(), @@ -4025,11 +4007,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"); @@ -4287,11 +4266,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"); @@ -5812,11 +5788,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); |