summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-11-05 22:36:13 (GMT)
committerBrad King <brad.king@kitware.com>2020-11-06 16:43:52 (GMT)
commit170cfc764df71f878d8f7e280a24060604b7c49a (patch)
tree42e8e2389dec79584b95607b062a9e0a996def7a /Source/cmNinjaTargetGenerator.cxx
parentfcf3fc4447e8eaa9cdd67223d9bf6ca8975632fa (diff)
downloadCMake-170cfc764df71f878d8f7e280a24060604b7c49a.zip
CMake-170cfc764df71f878d8f7e280a24060604b7c49a.tar.gz
CMake-170cfc764df71f878d8f7e280a24060604b7c49a.tar.bz2
cmNinjaTargetGenerator: Drop unnecessary mutation
GetPreprocessScanRule's caller always has `vars.Source` set to `$in`.
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 534fb3d..757245f 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -543,7 +543,8 @@ std::string GetScanCommand(const std::string& cmakeCmd, const std::string& tdi,
// Helper function to create dependency scanning rule, with optional
// explicit preprocessing step if preprocessCommand is non-empty
cmNinjaRule GetPreprocessScanRule(
- const std::string& ruleName, cmRulePlaceholderExpander::RuleVariables& vars,
+ const std::string& ruleName,
+ cmRulePlaceholderExpander::RuleVariables const& vars,
const std::string& responseFlag, const std::string& flags,
const std::string& launcher,
cmRulePlaceholderExpander* const rulePlaceholderExpander,
@@ -566,7 +567,6 @@ cmNinjaRule GetPreprocessScanRule(
// Preprocessing uses the original source, compilation uses
// preprocessed output or original source
ppVars.Source = vars.Source;
- vars.Source = "$in";
// Copy preprocessor definitions to the preprocessor rule.
ppVars.Defines = vars.Defines;