[Cmake-commits] CMake branch, next, updated. v3.1.1-2295-gc0130af

Brad King brad.king at kitware.com
Sat Jan 24 07:35:17 EST 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  c0130af037373d853ee78465e9f5ef6547991bbd (commit)
       via  9928a397deee6c6aa148ab27cdd15b5ff732b4e5 (commit)
       via  c663ec799e1f02efcf192d652e67095da4c134cc (commit)
      from  57b028dffc1408e39e7112c5fdde4b2efb067280 (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=c0130af037373d853ee78465e9f5ef6547991bbd
commit c0130af037373d853ee78465e9f5ef6547991bbd
Merge: 57b028d 9928a39
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Sat Jan 24 07:35:15 2015 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sat Jan 24 07:35:15 2015 -0500

    Merge topic 'test-rerun-cmake' into next
    
    9928a397 fixup! try_compile: Test that CMake re-runs on input change
    c663ec79 Tests/RunCMake: Honor CMAKE_MAKE_PROGRAM


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9928a397deee6c6aa148ab27cdd15b5ff732b4e5
commit 9928a397deee6c6aa148ab27cdd15b5ff732b4e5
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Sat Jan 24 07:29:27 2015 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Sat Jan 24 07:29:50 2015 -0500

    fixup! try_compile: Test that CMake re-runs on input change
    
    Fix to work with ninja < 1.5.

diff --git a/Tests/RunCMake/try_compile/RerunCMake-nowork-ninja-no-console-stdout.txt b/Tests/RunCMake/try_compile/RerunCMake-nowork-ninja-no-console-stdout.txt
new file mode 100644
index 0000000..e600b9b
--- /dev/null
+++ b/Tests/RunCMake/try_compile/RerunCMake-nowork-ninja-no-console-stdout.txt
@@ -0,0 +1 @@
+^ninja: no work to do\.$
diff --git a/Tests/RunCMake/try_compile/RerunCMake-rerun-ninja-no-console-stdout.txt b/Tests/RunCMake/try_compile/RerunCMake-rerun-ninja-no-console-stdout.txt
new file mode 100644
index 0000000..e1a1b5a
--- /dev/null
+++ b/Tests/RunCMake/try_compile/RerunCMake-rerun-ninja-no-console-stdout.txt
@@ -0,0 +1,5 @@
+Running CMake on RerunCMake
+FALSE
+-- Configuring done
+-- Generating done
+-- Build files have been written to: .*Tests/RunCMake/try_compile/RerunCMake-build
diff --git a/Tests/RunCMake/try_compile/RunCMakeTest.cmake b/Tests/RunCMake/try_compile/RunCMakeTest.cmake
index f9e43fe..6cdbafa 100644
--- a/Tests/RunCMake/try_compile/RunCMakeTest.cmake
+++ b/Tests/RunCMake/try_compile/RunCMakeTest.cmake
@@ -27,15 +27,25 @@ if(RunCMake_GENERATOR MATCHES "Make|Ninja")
   set(in_tc  "${RunCMake_TEST_BINARY_DIR}/TryCompileInput.c")
   file(WRITE "${in_tc}" "int main(void) { return 0; }\n")
 
+  # Older Ninja keeps all rerun output on stdout
+  set(ninja "")
+  if(RunCMake_GENERATOR STREQUAL "Ninja")
+    execute_process(COMMAND ${RunCMake_MAKE_PROGRAM} --version
+      OUTPUT_VARIABLE ninja_version OUTPUT_STRIP_TRAILING_WHITESPACE)
+    if(ninja_version VERSION_LESS 1.5)
+      set(ninja -ninja-no-console)
+    endif()
+  endif()
+
   message(STATUS "RerunCMake: first configuration...")
   run_cmake(RerunCMake)
-  run_cmake_command(RerunCMake-nowork ${CMAKE_COMMAND} --build .)
+  run_cmake_command(RerunCMake-nowork${ninja} ${CMAKE_COMMAND} --build .)
 
   execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1) # handle 1s resolution
   message(STATUS "RerunCMake: modify try_compile input...")
   file(WRITE "${in_tc}" "does-not-compile\n")
-  run_cmake_command(RerunCMake-rerun ${CMAKE_COMMAND} --build .)
-  run_cmake_command(RerunCMake-nowork ${CMAKE_COMMAND} --build .)
+  run_cmake_command(RerunCMake-rerun${ninja} ${CMAKE_COMMAND} --build .)
+  run_cmake_command(RerunCMake-nowork${ninja} ${CMAKE_COMMAND} --build .)
 
   unset(RunCMake_TEST_BINARY_DIR)
   unset(RunCMake_TEST_NO_CLEAN)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c663ec799e1f02efcf192d652e67095da4c134cc
commit c663ec799e1f02efcf192d652e67095da4c134cc
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Sat Jan 24 07:08:12 2015 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Sat Jan 24 07:25:00 2015 -0500

    Tests/RunCMake: Honor CMAKE_MAKE_PROGRAM
    
    If tests are using an explicit make program, pass it through to RunCMake
    tests so that any that actually do build use the expected tool.

diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 3a61751..12c1f47 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -6,6 +6,7 @@ macro(add_RunCMake_test test)
     -DRunCMake_GENERATOR=${CMAKE_GENERATOR}
     -DRunCMake_GENERATOR_PLATFORM=${CMAKE_GENERATOR_PLATFORM}
     -DRunCMake_GENERATOR_TOOLSET=${CMAKE_GENERATOR_TOOLSET}
+    -DRunCMake_MAKE_PROGRAM=${CMake_TEST_EXPLICIT_MAKE_PROGRAM}
     -DRunCMake_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}/${test}
     -DRunCMake_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}/${test}
     ${${test}_ARGS}
diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake
index 1625741..23f2f97 100644
--- a/Tests/RunCMake/RunCMake.cmake
+++ b/Tests/RunCMake/RunCMake.cmake
@@ -48,6 +48,9 @@ function(run_cmake test)
   if(APPLE)
     list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_POLICY_DEFAULT_CMP0025=NEW)
   endif()
+  if(RunCMake_MAKE_PROGRAM)
+    list(APPEND RunCMake_TEST_OPTIONS "-DCMAKE_MAKE_PROGRAM=${RunCMake_MAKE_PROGRAM}")
+  endif()
   if(RunCMake_TEST_COMMAND)
     execute_process(
       COMMAND ${RunCMake_TEST_COMMAND}

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

Summary of changes:
 Tests/RunCMake/CMakeLists.txt                          |    1 +
 Tests/RunCMake/RunCMake.cmake                          |    3 +++
 .../RerunCMake-nowork-ninja-no-console-stdout.txt      |    1 +
 ...xt => RerunCMake-rerun-ninja-no-console-stdout.txt} |    2 ++
 Tests/RunCMake/try_compile/RunCMakeTest.cmake          |   16 +++++++++++++---
 5 files changed, 20 insertions(+), 3 deletions(-)
 create mode 100644 Tests/RunCMake/try_compile/RerunCMake-nowork-ninja-no-console-stdout.txt
 copy Tests/RunCMake/try_compile/{RerunCMake-stdout.txt => RerunCMake-rerun-ninja-no-console-stdout.txt} (78%)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list