[Cmake-commits] CMake branch, master, updated. v3.10.2-923-gfa3ac83

Kitware Robot kwrobot at kitware.com
Thu Jan 25 08:45:04 EST 2018


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, master has been updated
       via  fa3ac83af0edf958d26b246109db6e3d6d128d70 (commit)
       via  d1d8daf15adfc6fc23cabbf37e230d0445b70405 (commit)
       via  499e36d932910186e1c1db1cc0d18fe93e47ee55 (commit)
       via  5c724c4ca83059b13e6fd64dad9ee88f59162166 (commit)
       via  99ba188c23f70928d973cecca4f9be2a49ce4436 (commit)
       via  c4dc6485eb3bd51fdc88eee03218b9755c373282 (commit)
       via  e342e4100a597dc8a7f94c55409e619a4848754f (commit)
       via  239a3ef8215416d3fa7d7c1b0bf812b17b3437df (commit)
       via  9b1a3d244b60ae231a161192caf4fe9b40efbdc3 (commit)
       via  b886b46ccb37a273e63f472a767b58aea50af724 (commit)
      from  aaf3c5b32c9e75fb738fcc00228551f678db26d5 (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=fa3ac83af0edf958d26b246109db6e3d6d128d70
commit fa3ac83af0edf958d26b246109db6e3d6d128d70
Merge: d1d8daf 99ba188
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Jan 25 13:37:37 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Jan 25 08:37:40 2018 -0500

    Merge topic 'CPackDeb-help-typo'
    
    99ba188c CPackDeb: Fix typo in documentation
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1697


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d1d8daf15adfc6fc23cabbf37e230d0445b70405
commit d1d8daf15adfc6fc23cabbf37e230d0445b70405
Merge: 499e36d c4dc648
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Jan 25 13:36:21 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Jan 25 08:36:47 2018 -0500

    Merge topic 'xl-qoptfile'
    
    c4dc6485 XL: Enable use of response files for includes and objects
    e342e410 Makefile,Ninja: Use tool-specific response file flag for include dirs
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1691


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=499e36d932910186e1c1db1cc0d18fe93e47ee55
commit 499e36d932910186e1c1db1cc0d18fe93e47ee55
Merge: 5c724c4 b886b46
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Jan 25 13:36:03 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Jan 25 08:36:17 2018 -0500

    Merge topic 'fix-cray-pic'
    
    b886b46c Cray: Add common PIC flags
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1692


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5c724c4ca83059b13e6fd64dad9ee88f59162166
commit 5c724c4ca83059b13e6fd64dad9ee88f59162166
Merge: aaf3c5b 239a3ef
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Jan 25 13:35:23 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Jan 25 08:35:28 2018 -0500

    Merge topic 'server-polish-opt-handshake'
    
    239a3ef8 Server-mode: Document protocol version for optional handshake arguments
    9b1a3d24 Server-mode: Rename functions to reflect what they do
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1693


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=99ba188c23f70928d973cecca4f9be2a49ce4436
commit 99ba188c23f70928d973cecca4f9be2a49ce4436
Author:     Tobias Svehagen <tobias.svehagen at gmail.com>
AuthorDate: Wed Jan 24 20:35:55 2018 +0100
Commit:     Tobias Svehagen <tobias.svehagen at gmail.com>
CommitDate: Wed Jan 24 20:35:55 2018 +0100

    CPackDeb: Fix typo in documentation

diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index de1df3d..35447c9 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -470,7 +470,7 @@
 #  Usage::
 #
 #   set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
-#       "${CMAKE_CURRENT_SOURCE_DIR/prerm;${CMAKE_CURRENT_SOURCE_DIR}/postrm")
+#       "${CMAKE_CURRENT_SOURCE_DIR}/prerm;${CMAKE_CURRENT_SOURCE_DIR}/postrm")
 #
 #  .. note::
 #
@@ -954,7 +954,7 @@ function(cpack_deb_prepare_package_vars)
   # - prerm
   # Usage:
   # set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
-  #    "${CMAKE_CURRENT_SOURCE_DIR/prerm;${CMAKE_CURRENT_SOURCE_DIR}/postrm")
+  #    "${CMAKE_CURRENT_SOURCE_DIR}/prerm;${CMAKE_CURRENT_SOURCE_DIR}/postrm")
 
   # Are we packaging components ?
   if(CPACK_DEB_PACKAGE_COMPONENT)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c4dc6485eb3bd51fdc88eee03218b9755c373282
commit c4dc6485eb3bd51fdc88eee03218b9755c373282
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Jan 24 10:34:53 2018 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jan 24 14:31:53 2018 -0500

    XL: Enable use of response files for includes and objects
    
    The IBM XL compiler supports response files via `-qoptfile=<file>`
    instead of `@<file>`.

diff --git a/Modules/Compiler/XL.cmake b/Modules/Compiler/XL.cmake
index 4783785..e527a04 100644
--- a/Modules/Compiler/XL.cmake
+++ b/Modules/Compiler/XL.cmake
@@ -20,6 +20,8 @@ macro(__compiler_xl lang)
   # Feature flags.
   set(CMAKE_${lang}_VERBOSE_FLAG "-V")
   set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-qpic")
+  set(CMAKE_${lang}_RESPONSE_FILE_FLAG "-qoptfile=")
+  set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "-qoptfile=")
 
   string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g")
   string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O")

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e342e4100a597dc8a7f94c55409e619a4848754f
commit e342e4100a597dc8a7f94c55409e619a4848754f
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed Jan 24 10:28:09 2018 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jan 24 14:31:53 2018 -0500

    Makefile,Ninja: Use tool-specific response file flag for include dirs
    
    When we use a response file for `-I` flags, not all compilers support
    the `@<file>` syntax.  Define `CMAKE_<LANG>_RESPONSE_FILE_FLAG` to
    specify tool-specific flag, just as we do for linking already via
    `CMAKE_<LANG>_RESPONSE_FILE_LINK_FLAG`.

diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index 002cc0f..aba69d0 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -1625,10 +1625,17 @@ void cmMakefileTargetGenerator::AddIncludeFlags(std::string& flags,
   }
 
   if (useResponseFile) {
+    std::string const responseFlagVar =
+      "CMAKE_" + lang + "_RESPONSE_FILE_FLAG";
+    std::string responseFlag =
+      this->Makefile->GetSafeDefinition(responseFlagVar);
+    if (responseFlag.empty()) {
+      responseFlag = "@";
+    }
     std::string name = "includes_";
     name += lang;
     name += ".rsp";
-    std::string arg = "@" +
+    std::string arg = std::move(responseFlag) +
       this->CreateResponseFile(name.c_str(), includeFlags,
                                this->FlagFileDepends[lang]);
     this->LocalGenerator->AppendFlags(flags, arg);
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index f967168..debf476 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -416,14 +416,20 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang)
   std::string flags = "$FLAGS";
   std::string rspfile;
   std::string rspcontent;
-  std::string responseFlag;
 
   bool const lang_supports_response = !(lang == "RC" || lang == "CUDA");
   if (lang_supports_response && this->ForceResponseFile()) {
+    std::string const responseFlagVar =
+      "CMAKE_" + lang + "_RESPONSE_FILE_FLAG";
+    std::string responseFlag =
+      this->Makefile->GetSafeDefinition(responseFlagVar);
+    if (responseFlag.empty()) {
+      responseFlag = "@";
+    }
     rspfile = "$RSP_FILE";
-    responseFlag = "@" + rspfile;
+    responseFlag += rspfile;
     rspcontent = " $DEFINES $INCLUDES $FLAGS";
-    flags = responseFlag;
+    flags = std::move(responseFlag);
     vars.Defines = "";
     vars.Includes = "";
   }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=239a3ef8215416d3fa7d7c1b0bf812b17b3437df
commit 239a3ef8215416d3fa7d7c1b0bf812b17b3437df
Author:     Tobias Hunger <tobias.hunger at qt.io>
AuthorDate: Wed Jan 24 17:08:24 2018 +0100
Commit:     Tobias Hunger <tobias.hunger at qt.io>
CommitDate: Wed Jan 24 17:31:20 2018 +0100

    Server-mode: Document protocol version for optional handshake arguments
    
    Document which Protocol version only needs the build directory to be passed
    during a handshake.
    
    This is available a bit earlier than that, but from all I can tell 1.2 is
    the earliest version where that feature is reliably available.

diff --git a/Help/manual/cmake-server.7.rst b/Help/manual/cmake-server.7.rst
index 1ddcb1b..0fed0b1 100644
--- a/Help/manual/cmake-server.7.rst
+++ b/Help/manual/cmake-server.7.rst
@@ -277,10 +277,6 @@ Giving the "major" version of the requested protocol version will make the serve
 use the latest minor version of that protocol. Use this if you do not explicitly
 need to depend on a specific minor version.
 
-If the build directory already contains a CMake cache, it is sufficient to set
-the "buildDirectory" attribute. To create a fresh build directory, additional
-attributes are required depending on the protocol version.
-
 Protocol version 1.0 requires the following attributes to be set:
 
   * "sourceDirectory" with a path to the sources
