mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-05 22:00:10 -05:00
cmNinjaTargetGenerator: Consolidate redundant methods
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -71,11 +71,10 @@ protected:
|
||||
const std::string& config) const;
|
||||
std::string LanguageDependencyRule(std::string const& lang,
|
||||
const std::string& config) const;
|
||||
bool NeedExplicitPreprocessing(std::string const& lang) const;
|
||||
std::string LanguageDyndepRule(std::string const& lang,
|
||||
const std::string& config) const;
|
||||
bool NeedDyndep(std::string const& lang) const;
|
||||
bool UsePreprocessedSource(std::string const& lang) const;
|
||||
bool NeedExplicitPreprocessing(std::string const& lang) const;
|
||||
bool CompilePreprocessedSourceWithDefines(std::string const& lang) const;
|
||||
|
||||
std::string OrderDependsTargetForTarget(const std::string& config);
|
||||
|
||||
Reference in New Issue
Block a user