[Cmake-commits] CMake branch, next, updated. v3.2.1-1732-g5c86b23

Brad King brad.king at kitware.com
Fri Apr 10 16:27:07 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  5c86b23872900b30ed05b566f4d90b48e3c2873e (commit)
       via  5ee33f5b153921b8e9d8e91e3f92d0ee01a3fc9a (commit)
      from  35db5e8519ba4a6859d61c7861d06e8516bb7e0f (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=5c86b23872900b30ed05b566f4d90b48e3c2873e
commit 5c86b23872900b30ed05b566f4d90b48e3c2873e
Merge: 35db5e8 5ee33f5
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Apr 10 16:27:06 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Apr 10 16:27:06 2015 -0400

    Merge topic 'custom-command-multiple-outputs' into next
    
    5ee33f5b fixup! Makefile: Fix multiple custom command outputs with one missing


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5ee33f5b153921b8e9d8e91e3f92d0ee01a3fc9a
commit 5ee33f5b153921b8e9d8e91e3f92d0ee01a3fc9a
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Apr 10 16:22:44 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Apr 10 16:22:44 2015 -0400

    fixup! Makefile: Fix multiple custom command outputs with one missing

diff --git a/Tests/BuildDepends/CMakeLists.txt b/Tests/BuildDepends/CMakeLists.txt
index 0b1ff2c..2be59b6 100644
--- a/Tests/BuildDepends/CMakeLists.txt
+++ b/Tests/BuildDepends/CMakeLists.txt
@@ -42,6 +42,11 @@ list(APPEND _cmake_options "-DTEST_LINK_DEPENDS=${TEST_LINK_DEPENDS}")
 
 list(APPEND _cmake_options "-DCMAKE_FORCE_DEPFILES=1")
 
+if(NOT CMAKE_GENERATOR MATCHES "Visual Studio ([^6789]|[6789][0-9])")
+  set(TEST_MULTI3 1)
+  list(APPEND _cmake_options "-DTEST_MULTI3=1")
+endif()
+
 file(MAKE_DIRECTORY ${BuildDepends_BINARY_DIR}/Project)
 message("Creating Project/foo.cxx")
 write_file(${BuildDepends_BINARY_DIR}/Project/foo.cxx
@@ -67,6 +72,7 @@ set(link_depends_no_shared_check_txt ${BuildDepends_BINARY_DIR}/Project/link_dep
 file(WRITE ${BuildDepends_BINARY_DIR}/Project/external.in "external original\n")
 file(WRITE ${BuildDepends_BINARY_DIR}/Project/multi1-in.txt "multi1-in original\n")
 file(WRITE ${BuildDepends_BINARY_DIR}/Project/multi2-stamp.txt "multi2-stamp original\n")
+file(WRITE ${BuildDepends_BINARY_DIR}/Project/multi3-stamp.txt "multi3-stamp original\n")
 
 help_xcode_depends()
 
@@ -192,17 +198,32 @@ else()
     "multi1-out2-copy.txt is missing")
 endif()
 
-if(EXISTS ${BuildDepends_BINARY_DIR}/Project/multi2-out1.txt)
-  if(${BuildDepends_BINARY_DIR}/Project/multi2-out1.txt
+if(EXISTS ${BuildDepends_BINARY_DIR}/Project/multi2-real.txt)
+  if(${BuildDepends_BINARY_DIR}/Project/multi2-real.txt
       IS_NEWER_THAN ${BuildDepends_BINARY_DIR}/Project/multi2-stamp.txt)
-    message(STATUS "multi2-out1.txt is newer than multi2-stamp.txt")
+    message(STATUS "multi2-real.txt is newer than multi2-stamp.txt")
   else()
     message(SEND_ERROR "Project did not initially build properly: "
-      "multi2-out1.txt is not newer than multi2-stamp.txt")
+      "multi2-real.txt is not newer than multi2-stamp.txt")
   endif()
 else()
   message(SEND_ERROR "Project did not initially build properly: "
-    "multi2-out1.txt is missing")
+    "multi2-real.txt is missing")
+endif()
+
+if(TEST_MULTI3)
+  if(EXISTS ${BuildDepends_BINARY_DIR}/Project/multi3-real.txt)
+    if(${BuildDepends_BINARY_DIR}/Project/multi3-real.txt
+        IS_NEWER_THAN ${BuildDepends_BINARY_DIR}/Project/multi3-stamp.txt)
+      message(STATUS "multi3-real.txt is newer than multi3-stamp.txt")
+    else()
+      message(SEND_ERROR "Project did not initially build properly: "
+        "multi3-real.txt is not newer than multi3-stamp.txt")
+    endif()
+  else()
+    message(SEND_ERROR "Project did not initially build properly: "
+      "multi3-real.txt is missing")
+  endif()
 endif()
 
 message("Waiting 3 seconds...")
@@ -232,6 +253,7 @@ endif()
 file(WRITE ${BuildDepends_BINARY_DIR}/Project/external.in "external changed\n")
 file(WRITE ${BuildDepends_BINARY_DIR}/Project/multi1-in.txt "multi1-in changed\n")
 file(WRITE ${BuildDepends_BINARY_DIR}/Project/multi2-stamp.txt "multi2-stamp changed\n")
+file(WRITE ${BuildDepends_BINARY_DIR}/Project/multi3-stamp.txt "multi3-stamp changed\n")
 
 help_xcode_depends()
 
@@ -363,15 +385,30 @@ else()
     "multi1-out2-copy.txt is missing")
 endif()
 
