summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-11-05 22:22:22 (GMT)
committerBrad King <brad.king@kitware.com>2020-11-06 16:43:52 (GMT)
commitfcf3fc4447e8eaa9cdd67223d9bf6ca8975632fa (patch)
treeb3f82a4fc5488b4eea163d62acb9acdd3a2cf760 /Source/cmNinjaTargetGenerator.cxx
parentfe5d0849dbe4a8a6f4d8cd1d0384b9112fc802b9 (diff)
downloadCMake-fcf3fc4447e8eaa9cdd67223d9bf6ca8975632fa.zip
CMake-fcf3fc4447e8eaa9cdd67223d9bf6ca8975632fa.tar.gz
CMake-fcf3fc4447e8eaa9cdd67223d9bf6ca8975632fa.tar.bz2
cmNinjaTargetGenerator: Clarify method names
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx21
1 files changed, 10 insertions, 11 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 41067d6..534fb3d 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -105,7 +105,7 @@ std::string cmNinjaTargetGenerator::LanguageCompilerRule(
'_', config);
}
-std::string cmNinjaTargetGenerator::LanguagePreprocessRule(
+std::string cmNinjaTargetGenerator::LanguagePreprocessAndScanRule(
std::string const& lang, const std::string& config) const
{
return cmStrCat(
@@ -114,7 +114,7 @@ std::string cmNinjaTargetGenerator::LanguagePreprocessRule(
'_', config);
}
-std::string cmNinjaTargetGenerator::LanguageDependencyRule(
+std::string cmNinjaTargetGenerator::LanguageScanRule(
std::string const& lang, const std::string& config) const
{
return cmStrCat(
@@ -129,8 +129,7 @@ bool cmNinjaTargetGenerator::NeedExplicitPreprocessing(
return lang == "Fortran";
}
-bool cmNinjaTargetGenerator::CompilePreprocessedSourceWithDefines(
- std::string const& lang) const
+bool cmNinjaTargetGenerator::CompileWithDefines(std::string const& lang) const
{
return this->Makefile->IsOn(
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.
bool const explicitPP = this->NeedExplicitPreprocessing(lang);
bool const compilePPWithDefines =
- explicitPP && this->CompilePreprocessedSourceWithDefines(lang);
+ explicitPP && this->CompileWithDefines(lang);
bool const needDyndep = this->NeedDyndep(lang);
std::string flags = "$FLAGS";
@@ -675,8 +674,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang,
const auto ppVar = cmStrCat("CMAKE_", lang, "_PREPROCESS_SOURCE");
auto ppRule = GetPreprocessScanRule(
- this->LanguagePreprocessRule(lang, config), vars, responseFlag, flags,
- launcher, rulePlaceholderExpander.get(), ppScanCommand,
+ this->LanguagePreprocessAndScanRule(lang, config), vars, responseFlag,
+ flags, launcher, rulePlaceholderExpander.get(), ppScanCommand,
this->GetLocalGenerator(), mf->GetRequiredDefinition(ppVar));
// 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");
auto scanRule = GetPreprocessScanRule(
- this->LanguageDependencyRule(lang, config), vars, "", flags, launcher,
+ this->LanguageScanRule(lang, config), vars, "", flags, launcher,
rulePlaceholderExpander.get(), scanCommand, this->GetLocalGenerator());
// Write the rule for generating dependencies for the given language.
@@ -1300,15 +1299,15 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
bool const compilePP = explicitPP &&
(preprocess != cmOutputConverter::FortranPreprocess::NotNeeded);
bool const compilePPWithDefines =
- compilePP && this->CompilePreprocessedSourceWithDefines(language);
+ compilePP && this->CompileWithDefines(language);
std::string const ppFileName = compilePP
? this->ConvertToNinjaPath(this->GetPreprocessedFilePath(source, config))
: "";
std::string const buildName = compilePP
- ? this->LanguagePreprocessRule(language, config)
- : this->LanguageDependencyRule(language, config);
+ ? this->LanguagePreprocessAndScanRule(language, config)
+ : this->LanguageScanRule(language, config);
const auto depExtension = compilePP ? ".pp.d" : ".d";
const std::string depFileName =