summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-11-05 22:21:13 (GMT)
committerBrad King <brad.king@kitware.com>2020-11-06 16:43:51 (GMT)
commitfe5d0849dbe4a8a6f4d8cd1d0384b9112fc802b9 (patch)
tree3a94955bab59ae9fd43d86f4c6f0dd8b19ca1811 /Source/cmNinjaTargetGenerator.cxx
parenta117101fbd1a7b17a4e52e16c1798b4a9e95f9b3 (diff)
downloadCMake-fe5d0849dbe4a8a6f4d8cd1d0384b9112fc802b9.zip
CMake-fe5d0849dbe4a8a6f4d8cd1d0384b9112fc802b9.tar.gz
CMake-fe5d0849dbe4a8a6f4d8cd1d0384b9112fc802b9.tar.bz2
cmNinjaTargetGenerator: Consolidate redundant methods
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx12
1 files changed, 3 insertions, 9 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 5e27356..41067d6 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -129,12 +129,6 @@ bool cmNinjaTargetGenerator::NeedExplicitPreprocessing(
return lang == "Fortran";
}
-bool cmNinjaTargetGenerator::UsePreprocessedSource(
- std::string const& lang) const
-{
- return lang == "Fortran";
-}
-
bool cmNinjaTargetGenerator::CompilePreprocessedSourceWithDefines(
std::string const& lang) const
{
@@ -639,8 +633,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang,
// For some cases we do an explicit preprocessor invocation.
bool const explicitPP = this->NeedExplicitPreprocessing(lang);
- bool const compilePPWithDefines = this->UsePreprocessedSource(lang) &&
- this->CompilePreprocessedSourceWithDefines(lang);
+ bool const compilePPWithDefines =
+ explicitPP && this->CompilePreprocessedSourceWithDefines(lang);
bool const needDyndep = this->NeedDyndep(lang);
std::string flags = "$FLAGS";
@@ -1303,7 +1297,7 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
preprocess = cmOutputConverter::GetFortranPreprocess(tgtpp);
}
- bool const compilePP = this->UsePreprocessedSource(language) &&
+ bool const compilePP = explicitPP &&
(preprocess != cmOutputConverter::FortranPreprocess::NotNeeded);
bool const compilePPWithDefines =
compilePP && this->CompilePreprocessedSourceWithDefines(language);