[Cmake-commits] CMake branch, master, updated. v3.9.0-rc6-293-g0f096b8

Kitware Robot kwrobot at kitware.com
Fri Jul 14 08:25:06 EDT 2017


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  0f096b8d733bb43f1fa95c052e5c2d9e8b381508 (commit)
       via  688b1c11ec6a9eb071594c77a4c92023660be20e (commit)
       via  38f81fab720ccf5eef6c94ffa2c84f7bb6c005d9 (commit)
       via  652b2956c85987300fe0092ecf476fe305e2aecd (commit)
       via  336c4fc6fa80149e189a19f91b8de934b48105de (commit)
       via  712af07e4792beea6f3b62bddace9077d7fec525 (commit)
       via  fda50a08437d99aba753bc84d26ba535e06e7b06 (commit)
       via  21ee3309b2a4d598bf933f644b41cd4840cde8c3 (commit)
      from  52db8d55e8418ba29df8cf108c789fa909a4398e (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=0f096b8d733bb43f1fa95c052e5c2d9e8b381508
commit 0f096b8d733bb43f1fa95c052e5c2d9e8b381508
Merge: 688b1c1 336c4fc
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Jul 14 12:24:26 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Jul 14 08:24:31 2017 -0400

    Merge topic 'cmp0054-asm-warning'
    
    336c4fc6 CMakeDetermineASMCompiler: fix a CMP0054 warning
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1057


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=688b1c11ec6a9eb071594c77a4c92023660be20e
commit 688b1c11ec6a9eb071594c77a4c92023660be20e
Merge: 38f81fa 712af07
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Jul 14 12:23:52 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Jul 14 08:23:58 2017 -0400

    Merge topic 'ninja_cuda_export_compile_commands_support'
    
    712af07e CUDA: CMAKE_EXPORT_COMPILE_COMMANDS now works with CUDA and Ninja
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1055


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=38f81fab720ccf5eef6c94ffa2c84f7bb6c005d9
commit 38f81fab720ccf5eef6c94ffa2c84f7bb6c005d9
Merge: 652b295 21ee330
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Jul 14 12:22:43 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Jul 14 08:22:59 2017 -0400

    Merge topic 'vs_csharp_add_custom_command_comment'
    
    21ee3309 VS: print comment in CSharp target only if it is actually set
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1049


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=652b2956c85987300fe0092ecf476fe305e2aecd
commit 652b2956c85987300fe0092ecf476fe305e2aecd
Merge: 52db8d5 fda50a0
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Jul 14 12:22:23 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Fri Jul 14 08:22:27 2017 -0400

    Merge topic 'CMakePushCheckState-fix-RESET'
    
    fda50a08 CMakePushCheckState: Fix cmake_push_check_state RESET argument
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1040


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=336c4fc6fa80149e189a19f91b8de934b48105de
commit 336c4fc6fa80149e189a19f91b8de934b48105de
Author:     Ben Boeckel <ben.boeckel at kitware.com>
AuthorDate: Thu Jul 13 13:39:49 2017 -0400
Commit:     Ben Boeckel <ben.boeckel at kitware.com>
CommitDate: Thu Jul 13 14:01:38 2017 -0400

    CMakeDetermineASMCompiler: fix a CMP0054 warning
    
    This was introduced in commit d8e6cd9e (IAR: Improve support for IAR ARM
    Compiler, 2017-06-15) from !991.
    
    Fixes #17062.

diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake
index d031421..f7cf54a 100644
--- a/Modules/CMakeDetermineASMCompiler.cmake
+++ b/Modules/CMakeDetermineASMCompiler.cmake
@@ -103,7 +103,7 @@ if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
   include(CMakeDetermineCompilerId)
   set(userflags)
   CMAKE_DETERMINE_COMPILER_ID_VENDOR(ASM${ASM_DIALECT} "${userflags}")
-  if("${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}" STREQUAL "IAR")
+  if("x${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}" STREQUAL "xIAR")
     # primary necessary to detect architecture, so the right archiver and linker can be picked
     # eg. IAR Assembler V8.10.1.12857/W32 for ARM
     # Cut out identification first, newline handling is a pain

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=712af07e4792beea6f3b62bddace9077d7fec525
commit 712af07e4792beea6f3b62bddace9077d7fec525
Author:     Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Thu Jul 13 11:00:40 2017 -0400
Commit:     Robert Maynard <robert.maynard at kitware.com>
CommitDate: Thu Jul 13 11:23:16 2017 -0400

    CUDA: CMAKE_EXPORT_COMPILE_COMMANDS now works with CUDA and Ninja
    
    Fixes: #17061

diff --git a/Modules/CMakeCUDAInformation.cmake b/Modules/CMakeCUDAInformation.cmake
index 780e953..9bba847 100644
--- a/Modules/CMakeCUDAInformation.cmake
+++ b/Modules/CMakeCUDAInformation.cmake
@@ -104,7 +104,9 @@ include(CMakeCommonLanguageInclude)
 # now define the following rules:
 # CMAKE_CUDA_CREATE_SHARED_LIBRARY
 # CMAKE_CUDA_CREATE_SHARED_MODULE
-# CMAKE_CUDA_COMPILE_OBJECT
+# CMAKE_CUDA_COMPILE_WHOLE_COMPILATION
+# CMAKE_CUDA_COMPILE_PTX_COMPILATION
+# CMAKE_CUDA_COMPILE_SEPARABLE_COMPILATION
 # CMAKE_CUDA_LINK_EXECUTABLE
 
 if(CMAKE_CUDA_HOST_COMPILER)
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 2f4cccb..d38dbcb 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -1064,13 +1064,28 @@ void cmNinjaTargetGenerator::ExportObjectCompileCommand(
   compileObjectVars.Includes = includes.c_str();
 
   // Rule for compiling object file.
-  std::string compileCmdVar = "CMAKE_";
-  compileCmdVar += language;
-  compileCmdVar += "_COMPILE_OBJECT";
-  std::string compileCmd =
-    this->GetMakefile()->GetRequiredDefinition(compileCmdVar);
   std::vector<std::string> compileCmds;
-  cmSystemTools::ExpandListArgument(compileCmd, compileCmds);
+  if (language == "CUDA") {
+    std::string cmdVar;
+    if (this->GeneratorTarget->GetPropertyAsBool(
+          "CUDA_SEPARABLE_COMPILATION")) {
+      cmdVar = std::string("CMAKE_CUDA_COMPILE_SEPARABLE_COMPILATION");
+    } else if (this->GeneratorTarget->GetPropertyAsBool(
+                 "CUDA_PTX_COMPILATION")) {
+      cmdVar = std::string("CMAKE_CUDA_COMPILE_PTX_COMPILATION");
+    } else {
+      cmdVar = std::string("CMAKE_CUDA_COMPILE_WHOLE_COMPILATION");
+    }
+    std::string compileCmd =
+      this->GetMakefile()->GetRequiredDefinition(cmdVar);
+    cmSystemTools::ExpandListArgument(compileCmd, compileCmds);
+  } else {
+    const std::string cmdVar =
+      std::string("CMAKE_") + language + "_COMPILE_OBJECT";
+    std::string compileCmd =
+      this->GetMakefile()->GetRequiredDefinition(cmdVar);
+    cmSystemTools::ExpandListArgument(compileCmd, compileCmds);
+  }
 
   CM_AUTO_PTR<cmRulePlaceholderExpander> rulePlaceholderExpander(
     this->GetLocalGenerator()->CreateRulePlaceholderExpander());

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fda50a08437d99aba753bc84d26ba535e06e7b06
commit fda50a08437d99aba753bc84d26ba535e06e7b06
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Jul 10 10:30:17 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jul 12 15:09:16 2017 -0400

    CMakePushCheckState: Fix cmake_push_check_state RESET argument
    
    This option was added by commit v2.8.12~138^2 (Add
    cmake_reset_check_state() macro, 2013-07-28) but has never worked.
    Fix the implementation to refer to macro arguments properly (not as
    normal variables).
    
    Fixes: #17048

diff --git a/Modules/CMakePushCheckState.cmake b/Modules/CMakePushCheckState.cmake
index 2a527d5..98eea05 100644
--- a/Modules/CMakePushCheckState.cmake
+++ b/Modules/CMakePushCheckState.cmake
@@ -62,7 +62,7 @@ macro(CMAKE_PUSH_CHECK_STATE)
    set(_CMAKE_REQUIRED_FLAGS_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER}       ${CMAKE_REQUIRED_FLAGS})
    set(_CMAKE_REQUIRED_QUIET_SAVE_${_CMAKE_PUSH_CHECK_STATE_COUNTER}       ${CMAKE_REQUIRED_QUIET})
 
-   if (ARGC GREATER 0 AND ARGV0 STREQUAL "RESET")
+   if (${ARGC} GREATER 0 AND "${ARGV0}" STREQUAL "RESET")
       cmake_reset_check_state()
    endif()
 
diff --git a/Tests/CMakeTests/PushCheckStateTest.cmake.in b/Tests/CMakeTests/PushCheckStateTest.cmake.in
index b4c48f4..cbd879d 100644
--- a/Tests/CMakeTests/PushCheckStateTest.cmake.in
+++ b/Tests/CMakeTests/PushCheckStateTest.cmake.in
@@ -1,3 +1,4 @@
+cmake_minimum_required(VERSION 3.8)
 include(CMakePushCheckState)
 
 set(CMAKE_EXTRA_INCLUDE_FILES file1)
@@ -26,6 +27,27 @@ set(CMAKE_REQUIRED_LIBRARIES lib3)
 set(CMAKE_REQUIRED_FLAGS flag3)
 set(CMAKE_REQUIRED_QUIET 3)
 
+cmake_push_check_state(RESET)
+
+foreach(pair IN ITEMS
+  EXTRA_INCLUDE_FILES|
+  REQUIRED_INCLUDES|
+  REQUIRED_DEFINITIONS|
+  REQUIRED_LIBRARIES|
+  REQUIRED_FLAGS|
+  REQUIRED_QUIET|
+  )
+  string(REPLACE "|" ";" pair "${pair}")
+  list(GET pair 0 var)
+  list(GET pair 1 expected)
+  if (NOT "${CMAKE_${var}}" STREQUAL "${expected}")
+    set(fatal TRUE)
+    message("ERROR: CMAKE_${var} is \"${CMAKE_${var}}\" (expected \"${expected}\")" )
+  endif()
+endforeach()
+
+cmake_pop_check_state()
+
 cmake_pop_check_state()
 
 foreach(pair IN ITEMS

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=21ee3309b2a4d598bf933f644b41cd4840cde8c3
commit 21ee3309b2a4d598bf933f644b41cd4840cde8c3
Author:     Michael Stürmer <michael.stuermer at schaeffler.com>
AuthorDate: Wed Jul 12 15:45:28 2017 +0200
Commit:     Michael Stürmer <michael.stuermer at schaeffler.com>
CommitDate: Wed Jul 12 15:45:28 2017 +0200

    VS: print comment in CSharp target only if it is actually set

diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index e4a4d6f..5570593 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -3553,7 +3553,11 @@ void cmVisualStudio10TargetGenerator::WriteEvent(
     (*this->BuildFileStream) << cmVS10EscapeXML(comment) << "</Message>\n";
     this->WriteString("<Command>", 3);
   } else {
-    if (!comment.empty()) {
+    std::string strippedComment = comment;
+    strippedComment.erase(
+      std::remove(strippedComment.begin(), strippedComment.end(), '\t'),
+      strippedComment.end());
+    if (!comment.empty() && !strippedComment.empty()) {
       (*this->BuildFileStream) << "echo " << cmVS10EscapeXML(comment) << "\n";
     }
   }

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

Summary of changes:
 Modules/CMakeCUDAInformation.cmake           |    4 +++-
 Modules/CMakeDetermineASMCompiler.cmake      |    2 +-
 Modules/CMakePushCheckState.cmake            |    2 +-
 Source/cmNinjaTargetGenerator.cxx            |   27 ++++++++++++++++++++------
 Source/cmVisualStudio10TargetGenerator.cxx   |    6 +++++-
 Tests/CMakeTests/PushCheckStateTest.cmake.in |   22 +++++++++++++++++++++
 6 files changed, 53 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list