[Cmake-commits] CMake branch, next, updated. v3.5.2-1469-g1186c69

Brad King brad.king at kitware.com
Wed May 18 09:26:30 EDT 2016


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  1186c697351081db7f7e886d00bd94b8311d362b (commit)
       via  eb076692459a8d4cc214156af3553c36309bdce3 (commit)
      from  ea38bd083ec543dc0015592f250db27642139f0e (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=1186c697351081db7f7e886d00bd94b8311d362b
commit 1186c697351081db7f7e886d00bd94b8311d362b
Merge: ea38bd0 eb07669
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed May 18 09:26:29 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed May 18 09:26:29 2016 -0400

    Merge topic 'ninja-output-path-prefix' into next
    
    eb076692 Tests: Select RunCMake.Ninja test cases based on ninja version


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eb076692459a8d4cc214156af3553c36309bdce3
commit eb076692459a8d4cc214156af3553c36309bdce3
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed May 18 09:24:54 2016 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed May 18 09:24:54 2016 -0400

    Tests: Select RunCMake.Ninja test cases based on ninja version
    
    Some test cases need features not available in Ninja < 1.6, so check the
    version before running them.

diff --git a/Tests/RunCMake/Ninja/RunCMakeTest.cmake b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
index 8160c2d..c73f852 100644
--- a/Tests/RunCMake/Ninja/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Ninja/RunCMakeTest.cmake
@@ -1,5 +1,20 @@
 include(RunCMake)
 
+# Detect ninja version so we know what tests can be supported.
+execute_process(
+  COMMAND "${RunCMake_MAKE_PROGRAM}" --version
+  OUTPUT_VARIABLE ninja_out
+  ERROR_VARIABLE ninja_out
+  RESULT_VARIABLE ninja_res
+  OUTPUT_STRIP_TRAILING_WHITESPACE
+  )
+if(ninja_res EQUAL 0 AND "x${ninja_out}" MATCHES "^x[0-9]+\\.[0-9]+")
+  set(ninja_version "${ninja_out}")
+  message(STATUS "ninja version: ${ninja_version}")
+else()
+  message(FATAL_ERROR "'ninja --version' reported:\n${ninja_out}")
+endif()
+
 function(run_CMP0058 case)
   # Use a single build tree for a few tests without cleaning.
   set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/CMP0058-${case}-build)
@@ -169,6 +184,11 @@ build build.ninja: RERUN ${escaped_build_ninja_dep} || ${escaped_ninja_output_pa
 
 endfunction(run_sub_cmake)
 
+if("${ninja_version}" VERSION_LESS 1.6)
+  message(WARNING "Ninja is too old; skipping rest of test.")
+  return()
+endif()
+
 foreach(ninja_output_path_prefix "sub space" "sub")
   run_sub_cmake(Executable "${ninja_output_path_prefix}")
   run_sub_cmake(StaticLib  "${ninja_output_path_prefix}")

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

Summary of changes:
 Tests/RunCMake/Ninja/RunCMakeTest.cmake |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list