[Cmake-commits] CMake branch, next, updated. v3.2.0-927-g60fd5e0

Brad King brad.king at kitware.com
Mon Mar 9 13:37:09 EDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  60fd5e0a216879aca4f18e840a73e26ad95239d0 (commit)
       via  a6b09085715d0d7f299e9ca76a4835ce5f5acfaf (commit)
      from  814dafa67b9505e7d8816a2443277c9de95c5460 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=60fd5e0a216879aca4f18e840a73e26ad95239d0
commit 60fd5e0a216879aca4f18e840a73e26ad95239d0
Merge: 814dafa a6b0908
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Mar 9 13:37:08 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Mar 9 13:37:08 2015 -0400

    Merge topic 'ninja-check-root-robustly' into next
    
    a6b09085 Ninja: Improve internal check for generating at the top-level (#15436)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a6b09085715d0d7f299e9ca76a4835ce5f5acfaf
commit a6b09085715d0d7f299e9ca76a4835ce5f5acfaf
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Mar 9 09:25:16 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Mar 9 13:36:46 2015 -0400

    Ninja: Improve internal check for generating at the top-level (#15436)
    
    Simply check for whether the local generator has a parent instead of
    depending on a string comparison of directory names.

diff --git a/Source/cmLocalGenerator.h b/Source/cmLocalGenerator.h
index 3a9d5be..d64ae0f 100644
--- a/Source/cmLocalGenerator.h
+++ b/Source/cmLocalGenerator.h
@@ -130,7 +130,7 @@ public:
   std::string ConvertToOptionallyRelativeOutputPath(const std::string& remote);
 
   ///! set/get the parent generator
-  cmLocalGenerator* GetParent(){return this->Parent;}
+  cmLocalGenerator* GetParent() const {return this->Parent;}
   void SetParent(cmLocalGenerator* g) { this->Parent = g; g->AddChild(this); }
 
   ///! set/get the children
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx
index 413dc0f..640c1b3 100644
--- a/Source/cmLocalNinjaGenerator.cxx
+++ b/Source/cmLocalNinjaGenerator.cxx
@@ -182,8 +182,7 @@ cmake* cmLocalNinjaGenerator::GetCMakeInstance()
 
 bool cmLocalNinjaGenerator::isRootMakefile() const
 {
-  return (strcmp(this->Makefile->GetCurrentDirectory(),
-                 this->GetCMakeInstance()->GetHomeDirectory()) == 0);
+  return !this->GetParent();
 }
 
 void cmLocalNinjaGenerator::WriteBuildFileTop()

-----------------------------------------------------------------------

Summary of changes:
 Source/cmLocalGenerator.h        |    2 +-
 Source/cmLocalNinjaGenerator.cxx |    3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list