[Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-302-g6b05e33

Stephen Kelly steveire at gmail.com
Sun Oct 9 04:49:01 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  6b05e33c95b2bb392f6c6602da4677747613e35d (commit)
       via  5de760147f83b507f5b5dda7051eb1f6386e052b (commit)
       via  95ac050958f063223a4a3f660aa5d8521b089c3f (commit)
       via  6e3b88962c6762ab384ef73c9a77444ace4b0738 (commit)
       via  2a49d86d5dec66f7696bd7063459f504cc336a5e (commit)
       via  b0301db23b12351720993a351fedf081ca0fa444 (commit)
       via  267e02097e90d05a16ffd1aa53fb7910b79aa0ec (commit)
       via  009019f2596de08c488588fd2c67a423f9fe92bf (commit)
       via  378849f41e574e72c577b549dfc2d5333ca8f9b5 (commit)
       via  4a3c49b4698f0e8c20c345770f551142088a3037 (commit)
      from  2f5c30a55bdabcf606b26abb89395608170f9ae2 (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=6b05e33c95b2bb392f6c6602da4677747613e35d
commit 6b05e33c95b2bb392f6c6602da4677747613e35d
Merge: 2f5c30a 5de7601
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Oct 9 04:49:00 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun Oct 9 04:49:00 2016 -0400

    Merge topic 'minor-cleanups' into next
    
    5de76014 cmMakefile: Return a string from GetDefineFlags
    95ac0509 Test: Remove condition for CMake version no longer supported
    6e3b8896 cmLocalGenerator: Extract definition retrieval out of loop
    2a49d86d Makefiles: Inline only use of method
    b0301db2 Makefiles: Make helper class independent of cmLocalGenerator
    267e0209 cmMakefile: Remove pointless condition
    009019f2 Makefiles: Extract identical code from condition
    378849f4 Makefiles: Replace array access with local variable
    4a3c49b4 Makefiles: Separate two coupled calls


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5de760147f83b507f5b5dda7051eb1f6386e052b
commit 5de760147f83b507f5b5dda7051eb1f6386e052b
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Oct 9 10:47:45 2016 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Oct 9 10:47:45 2016 +0200

    cmMakefile: Return a string from GetDefineFlags
    
    Flip condition in GHS for readability.

diff --git a/Source/cmGhsMultiTargetGenerator.cxx b/Source/cmGhsMultiTargetGenerator.cxx
index 959dfdb..fac68f5 100644
--- a/Source/cmGhsMultiTargetGenerator.cxx
+++ b/Source/cmGhsMultiTargetGenerator.cxx
@@ -244,7 +244,7 @@ void cmGhsMultiTargetGenerator::SetCompilerFlags(std::string const& config,
       flags, this->GeneratorTarget, lang);
 
     // Append old-style preprocessor definition flags.
-    if (std::string(" ") != std::string(this->Makefile->GetDefineFlags())) {
+    if (this->Makefile->GetDefineFlags() != " ") {
       this->LocalGenerator->AppendFlags(flags,
                                         this->Makefile->GetDefineFlags());
     }
diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h
index 40344ce..de7bead 100644
--- a/Source/cmMakefile.h
+++ b/Source/cmMakefile.h
@@ -447,7 +447,7 @@ public:
   /**
    * Get a list of preprocessor define flags.
    */
-  const char* GetDefineFlags() const { return this->DefineFlags.c_str(); }
+  std::string GetDefineFlags() const { return this->DefineFlags; }
 
   /**
    * Make sure CMake can write this file

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=95ac050958f063223a4a3f660aa5d8521b089c3f
commit 95ac050958f063223a4a3f660aa5d8521b089c3f
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Oct 9 10:47:44 2016 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Oct 9 10:47:44 2016 +0200

    Test: Remove condition for CMake version no longer supported

diff --git a/Tests/FindPackageModeMakefileTest/CMakeLists.txt b/Tests/FindPackageModeMakefileTest/CMakeLists.txt
index 56fcc5d..23832da 100644
--- a/Tests/FindPackageModeMakefileTest/CMakeLists.txt
+++ b/Tests/FindPackageModeMakefileTest/CMakeLists.txt
@@ -20,16 +20,9 @@ if(UNIX  AND  "${CMAKE_GENERATOR}" MATCHES "Makefile" AND
     configure_file(FindFoo.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FindFoo.cmake @ONLY)
 
     # now set up the test:
-    if (NOT CMAKE_VERSION VERSION_LESS 2.8.12)
-      file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/cmakeExecutable.mk"
-        CONTENT "CMAKE = \"$<TARGET_FILE:cmake>\"\n"
-      )
-    else()
-      get_target_property(cmakeLocation cmake LOCATION)
-      file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/cmakeExecutable.mk"
-        "CMAKE = \"${cmakeLocation}\"\n"
-      )
-    endif()
+    file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/cmakeExecutable.mk"
+      CONTENT "CMAKE = \"$<TARGET_FILE:cmake>\"\n"
+    )
     configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Makefile.in ${CMAKE_CURRENT_BINARY_DIR}/ConfMakefile @ONLY)
     configure_file(${CMAKE_CURRENT_SOURCE_DIR}/main.cpp ${CMAKE_CURRENT_BINARY_DIR}/main.cpp COPYONLY)
 

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6e3b88962c6762ab384ef73c9a77444ace4b0738
commit 6e3b88962c6762ab384ef73c9a77444ace4b0738
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Oct 9 10:47:44 2016 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Oct 9 10:47:44 2016 +0200

    cmLocalGenerator: Extract definition retrieval out of loop

diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 2284cf9..0a99e87 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1176,12 +1176,12 @@ void cmLocalGenerator::GetTargetFlags(
           !(this->Makefile->IsOn("CYGWIN") || this->Makefile->IsOn("MINGW"))) {
         std::vector<cmSourceFile*> sources;
         target->GetSourceFiles(sources, buildType);
+        std::string defFlag = this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG");
         for (std::vector<cmSourceFile*>::const_iterator i = sources.begin();
              i != sources.end(); ++i) {
           cmSourceFile* sf = *i;
           if (sf->GetExtension() == "def") {
-            linkFlags +=
-              this->Makefile->GetSafeDefinition("CMAKE_LINK_DEF_FILE_FLAG");
+            linkFlags += defFlag;
             linkFlags += this->ConvertToOutputFormat(
               cmSystemTools::CollapseFullPath(sf->GetFullPath()), SHELL);
             linkFlags += " ";

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2a49d86d5dec66f7696bd7063459f504cc336a5e
commit 2a49d86d5dec66f7696bd7063459f504cc336a5e
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Oct 9 10:47:44 2016 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Oct 9 10:47:44 2016 +0200

    Makefiles: Inline only use of method

diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 99a7fae..44ced11 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -1217,13 +1217,6 @@ void cmMakefileTargetGenerator::WriteObjectsVariable(
                          << "\n";
 }
 
-void cmMakefileTargetGenerator::WriteObjectsString(std::string& buildObjs)
-{
-  std::vector<std::string> objStrings;
-  this->WriteObjectsStrings(objStrings);
-  buildObjs = objStrings[0];
-}
-
 class cmMakefileTargetGeneratorObjectStrings
 {
 public:
@@ -1677,7 +1670,9 @@ void cmMakefileTargetGenerator::CreateObjectLists(
     }
   } else if (useLinkScript) {
     if (!useArchiveRules) {
-      this->WriteObjectsString(buildObjs);
+      std::vector<std::string> objStrings;
+      this->WriteObjectsStrings(objStrings);
+      buildObjs = objStrings[0];
     }
   } else {
     buildObjs = "$(";
diff --git a/Source/cmMakefileTargetGenerator.h b/Source/cmMakefileTargetGenerator.h
index df7b6aa..813af80 100644
--- a/Source/cmMakefileTargetGenerator.h
+++ b/Source/cmMakefileTargetGenerator.h
@@ -112,7 +112,6 @@ protected:
   void WriteObjectsVariable(std::string& variableName,
                             std::string& variableNameExternal,
                             bool useWatcomQuote);
-  void WriteObjectsString(std::string& buildObjs);
   void WriteObjectsStrings(std::vector<std::string>& objStrings,
                            std::string::size_type limit = std::string::npos);
 

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b0301db23b12351720993a351fedf081ca0fa444
commit b0301db23b12351720993a351fedf081ca0fa444
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Oct 9 10:47:44 2016 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Oct 9 10:47:44 2016 +0200

    Makefiles: Make helper class independent of cmLocalGenerator
    
    It only needs output conversion.

diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 14102ef..99a7fae 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -1228,10 +1228,12 @@ class cmMakefileTargetGeneratorObjectStrings
 {
 public:
   cmMakefileTargetGeneratorObjectStrings(std::vector<std::string>& strings,
-                                         cmLocalUnixMakefileGenerator3* lg,
+                                         cmOutputConverter* outputConverter,
+                                         cmState::Directory stateDir,
                                          std::string::size_type limit)
     : Strings(strings)
-    , LocalGenerator(lg)
+    , OutputConverter(outputConverter)
+    , StateDir(stateDir)
     , LengthLimit(limit)
   {
     this->Space = "";
@@ -1239,10 +1241,8 @@ public:
   void Feed(std::string const& obj)
   {
     // Construct the name of the next object.
-    this->NextObject = this->LocalGenerator->ConvertToOutputFormat(
-      this->LocalGenerator->MaybeConvertToRelativePath(
-        this->LocalGenerator->GetCurrentBinaryDirectory(), obj),
-      cmOutputConverter::RESPONSE);
+    this->NextObject = this->OutputConverter->ConvertToOutputFormat(
+      this->MaybeConvertToRelativePath(obj), cmOutputConverter::RESPONSE);
 
     // Roll over to next string if the limit will be exceeded.
     if (this->LengthLimit != std::string::npos &&
@@ -1262,8 +1262,19 @@ public:
   }
   void Done() { this->Strings.push_back(this->CurrentString); }
 private:
+  std::string MaybeConvertToRelativePath(std::string const& obj)
+  {
+    if (!cmOutputConverter::ContainedInDirectory(
+          this->StateDir.GetCurrentBinary(), obj, this->StateDir)) {
+      return obj;
+    }
+    return cmOutputConverter::ForceToRelativePath(
+      this->StateDir.GetCurrentBinary(), obj);
+  }
+
   std::vector<std::string>& Strings;
-  cmLocalUnixMakefileGenerator3* LocalGenerator;
+  cmOutputConverter* OutputConverter;
+  cmState::Directory StateDir;
   std::string::size_type LengthLimit;
   std::string CurrentString;
   std::string NextObject;
@@ -1273,8 +1284,9 @@ private:
 void cmMakefileTargetGenerator::WriteObjectsStrings(
   std::vector<std::string>& objStrings, std::string::size_type limit)
 {
-  cmMakefileTargetGeneratorObjectStrings helper(objStrings,
-                                                this->LocalGenerator, limit);
+  cmMakefileTargetGeneratorObjectStrings helper(
+    objStrings, this->LocalGenerator,
+    this->LocalGenerator->GetStateSnapshot().GetDirectory(), limit);
   for (std::vector<std::string>::const_iterator i = this->Objects.begin();
        i != this->Objects.end(); ++i) {
     helper.Feed(*i);

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=267e02097e90d05a16ffd1aa53fb7910b79aa0ec
commit 267e02097e90d05a16ffd1aa53fb7910b79aa0ec
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Oct 9 10:47:44 2016 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Oct 9 10:47:44 2016 +0200

    cmMakefile: Remove pointless condition
    
    This method is never called with an empty string.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index df993ce..a9ef9cd 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -3970,10 +3970,8 @@ cmPolicies::PolicyStatus cmMakefile::GetPolicyStatus(
 bool cmMakefile::PolicyOptionalWarningEnabled(std::string const& var)
 {
   // Check for an explicit CMAKE_POLICY_WARNING_CMP<NNNN> setting.
-  if (!var.empty()) {
-    if (const char* val = this->GetDefinition(var)) {
-      return cmSystemTools::IsOn(val);
-    }
+  if (const char* val = this->GetDefinition(var)) {
+    return cmSystemTools::IsOn(val);
   }
   // Enable optional policy warnings with --debug-output, --trace,
   // or --trace-expand.

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=009019f2596de08c488588fd2c67a423f9fe92bf
commit 009019f2596de08c488588fd2c67a423f9fe92bf
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Oct 9 10:47:43 2016 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Oct 9 10:47:43 2016 +0200

    Makefiles: Extract identical code from condition

diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index eebab68..02eef59 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -999,12 +999,9 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand(
           if (workingDir.empty()) {
             output = this->MaybeConvertToRelativePath(
               this->GetCurrentBinaryDirectory(), output);
-            output =
-              this->ConvertToOutputFormat(output, cmOutputConverter::SHELL);
-          } else {
-            output =
-              this->ConvertToOutputFormat(output, cmOutputConverter::SHELL);
           }
+          output =
+            this->ConvertToOutputFormat(output, cmOutputConverter::SHELL);
         }
         vars.Output = output.c_str();
 

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=378849f41e574e72c577b549dfc2d5333ca8f9b5
commit 378849f41e574e72c577b549dfc2d5333ca8f9b5
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Oct 9 10:47:43 2016 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Oct 9 10:47:43 2016 +0200

    Makefiles: Replace array access with local variable

diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 5b4ecc7..eebab68 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -995,14 +995,15 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand(
         std::string output;
         const std::vector<std::string>& outputs = ccg.GetOutputs();
         if (!outputs.empty()) {
+          output = outputs[0];
           if (workingDir.empty()) {
             output = this->MaybeConvertToRelativePath(
-              this->GetCurrentBinaryDirectory(), outputs[0]);
-            output = this->ConvertToOutputFormat(output,
-              cmOutputConverter::SHELL);
+              this->GetCurrentBinaryDirectory(), output);
+            output =
+              this->ConvertToOutputFormat(output, cmOutputConverter::SHELL);
           } else {
-            output = this->ConvertToOutputFormat(outputs[0],
-                                                 cmOutputConverter::SHELL);
+            output =
+              this->ConvertToOutputFormat(output, cmOutputConverter::SHELL);
           }
         }
         vars.Output = output.c_str();

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4a3c49b4698f0e8c20c345770f551142088a3037
commit 4a3c49b4698f0e8c20c345770f551142088a3037
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Oct 9 10:47:43 2016 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun Oct 9 10:47:43 2016 +0200

    Makefiles: Separate two coupled calls

diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index eb2852c..5b4ecc7 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -996,11 +996,10 @@ void cmLocalUnixMakefileGenerator3::AppendCustomCommand(
         const std::vector<std::string>& outputs = ccg.GetOutputs();
         if (!outputs.empty()) {
           if (workingDir.empty()) {
-            output = this->ConvertToOutputFormat(
-              this->MaybeConvertToRelativePath(
-                this->GetCurrentBinaryDirectory(), outputs[0]),
+            output = this->MaybeConvertToRelativePath(
+              this->GetCurrentBinaryDirectory(), outputs[0]);
+            output = this->ConvertToOutputFormat(output,
               cmOutputConverter::SHELL);
-
           } else {
             output = this->ConvertToOutputFormat(outputs[0],
                                                  cmOutputConverter::SHELL);

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

Summary of changes:
 Source/cmGhsMultiTargetGenerator.cxx             |    2 +-
 Source/cmLocalGenerator.cxx                      |    4 +--
 Source/cmLocalUnixMakefileGenerator3.cxx         |   13 +++----
 Source/cmMakefile.cxx                            |    6 ++--
 Source/cmMakefile.h                              |    2 +-
 Source/cmMakefileTargetGenerator.cxx             |   41 +++++++++++++---------
 Source/cmMakefileTargetGenerator.h               |    1 -
 Tests/FindPackageModeMakefileTest/CMakeLists.txt |   13 ++-----
 8 files changed, 38 insertions(+), 44 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list