@@ -290,6 +286,10 @@ Protocol version 1.0 requires the following attributes to be set:
   * "platform" with the generator platform (if supported by the generator)
   * "toolset" with the generator toolset (if supported by the generator)
 
+Protocol version 1.2 makes all but the build directory optional, provided
+there is a valid cache in the build directory that contains all the other
+information already.
+
 Example::
 
   [== "CMake Server" ==[

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9b1a3d244b60ae231a161192caf4fe9b40efbdc3
commit 9b1a3d244b60ae231a161192caf4fe9b40efbdc3
Author:     Tobias Hunger <tobias.hunger at qt.io>
AuthorDate: Wed Jan 24 16:54:25 2018 +0100
Commit:     Tobias Hunger <tobias.hunger at qt.io>
CommitDate: Wed Jan 24 17:01:40 2018 +0100

    Server-mode: Rename functions to reflect what they do
    
    Rename the test* static functions to getOrTest* to better reflect
    what they do now.

diff --git a/Source/cmServerProtocol.cxx b/Source/cmServerProtocol.cxx
index 4c0a354..a282c5a 100644
--- a/Source/cmServerProtocol.cxx
+++ b/Source/cmServerProtocol.cxx
@@ -266,8 +266,8 @@ static void setErrorMessage(std::string* errorMessage, const std::string& text)
   }
 }
 
