diff options
author | Matt Davies <matthew.davies@sony.com> | 2020-03-18 12:38:38 (GMT) |
---|---|---|
committer | Matt Davies <matthew.davies@sony.com> | 2020-03-20 16:16:58 (GMT) |
commit | f00e1b816d7220b700f7f8d24347d80b66e30c86 (patch) | |
tree | 7bef62d768870bea728b6553bdaa4e9f21371ce2 /Source/cmVisualStudio10TargetGenerator.cxx | |
parent | 2ce42f281fb5403cad398e886f0138d60f6a1dae (diff) | |
download | CMake-f00e1b816d7220b700f7f8d24347d80b66e30c86.zip CMake-f00e1b816d7220b700f7f8d24347d80b66e30c86.tar.gz CMake-f00e1b816d7220b700f7f8d24347d80b66e30c86.tar.bz2 |
VS: Add VS_SOURCE_SETTINGS_<tool> target property
VS_SOURCE_SETTINGS_<tool> is a list of key value pairs that get written as item
metadata for any file associated with <tool> for that target. The entire value
of VS_SOURCE_SETTINGS_<tool> is evaluated as a generator expression. VS_SETTINGS
can override settings specified in this property.
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index d67fe72..7eaf625 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1967,6 +1967,22 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(Elem& e1, } } + if (ParsedToolTargetSettings.find(tool) == ParsedToolTargetSettings.end()) { + const char* toolTargetProperty = + this->GeneratorTarget->Target->GetProperty("VS_SOURCE_SETTINGS_" + + std::string(tool)); + ConfigToSettings toolTargetSettings; + ParseSettingsProperty(toolTargetProperty, toolTargetSettings); + + ParsedToolTargetSettings[tool] = toolTargetSettings; + } + + for (const auto& configToSetting : ParsedToolTargetSettings[tool]) { + for (const auto& setting : configToSetting.second) { + toolSettings[configToSetting.first][setting.first] = setting.second; + } + } + ParseSettingsProperty(sf->GetProperty("VS_SETTINGS"), toolSettings); if (!toolSettings.empty()) { |