summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorExpressionEvaluationFile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-04-26 12:41:18 (GMT)
committerBrad King <brad.king@kitware.com>2018-04-26 12:41:18 (GMT)
commita92ee4e30d57ef957a7a2ff4e0d5066136a2f6c2 (patch)
treef34801afd9a8469d36c02944435bcfe8103fade2 /Source/cmGeneratorExpressionEvaluationFile.cxx
parentb58e41ccbd606106ee581943c8af92f8bfd5d535 (diff)
parent0826c20128fad20aafac2006ac0371e381e3cf60 (diff)
downloadCMake-a92ee4e30d57ef957a7a2ff4e0d5066136a2f6c2.zip
CMake-a92ee4e30d57ef957a7a2ff4e0d5066136a2f6c2.tar.gz
CMake-a92ee4e30d57ef957a7a2ff4e0d5066136a2f6c2.tar.bz2
Merge branch 'backport-ninja-issue-17942' into release-3.11
Merge-request: !2010
Diffstat (limited to 'Source/cmGeneratorExpressionEvaluationFile.cxx')
-rw-r--r--Source/cmGeneratorExpressionEvaluationFile.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmGeneratorExpressionEvaluationFile.cxx b/Source/cmGeneratorExpressionEvaluationFile.cxx
index c544141..99b9261 100644
--- a/Source/cmGeneratorExpressionEvaluationFile.cxx
+++ b/Source/cmGeneratorExpressionEvaluationFile.cxx
@@ -105,8 +105,14 @@ void cmGeneratorExpressionEvaluationFile::CreateOutputFile(
lg, config, false, nullptr, nullptr, nullptr, le);
cmSourceFile* sf = lg->GetMakefile()->GetOrCreateSource(
name, false, cmSourceFileLocationKind::Known);
+ // Tell TraceDependencies that the file is not expected to exist
+ // on disk yet. We generate it after that runs.
sf->SetProperty("GENERATED", "1");
+ // Tell the build system generators that there is no build rule
+ // to generate the file.
+ sf->SetProperty("__CMAKE_GENERATED_BY_CMAKE", "1");
+
gg->SetFilenameTargetDepends(
sf, this->OutputFileExpr->GetSourceSensitiveTargets());
}