[Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-265-ge0f4282

Stephen Kelly steveire at gmail.com
Sat Oct 8 05:35:45 EDT 2016


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  e0f428248c51aacfc2b9e53cca5b88aa15042013 (commit)
       via  cfcf11093df6477b04e19dad4c4fa56f1032faa5 (commit)
      from  e8ce84727ed59d55c37adbf06cde0e2f114c46e1 (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e0f428248c51aacfc2b9e53cca5b88aa15042013
commit e0f428248c51aacfc2b9e53cca5b88aa15042013
Merge: e8ce847 cfcf110
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Oct 8 05:35:45 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Oct 8 05:35:45 2016 -0400

    Merge topic 'ninja-cleanups' into next
    
    cfcf1109 Revert partially


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cfcf11093df6477b04e19dad4c4fa56f1032faa5
commit cfcf11093df6477b04e19dad4c4fa56f1032faa5
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Oct 8 11:34:31 2016 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sat Oct 8 11:35:22 2016 +0200

    Revert partially

diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 1b4e34c..f5a0e68 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -834,27 +834,9 @@ std::string cmGlobalNinjaGenerator::ConvertToNinjaPath(const std::string& path)
 {
   cmLocalNinjaGenerator* ng =
     static_cast<cmLocalNinjaGenerator*>(this->LocalGenerators[0]);
-
-  return ConvertToNinjaPath(path, ng->GetStateSnapshot().GetDirectory(),
-                            this->OutputPathPrefix);
-}
-
-std::string cmGlobalNinjaGenerator::ConvertToNinjaPath(
-  const std::string& path, cmState::Directory stateDir,
-  std::string const& prefix)
-{
-  std::string convPath = path;
-
-  if (cmOutputConverter::ContainedInDirectory(stateDir.GetCurrentBinary(),
-                                              path, stateDir)) {
-    convPath = cmOutputConverter::ForceToRelativePath(
-      stateDir.GetCurrentBinary(), path);
-  }
-
-  if (!cmSystemTools::FileIsFullPath(convPath)) {
-    convPath = prefix + convPath;
-  }
-
+  std::string convPath = ng->ConvertToRelativePath(
+    this->LocalGenerators[0]->GetState()->GetBinaryDirectory(), path);
+  convPath = this->NinjaOutputPath(convPath);
 #ifdef _WIN32
   std::replace(convPath.begin(), convPath.end(), '/', '\\');
 #endif
@@ -1441,7 +1423,7 @@ void cmGlobalNinjaGenerator::InitOutputPathPrefix()
 
 std::string cmGlobalNinjaGenerator::NinjaOutputPath(std::string const& path)
 {
-  if (cmSystemTools::FileIsFullPath(path)) {
+  if (!this->HasOutputPathPrefix() || cmSystemTools::FileIsFullPath(path)) {
     return path;
   }
   return this->OutputPathPrefix + path;
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h
index 51a8032..dcf7406 100644
--- a/Source/cmGlobalNinjaGenerator.h
+++ b/Source/cmGlobalNinjaGenerator.h
@@ -233,9 +233,6 @@ public:
     return this->RulesFileStream;
   }
 
-  static std::string ConvertToNinjaPath(const std::string& path,
-                                        cmState::Directory stateDir,
-                                        std::string const& prefix);
   std::string ConvertToNinjaPath(const std::string& path);
   std::string ConvertToNinjaFolderRule(const std::string& path);
 

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

Summary of changes:
 Source/cmGlobalNinjaGenerator.cxx |   26 ++++----------------------
 Source/cmGlobalNinjaGenerator.h   |    3 ---
 2 files changed, 4 insertions(+), 25 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list