[Cmake-commits] CMake branch, next, updated. v3.2.2-3024-g08eed49

Daniele E. Domenichelli daniele.domenichelli at gmail.com
Wed May 20 11:32:57 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  08eed49eb94d1b9851decc0828f7b56a36a68380 (commit)
       via  a0d620de829b09c0edf594b2578cfa47e855f695 (commit)
       via  e6fac4f8d941507eebfae799f00ab0065ba5e348 (commit)
      from  83f6859165e52c56418cd400fee01676c6298420 (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=08eed49eb94d1b9851decc0828f7b56a36a68380
commit 08eed49eb94d1b9851decc0828f7b56a36a68380
Merge: 83f6859 a0d620d
Author:     Daniele E. Domenichelli <daniele.domenichelli at gmail.com>
AuthorDate: Wed May 20 11:32:56 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed May 20 11:32:56 2015 -0400

    Merge topic 'ExternalProject_FixLog' into next
    
    a0d620de ExternalProject: Fix log when the first arg of commands is "COMMAND" (#15567)
    e6fac4f8 CMake Nightly Date Stamp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a0d620de829b09c0edf594b2578cfa47e855f695
commit a0d620de829b09c0edf594b2578cfa47e855f695
Author:     Daniele E. Domenichelli <daniele.domenichelli at iit.it>
AuthorDate: Wed May 20 15:14:17 2015 +0200
Commit:     Daniele E. Domenichelli <daniele.domenichelli at iit.it>
CommitDate: Wed May 20 15:43:15 2015 +0200

    ExternalProject: Fix log when the first arg of commands is "COMMAND" (#15567)

diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 7cf9d79..11a24b8 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -1282,7 +1282,7 @@ endif()
 
   # Wrap multiple 'COMMAND' lines up into a second-level wrapper
   # script so all output can be sent to one log file.
-  if(command MATCHES ";COMMAND;")
+  if(command MATCHES "(^|;)COMMAND;")
     set(code_execute_process "
 ${code_cygpath_make}
 execute_process(COMMAND \${command} RESULT_VARIABLE result)
@@ -1299,7 +1299,9 @@ endif()
     set(sep "")
     foreach(arg IN LISTS command)
       if("x${arg}" STREQUAL "xCOMMAND")
-        set(code "${code}set(command \"${cmd}\")${code_execute_process}")
+        if(NOT "x${cmd}" STREQUAL "x")
+          set(code "${code}set(command \"${cmd}\")${code_execute_process}")
+        endif()
         set(cmd "")
         set(sep "")
       else()
diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt
index d2fa86a..de62ce7 100644
--- a/Tests/ExternalProject/CMakeLists.txt
+++ b/Tests/ExternalProject/CMakeLists.txt
@@ -492,3 +492,38 @@ message(STATUS "do_cvs_tests='${do_cvs_tests}'")
 message(STATUS "do_svn_tests='${do_svn_tests}'")
 message(STATUS "do_git_tests='${do_git_tests}' GIT_EXECUTABLE='${GIT_EXECUTABLE}'")
 message(STATUS "do_hg_tests='${do_hg_tests}'   HG_EXECUTABLE='${HG_EXECUTABLE}'")
+
+
+# Test if log works when the first arguments of *_COMMAND is "COMMAND".
+set(proj ExternalProject-no-log)
+set(download_cmd "")
+set(patch_cmd "")
+set(update_cmd "")
+set(configure_cmd "")
+set(build_cmd "")
+set(install_cmd "")
+
+ExternalProject_Add(${proj}
+  DOWNLOAD_COMMAND "${download_cmd}" COMMAND "${CMAKE_COMMAND}" -E echo "download"
+  PATCH_COMMAND "${patch_cmd}" COMMAND "${CMAKE_COMMAND}" -E echo "patch"
+  UPDATE_COMMAND "${update_cmd}" COMMAND "${CMAKE_COMMAND}" -E echo "update"
+  CONFIGURE_COMMAND "${configure_cmd}" COMMAND "${CMAKE_COMMAND}" -E echo "configure"
+  BUILD_COMMAND "${build_cmd}" COMMAND "${CMAKE_COMMAND}" -E echo "build"
+  INSTALL_COMMAND "${install_cmd}" COMMAND "${CMAKE_COMMAND}" -E echo "install"
+  )
+
+set(proj ExternalProject-log)
+ExternalProject_Add(${proj}
+  DOWNLOAD_COMMAND "${download_cmd}" COMMAND "${CMAKE_COMMAND}" -E echo "download"
+  PATCH_COMMAND "${patch_cmd}" COMMAND "${CMAKE_COMMAND}" -E echo "patch"
+  UPDATE_COMMAND "${update_cmd}" COMMAND "${CMAKE_COMMAND}" -E echo "update"
+  CONFIGURE_COMMAND "${configure_cmd}" COMMAND "${CMAKE_COMMAND}" -E echo "configure"
+  BUILD_COMMAND "${build_cmd}" COMMAND "${CMAKE_COMMAND}" -E echo "build"
+  INSTALL_COMMAND "${install_cmd}" COMMAND "${CMAKE_COMMAND}" -E echo "install"
+  LOG_DOWNLOAD 1
+  LOG_PATCH 1
+  LOG_UPDATE 1
+  LOG_CONFIGURE 1
+  LOG_BUILD 1
+  LOG_INSTALL 1
+  )

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

Summary of changes:
 Modules/ExternalProject.cmake        |    6 ++++--
 Source/CMakeVersion.cmake            |    2 +-
 Tests/ExternalProject/CMakeLists.txt |   35 ++++++++++++++++++++++++++++++++++
 3 files changed, 40 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list