mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-01 03:29:18 -05:00
cmNinjaTargetGenerator: Clarify method names
This commit is contained in:
@@ -105,7 +105,7 @@ std::string cmNinjaTargetGenerator::LanguageCompilerRule(
|
|||||||
'_', config);
|
'_', config);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string cmNinjaTargetGenerator::LanguagePreprocessRule(
|
std::string cmNinjaTargetGenerator::LanguagePreprocessAndScanRule(
|
||||||
std::string const& lang, const std::string& config) const
|
std::string const& lang, const std::string& config) const
|
||||||
{
|
{
|
||||||
return cmStrCat(
|
return cmStrCat(
|
||||||
@@ -114,7 +114,7 @@ std::string cmNinjaTargetGenerator::LanguagePreprocessRule(
|
|||||||
'_', config);
|
'_', config);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string cmNinjaTargetGenerator::LanguageDependencyRule(
|
std::string cmNinjaTargetGenerator::LanguageScanRule(
|
||||||
std::string const& lang, const std::string& config) const
|
std::string const& lang, const std::string& config) const
|
||||||
{
|
{
|
||||||
return cmStrCat(
|
return cmStrCat(
|
||||||
@@ -129,8 +129,7 @@ bool cmNinjaTargetGenerator::NeedExplicitPreprocessing(
|
|||||||
return lang == "Fortran";
|
return lang == "Fortran";
|
||||||
}
|
}
|
||||||
|
|
||||||
bool cmNinjaTargetGenerator::CompilePreprocessedSourceWithDefines(
|
bool cmNinjaTargetGenerator::CompileWithDefines(std::string const& lang) const
|
||||||
std::string const& lang) const
|
|
||||||
{
|
{
|
||||||
return this->Makefile->IsOn(
|
return this->Makefile->IsOn(
|
||||||
cmStrCat("CMAKE_", lang, "_COMPILE_WITH_DEFINES"));
|
cmStrCat("CMAKE_", lang, "_COMPILE_WITH_DEFINES"));
|
||||||
@@ -634,7 +633,7 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang,
|
|||||||
// For some cases we do an explicit preprocessor invocation.
|
// For some cases we do an explicit preprocessor invocation.
|
||||||
bool const explicitPP = this->NeedExplicitPreprocessing(lang);
|
bool const explicitPP = this->NeedExplicitPreprocessing(lang);
|
||||||
bool const compilePPWithDefines =
|
bool const compilePPWithDefines =
|
||||||
explicitPP && this->CompilePreprocessedSourceWithDefines(lang);
|
explicitPP && this->CompileWithDefines(lang);
|
||||||
bool const needDyndep = this->NeedDyndep(lang);
|
bool const needDyndep = this->NeedDyndep(lang);
|
||||||
|
|
||||||
std::string flags = "$FLAGS";
|
std::string flags = "$FLAGS";
|
||||||
@@ -675,8 +674,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang,
|
|||||||
const auto ppVar = cmStrCat("CMAKE_", lang, "_PREPROCESS_SOURCE");
|
const auto ppVar = cmStrCat("CMAKE_", lang, "_PREPROCESS_SOURCE");
|
||||||
|
|
||||||
auto ppRule = GetPreprocessScanRule(
|
auto ppRule = GetPreprocessScanRule(
|
||||||
this->LanguagePreprocessRule(lang, config), vars, responseFlag, flags,
|
this->LanguagePreprocessAndScanRule(lang, config), vars, responseFlag,
|
||||||
launcher, rulePlaceholderExpander.get(), ppScanCommand,
|
flags, launcher, rulePlaceholderExpander.get(), ppScanCommand,
|
||||||
this->GetLocalGenerator(), mf->GetRequiredDefinition(ppVar));
|
this->GetLocalGenerator(), mf->GetRequiredDefinition(ppVar));
|
||||||
|
|
||||||
// Write the rule for preprocessing file of the given language.
|
// Write the rule for preprocessing file of the given language.
|
||||||
@@ -695,7 +694,7 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang,
|
|||||||
GetScanCommand(cmakeCmd, tdi, lang, "$in", needDyndep, "$out");
|
GetScanCommand(cmakeCmd, tdi, lang, "$in", needDyndep, "$out");
|
||||||
|
|
||||||
auto scanRule = GetPreprocessScanRule(
|
auto scanRule = GetPreprocessScanRule(
|
||||||
this->LanguageDependencyRule(lang, config), vars, "", flags, launcher,
|
this->LanguageScanRule(lang, config), vars, "", flags, launcher,
|
||||||
rulePlaceholderExpander.get(), scanCommand, this->GetLocalGenerator());
|
rulePlaceholderExpander.get(), scanCommand, this->GetLocalGenerator());
|
||||||
|
|
||||||
// Write the rule for generating dependencies for the given language.
|
// Write the rule for generating dependencies for the given language.
|
||||||
@@ -1300,15 +1299,15 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
|
|||||||
bool const compilePP = explicitPP &&
|
bool const compilePP = explicitPP &&
|
||||||
(preprocess != cmOutputConverter::FortranPreprocess::NotNeeded);
|
(preprocess != cmOutputConverter::FortranPreprocess::NotNeeded);
|
||||||
bool const compilePPWithDefines =
|
bool const compilePPWithDefines =
|
||||||
compilePP && this->CompilePreprocessedSourceWithDefines(language);
|
compilePP && this->CompileWithDefines(language);
|
||||||
|
|
||||||
std::string const ppFileName = compilePP
|
std::string const ppFileName = compilePP
|
||||||
? this->ConvertToNinjaPath(this->GetPreprocessedFilePath(source, config))
|
? this->ConvertToNinjaPath(this->GetPreprocessedFilePath(source, config))
|
||||||
: "";
|
: "";
|
||||||
|
|
||||||
std::string const buildName = compilePP
|
std::string const buildName = compilePP
|
||||||
? this->LanguagePreprocessRule(language, config)
|
? this->LanguagePreprocessAndScanRule(language, config)
|
||||||
: this->LanguageDependencyRule(language, config);
|
: this->LanguageScanRule(language, config);
|
||||||
|
|
||||||
const auto depExtension = compilePP ? ".pp.d" : ".d";
|
const auto depExtension = compilePP ? ".pp.d" : ".d";
|
||||||
const std::string depFileName =
|
const std::string depFileName =
|
||||||
|
|||||||
@@ -67,15 +67,15 @@ protected:
|
|||||||
|
|
||||||
std::string LanguageCompilerRule(const std::string& lang,
|
std::string LanguageCompilerRule(const std::string& lang,
|
||||||
const std::string& config) const;
|
const std::string& config) const;
|
||||||
std::string LanguagePreprocessRule(std::string const& lang,
|
std::string LanguagePreprocessAndScanRule(std::string const& lang,
|
||||||
const std::string& config) const;
|
const std::string& config) const;
|
||||||
std::string LanguageDependencyRule(std::string const& lang,
|
std::string LanguageScanRule(std::string const& lang,
|
||||||
const std::string& config) const;
|
const std::string& config) const;
|
||||||
std::string LanguageDyndepRule(std::string const& lang,
|
std::string LanguageDyndepRule(std::string const& lang,
|
||||||
const std::string& config) const;
|
const std::string& config) const;
|
||||||
bool NeedDyndep(std::string const& lang) const;
|
bool NeedDyndep(std::string const& lang) const;
|
||||||
bool NeedExplicitPreprocessing(std::string const& lang) const;
|
bool NeedExplicitPreprocessing(std::string const& lang) const;
|
||||||
bool CompilePreprocessedSourceWithDefines(std::string const& lang) const;
|
bool CompileWithDefines(std::string const& lang) const;
|
||||||
|
|
||||||
std::string OrderDependsTargetForTarget(const std::string& config);
|
std::string OrderDependsTargetForTarget(const std::string& config);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user