-if(EXISTS ${BuildDepends_BINARY_DIR}/Project/multi2-out1.txt)
-  if(${BuildDepends_BINARY_DIR}/Project/multi2-out1.txt
+if(EXISTS ${BuildDepends_BINARY_DIR}/Project/multi2-real.txt)
+  if(${BuildDepends_BINARY_DIR}/Project/multi2-real.txt
       IS_NEWER_THAN ${BuildDepends_BINARY_DIR}/Project/multi2-stamp.txt)
-    message(STATUS "multi2-out1.txt is newer than multi2-stamp.txt")
+    message(STATUS "multi2-real.txt is newer than multi2-stamp.txt")
   else()
     message(SEND_ERROR "Project did not rebuild properly: "
-      "multi2-out1.txt is not newer than multi2-stamp.txt")
+      "multi2-real.txt is not newer than multi2-stamp.txt")
   endif()
 else()
   message(SEND_ERROR "Project did not rebuild properly: "
-    "multi2-out1.txt is missing")
+    "multi2-real.txt is missing")
+endif()
+
+if(TEST_MULTI3)
+  if(EXISTS ${BuildDepends_BINARY_DIR}/Project/multi3-real.txt)
+    if(${BuildDepends_BINARY_DIR}/Project/multi3-real.txt
+        IS_NEWER_THAN ${BuildDepends_BINARY_DIR}/Project/multi3-stamp.txt)
+      message(STATUS "multi3-real.txt is newer than multi3-stamp.txt")
+    else()
+      message(SEND_ERROR "Project did not rebuild properly: "
+        "multi3-real.txt is not newer than multi3-stamp.txt")
+    endif()
+  else()
+    message(SEND_ERROR "Project did not rebuild properly: "
+      "multi3-real.txt is missing")
+  endif()
 endif()
diff --git a/Tests/BuildDepends/Project/CMakeLists.txt b/Tests/BuildDepends/Project/CMakeLists.txt
index 9b2b5aa..0db39c5 100644
--- a/Tests/BuildDepends/Project/CMakeLists.txt
+++ b/Tests/BuildDepends/Project/CMakeLists.txt
@@ -165,9 +165,20 @@ add_custom_command(
   )
 add_custom_target(multi1 ALL DEPENDS multi1-out2-copy.txt)
 
+# Test having the first output never created.
 add_custom_command(
-  OUTPUT multi2-out1.txt multi2-out2.txt
-  COMMAND ${CMAKE_COMMAND} -E touch multi2-out1.txt
+  OUTPUT multi2-dummy.txt multi2-real.txt
+  COMMAND ${CMAKE_COMMAND} -E touch multi2-real.txt
   )
-set_property(SOURCE multi2-out1.txt multi2-out2.txt PROPERTY SYMBOLIC 1)
-add_custom_target(multi2 ALL DEPENDS multi2-out1.txt)
+set_property(SOURCE multi2-real.txt multi2-dummy.txt PROPERTY SYMBOLIC 1)
+add_custom_target(multi2 ALL DEPENDS multi2-real.txt)
+
+if(TEST_MULTI3)
+  # Test having the second output never created.  Does not work with msbuild.
+  add_custom_command(
+    OUTPUT multi3-real.txt multi3-dummy.txt
+    COMMAND ${CMAKE_COMMAND} -E touch multi3-real.txt
+    )
+  set_property(SOURCE multi3-real.txt multi3-dummy.txt PROPERTY SYMBOLIC 1)
+  add_custom_target(multi3 ALL DEPENDS multi3-real.txt)
+endif()

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

Summary of changes:
 Tests/BuildDepends/CMakeLists.txt         |   57 ++++++++++++++++++++++++-----
 Tests/BuildDepends/Project/CMakeLists.txt |   19 ++++++++--
 2 files changed, 62 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list