[Cmake-commits] CMake branch, next, updated. v2.8.11.2-3304-g5eabee0

Robert Maynard robert.maynard at kitware.com
Tue Jul 23 14:57:26 EDT 2013


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  5eabee0bd6ec7632ab9db98e0d71860a0203f88a (commit)
       via  ded153c475af2d482e5903f7c128739f7ef7f8e9 (commit)
      from  adfb1689bf88067c94b72494fb44f81d2020732c (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=5eabee0bd6ec7632ab9db98e0d71860a0203f88a
commit 5eabee0bd6ec7632ab9db98e0d71860a0203f88a
Merge: adfb168 ded153c
Author:     Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Tue Jul 23 14:57:23 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jul 23 14:57:23 2013 -0400

    Merge topic 'ninja_bad_cmcldeps_paths' into next
    
    ded153c Ninja: Update BuildDepends test to verify cmcldeps depfiles.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ded153c475af2d482e5903f7c128739f7ef7f8e9
commit ded153c475af2d482e5903f7c128739f7ef7f8e9
Author:     Robert Maynard <robert.maynard at kitware.com>
AuthorDate: Tue Jul 23 14:53:00 2013 -0400
Commit:     Robert Maynard <robert.maynard at kitware.com>
CommitDate: Tue Jul 23 14:53:00 2013 -0400

    Ninja: Update BuildDepends test to verify cmcldeps depfiles.

diff --git a/Tests/BuildDepends/CMakeLists.txt b/Tests/BuildDepends/CMakeLists.txt
index 2792751..ce0c039 100644
--- a/Tests/BuildDepends/CMakeLists.txt
+++ b/Tests/BuildDepends/CMakeLists.txt
@@ -93,6 +93,26 @@ if(NOT RESULT)
   message(SEND_ERROR "Could not build test project (1)!")
 endif()
 
+# find and save the ninjadep executable
+set(ninjadep ${BuildDepends_BINARY_DIR}/Project/ninjadep${CMAKE_EXECUTABLE_SUFFIX})
+if(EXISTS
+    "${BuildDepends_BINARY_DIR}/Project/Debug/ninjadep${CMAKE_EXECUTABLE_SUFFIX}" )
+  message("found debug")
+  set(ninjadep
+    "${BuildDepends_BINARY_DIR}/Project/Debug/ninjadep${CMAKE_EXECUTABLE_SUFFIX}")
+endif()
+message("Running ${ninjadep}  ")
+execute_process(COMMAND ${ninjadep} OUTPUT_VARIABLE out RESULT_VARIABLE runResult)
+string(REGEX REPLACE "[\r\n]" " " out "${out}")
+message("Run result: ${runResult} Output: \"${out}\"")
+
+if("${out}" STREQUAL "HEADER_STRING: ninja ")
+  message("Worked!")
+else()
+  message(SEND_ERROR "Project did not rebuild properly. Output[${out}]\n"
+    " expected [HEADER_STRING: ninja]")
+endif()
+
 set(bar ${BuildDepends_BINARY_DIR}/Project/bar${CMAKE_EXECUTABLE_SUFFIX})
 if(EXISTS
     "${BuildDepends_BINARY_DIR}/Project/Debug/bar${CMAKE_EXECUTABLE_SUFFIX}" )
@@ -151,6 +171,8 @@ execute_process(COMMAND ${bar} -infinite TIMEOUT 3 OUTPUT_VARIABLE out)
 message("Modifying Project/foo.cxx")
 write_file(${BuildDepends_BINARY_DIR}/Project/foo.cxx
   "const char* foo() { return \"foo changed\";}" )
+file(WRITE "${BuildDepends_BINARY_DIR}/Project/dir/header.txt"
+  "#define HEADER_STRING \"ninja changed\"\n" )
 file(WRITE ${BuildDepends_BINARY_DIR}/Project/zot.hxx.in
   "static const char* zot = \"zot changed\";\n")
 file(WRITE ${BuildDepends_BINARY_DIR}/Project/zot_custom.hxx.in
@@ -204,6 +226,18 @@ if(EXISTS
   message("found debug")
 endif()
 
+message("Running ${ninjadep}  ")
+execute_process(COMMAND ${ninjadep} OUTPUT_VARIABLE out RESULT_VARIABLE runResult)
+string(REGEX REPLACE "[\r\n]" " " out "${out}")
+message("Run result: ${runResult} Output: \"${out}\"")
+
+if("${out}" STREQUAL "HEADER_STRING: ninja changed ")
+  message("Worked!")
+else()
+  message(SEND_ERROR "Project did not rebuild properly. Output[${out}]\n"
+    " expected [HEADER_STRING: ninja changed]")
+endif()
+
 message("Running ${bar}  ")
 execute_process(COMMAND ${bar} OUTPUT_VARIABLE out RESULT_VARIABLE runResult)
 string(REGEX REPLACE "[\r\n]" " " out "${out}")
diff --git a/Tests/BuildDepends/Project/CMakeLists.txt b/Tests/BuildDepends/Project/CMakeLists.txt
index f8a3d15..df62fa6 100644
--- a/Tests/BuildDepends/Project/CMakeLists.txt
+++ b/Tests/BuildDepends/Project/CMakeLists.txt
@@ -123,3 +123,18 @@ add_custom_target(link_depends_no_shared_check ALL
    -P ${CMAKE_CURRENT_SOURCE_DIR}/link_depends_no_shared_check.cmake
   )
 add_dependencies(link_depends_no_shared_check link_depends_no_shared_exe)
+
+# add a test for ninja dep handler
+add_custom_command(
+  OUTPUT  ${CMAKE_CURRENT_BINARY_DIR}/dir/header.h
+  DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/dir/header.txt
+  COMMAND ${CMAKE_COMMAND} -E copy_if_different
+  ${CMAKE_CURRENT_SOURCE_DIR}/dir/header.txt
+  ${CMAKE_CURRENT_BINARY_DIR}/dir/header.h
+  )
+set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/dir/header.h
+  PROPERTIES GENERATED 1)
+add_custom_target(header_tgt DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/dir/header.h)
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+add_executable(ninjadep ninjadep.cpp)
+add_dependencies(ninjadep header_tgt)
\ No newline at end of file

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

Summary of changes:
 Tests/BuildDepends/CMakeLists.txt         |   34 +++++++++++++++++++++++++++++
 Tests/BuildDepends/Project/CMakeLists.txt |   15 ++++++++++++
 2 files changed, 49 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list