summaryrefslogtreecommitdiffstats
path: root/Source/cmVisualStudio10TargetGenerator.cxx
diff options
context:
space:
mode:
authorJeremiah van Oosten <jpvanoosten@hotmail.com>2021-01-05 09:58:11 (GMT)
committerJeremiah van Oosten <jpvanoosten@hotmail.com>2021-01-05 16:07:01 (GMT)
commit67775aaf5b836c728dc8ee4bb9f0cbf2ca110411 (patch)
tree939e115e0c1bf3e5592a79479f1647bf9d3348da /Source/cmVisualStudio10TargetGenerator.cxx
parent764ce15ffbe232347a41e40509a2e485bae226f6 (diff)
downloadCMake-67775aaf5b836c728dc8ee4bb9f0cbf2ca110411.zip
CMake-67775aaf5b836c728dc8ee4bb9f0cbf2ca110411.tar.gz
CMake-67775aaf5b836c728dc8ee4bb9f0cbf2ca110411.tar.bz2
VS: Add genex support to VS_SHADER_FLAGS
Diffstat (limited to 'Source/cmVisualStudio10TargetGenerator.cxx')
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 9c41504..a93a78a 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1897,8 +1897,15 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(Elem& e1,
}
// Figure out if there's any additional flags to use
if (cmProp saf = sf->GetProperty("VS_SHADER_FLAGS")) {
+ cmGeneratorExpression ge;
+ std::unique_ptr<cmCompiledGeneratorExpression> cge = ge.Parse(*saf);
+
for (const std::string& config : this->Configurations) {
- toolSettings[config]["AdditionalOptions"] = *saf;
+ std::string evaluated = cge->Evaluate(this->LocalGenerator, config);
+
+ if (!evaluated.empty()) {
+ toolSettings[config]["AdditionalOptions"] = evaluated;
+ }
}
}
// Figure out if debug information should be generated