diff options
-rw-r--r-- | Source/cmLocalGenerator.cxx | 5 | ||||
-rw-r--r-- | Source/cmLocalGenerator.h | 3 | ||||
-rw-r--r-- | Source/cmLocalNinjaGenerator.cxx | 9 | ||||
-rw-r--r-- | Source/cmLocalNinjaGenerator.h | 3 |
4 files changed, 10 insertions, 10 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index bd6af8c..9aae5bc 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -77,6 +77,11 @@ cmLocalGenerator::~cmLocalGenerator() delete this->Makefile; } +bool cmLocalGenerator::IsRootMakefile() const +{ + return !this->GetParent(); +} + //---------------------------------------------------------------------------- class cmLocalGeneratorCurrent { diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h index 47c0877..3459c2a 100644 --- a/Source/cmLocalGenerator.h +++ b/Source/cmLocalGenerator.h @@ -37,6 +37,9 @@ public: cmLocalGenerator(cmGlobalGenerator* gg, cmLocalGenerator* parent); virtual ~cmLocalGenerator(); + /// @return whether we are processing the top CMakeLists.txt file. + bool IsRootMakefile() const; + /** * Generate the makefile for this directory. */ diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index ded4c25..f1f1202 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -48,7 +48,7 @@ void cmLocalNinjaGenerator::Generate() #endif // We do that only once for the top CMakeLists.txt file. - if(this->isRootMakefile()) + if(this->IsRootMakefile()) { this->WriteBuildFileTop(); @@ -179,11 +179,6 @@ cmake* cmLocalNinjaGenerator::GetCMakeInstance() return this->GetGlobalGenerator()->GetCMakeInstance(); } -bool cmLocalNinjaGenerator::isRootMakefile() const -{ - return !this->GetParent(); -} - void cmLocalNinjaGenerator::WriteBuildFileTop() { // For the build file. @@ -312,7 +307,7 @@ void cmLocalNinjaGenerator::WriteProcessedMakefile(std::ostream& os) << "# Write statements declared in CMakeLists.txt:" << std::endl << "# " << this->Makefile->GetCurrentListFile() << std::endl ; - if(this->isRootMakefile()) + if(this->IsRootMakefile()) os << "# Which is the root file." << std::endl; cmGlobalNinjaGenerator::WriteDivider(os); os << std::endl; diff --git a/Source/cmLocalNinjaGenerator.h b/Source/cmLocalNinjaGenerator.h index 0b87426..3a6e030 100644 --- a/Source/cmLocalNinjaGenerator.h +++ b/Source/cmLocalNinjaGenerator.h @@ -59,9 +59,6 @@ public: std::string const& GetConfigName() const { return this->ConfigName; } - /// @return whether we are processing the top CMakeLists.txt file. - bool isRootMakefile() const; - /// @returns the relative path between the HomeOutputDirectory and this /// local generators StartOutputDirectory. std::string GetHomeRelativeOutputPath() const |