summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileTargetGenerator.cxx
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@gmail.com>2020-05-19 21:39:38 (GMT)
committerCristian Adam <cristian.adam@gmail.com>2020-05-20 09:20:38 (GMT)
commitf6cb1e646ca108125c33419e0829c152effaee47 (patch)
tree80f043f982539f61cbb9439770d9425c11840e79 /Source/cmMakefileTargetGenerator.cxx
parent2f3a356ea8dd8305ce4360c1652e2e5abfa9f1cf (diff)
downloadCMake-f6cb1e646ca108125c33419e0829c152effaee47.zip
CMake-f6cb1e646ca108125c33419e0829c152effaee47.tar.gz
CMake-f6cb1e646ca108125c33419e0829c152effaee47.tar.bz2
Multi-Ninja: Fix PCHs for Visual C++
Fixes: #20711
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileTargetGenerator.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 5f0cfcf..04d4db7 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -895,9 +895,14 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
// Check for extra outputs created by the compilation.
std::vector<std::string> outputs(1, relativeObj);
if (cmProp extra_outputs_str = source.GetProperty("OBJECT_OUTPUTS")) {
- // Register these as extra files to clean.
- cmExpandList(*extra_outputs_str, outputs);
- this->CleanFiles.insert(outputs.begin() + 1, outputs.end());
+ std::string evaluated_outputs = cmGeneratorExpression::Evaluate(
+ *extra_outputs_str, this->LocalGenerator, config);
+
+ if (!evaluated_outputs.empty()) {
+ // Register these as extra files to clean.
+ cmExpandList(evaluated_outputs, outputs);
+ this->CleanFiles.insert(outputs.begin() + 1, outputs.end());
+ }
}
// Write the rule.