-static bool testHomeDirectory(cmState* state, std::string& value,
-                              std::string* errorMessage)
+static bool getOrTestHomeDirectory(cmState* state, std::string& value,
+                                   std::string* errorMessage)
 {
   const std::string cachedValue =
     std::string(state->GetCacheEntryValue("CMAKE_HOME_DIRECTORY"));
@@ -288,9 +288,10 @@ static bool testHomeDirectory(cmState* state, std::string& value,
   return true;
 }
 
-static bool testValue(cmState* state, const std::string& key,
-                      std::string& value, const std::string& keyDescription,
-                      std::string* errorMessage)
+static bool getOrTestValue(cmState* state, const std::string& key,
+                           std::string& value,
+                           const std::string& keyDescription,
+                           std::string* errorMessage)
 {
   const char* entry = state->GetCacheEntryValue(key);
   const std::string cachedValue =
@@ -337,31 +338,31 @@ bool cmServerProtocol1::DoActivate(const cmServerRequest& request,
       cmState* state = cm->GetState();
 
       // Check generator:
-      if (!testValue(state, "CMAKE_GENERATOR", generator, "generator",
-                     errorMessage)) {
+      if (!getOrTestValue(state, "CMAKE_GENERATOR", generator, "generator",
+                          errorMessage)) {
         return false;
       }
 
       // check extra generator:
-      if (!testValue(state, "CMAKE_EXTRA_GENERATOR", extraGenerator,
-                     "extra generator", errorMessage)) {
+      if (!getOrTestValue(state, "CMAKE_EXTRA_GENERATOR", extraGenerator,
+                          "extra generator", errorMessage)) {
         return false;
       }
 
       // check sourcedir:
-      if (!testHomeDirectory(state, sourceDirectory, errorMessage)) {
+      if (!getOrTestHomeDirectory(state, sourceDirectory, errorMessage)) {
         return false;
       }
 
       // check toolset:
-      if (!testValue(state, "CMAKE_GENERATOR_TOOLSET", toolset, "toolset",
-                     errorMessage)) {
+      if (!getOrTestValue(state, "CMAKE_GENERATOR_TOOLSET", toolset, "toolset",
+                          errorMessage)) {
         return false;
       }
 
       // check platform:
-      if (!testValue(state, "CMAKE_GENERATOR_PLATFORM", platform, "platform",
-                     errorMessage)) {
+      if (!getOrTestValue(state, "CMAKE_GENERATOR_PLATFORM", platform,
+                          "platform", errorMessage)) {
         return false;
       }
     }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b886b46ccb37a273e63f472a767b58aea50af724
commit b886b46ccb37a273e63f472a767b58aea50af724
Author:     Chuck Atkins <chuck.atkins at kitware.com>
AuthorDate: Wed Jan 24 09:09:08 2018 -0600
Commit:     Chuck Atkins <chuck.atkins at kitware.com>
CommitDate: Wed Jan 24 09:09:08 2018 -0600

    Cray: Add common PIC flags
    
    Fixes #17208

diff --git a/Modules/Compiler/Cray-C.cmake b/Modules/Compiler/Cray-C.cmake
index 87ce20f..d34154c 100644
--- a/Modules/Compiler/Cray-C.cmake
+++ b/Modules/Compiler/Cray-C.cmake
@@ -2,8 +2,7 @@
 # file Copyright.txt or https://cmake.org/licensing for details.
 
 include(Compiler/Cray)
-
-set(CMAKE_C_VERBOSE_FLAG "-v")
+__compiler_cray(C)
 
 string(APPEND CMAKE_C_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
 string(APPEND CMAKE_C_FLAGS_RELEASE_INIT " -DNDEBUG")
diff --git a/Modules/Compiler/Cray-CXX.cmake b/Modules/Compiler/Cray-CXX.cmake
index 8506c09..a1899e6 100644
--- a/Modules/Compiler/Cray-CXX.cmake
+++ b/Modules/Compiler/Cray-CXX.cmake
@@ -2,8 +2,7 @@
 # file Copyright.txt or https://cmake.org/licensing for details.
 
 include(Compiler/Cray)
-
-set(CMAKE_CXX_VERBOSE_FLAG "-v")
+__compiler_cray(C)
 
 string(APPEND CMAKE_CXX_FLAGS_MINSIZEREL_INIT " -DNDEBUG")
 string(APPEND CMAKE_CXX_FLAGS_RELEASE_INIT " -DNDEBUG")
diff --git a/Modules/Compiler/Cray-Fortran.cmake b/Modules/Compiler/Cray-Fortran.cmake
index 5d81bb0..dbf28e3 100644
--- a/Modules/Compiler/Cray-Fortran.cmake
+++ b/Modules/Compiler/Cray-Fortran.cmake
@@ -1,4 +1,9 @@
-set(CMAKE_Fortran_VERBOSE_FLAG "-v")
+# Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+include(Compiler/Cray)
+__compiler_cray(Fortran)
+
 set(CMAKE_Fortran_MODOUT_FLAG -em)
 set(CMAKE_Fortran_MODDIR_FLAG -J)
 set(CMAKE_Fortran_MODDIR_DEFAULT .)
diff --git a/Modules/Compiler/Cray.cmake b/Modules/Compiler/Cray.cmake
index 8fe8eeb..c214afc 100644
--- a/Modules/Compiler/Cray.cmake
+++ b/Modules/Compiler/Cray.cmake
@@ -8,3 +8,10 @@ endif()
 set(__COMPILER_CRAY 1)
 
 include(Compiler/CMakeCommonCompilerMacros)
+
+macro(__compiler_cray lang)
+  set(CMAKE_${lang}_VERBOSE_FLAG "-v")
+  set(CMAKE_${lang}_COMPILE_OPTIONS_PIC -h PIC)
+  set(CMAKE_${lang}_COMPILE_OPTIONS_PIE -h PIC)
+  set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-h PIC")
+endmacro()
diff --git a/Modules/Compiler/CrayPrgEnv.cmake b/Modules/Compiler/CrayPrgEnv.cmake
index 9f8befd..05e3fc7 100644
--- a/Modules/Compiler/CrayPrgEnv.cmake
+++ b/Modules/Compiler/CrayPrgEnv.cmake
@@ -62,12 +62,11 @@ macro(__CrayPrgEnv_setup lang test_src compiler_cmd link_cmd)
 
   # Flags for the Cray wrappers
   set(CMAKE_STATIC_LIBRARY_LINK_${lang}_FLAGS "-static")
-  set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "")
   set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared")
   set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS "-dynamic")
 
   # If the link type is not explicitly specified in the environment then
-  # the Cray wrappers assume that the code will be built staticly so
+  # the Cray wrappers assume that the code will be built statically so
   # we check the following condition(s) are NOT met
   #  Compiler flags are explicitly dynamic
   #  Env var is dynamic and compiler flags are not explicitly static

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

Summary of changes:
 Help/manual/cmake-server.7.rst       |    8 ++++----
 Modules/CPackDeb.cmake               |    4 ++--
 Modules/Compiler/Cray-C.cmake        |    3 +--
 Modules/Compiler/Cray-CXX.cmake      |    3 +--
 Modules/Compiler/Cray-Fortran.cmake  |    7 ++++++-
 Modules/Compiler/Cray.cmake          |    7 +++++++
 Modules/Compiler/CrayPrgEnv.cmake    |    1 -
 Modules/Compiler/XL.cmake            |    2 ++
 Source/cmMakefileTargetGenerator.cxx |    9 ++++++++-
 Source/cmNinjaTargetGenerator.cxx    |   12 +++++++++---
 Source/cmServerProtocol.cxx          |   29 +++++++++++++++--------------
 11 files changed, 55 insertions(+), 30 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list