[Cmake-commits] CMake branch, next, updated. v3.1.3-1355-g986876b

Brad King brad.king at kitware.com
Fri Feb 13 11:52:07 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  986876baf18dfee425a883741ec1a9b65a203e53 (commit)
       via  d891d47434a181f14554622118c39c954d6a9466 (commit)
      from  2baea07bc34071eddb9a54701b1831d96a590e64 (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=986876baf18dfee425a883741ec1a9b65a203e53
commit 986876baf18dfee425a883741ec1a9b65a203e53
Merge: 2baea07 d891d47
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Feb 13 11:52:06 2015 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Feb 13 11:52:06 2015 -0500

    Merge topic 'test-rpmbuild-cleanup' into next
    
    d891d474 Tests: Consolidate detection of 'rpmbuild'

diff --cc Tests/RunCMake/CMakeLists.txt
index 8e4aaec,f0426e5..7715f1c
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@@ -195,11 -195,6 +195,11 @@@ add_RunCMake_test(IfacePaths_INCLUDE_DI
  set(IfacePaths_SOURCES_ARGS -DTEST_PROP=SOURCES)
  add_RunCMake_test(IfacePaths_SOURCES TEST_DIR IfacePaths)
  
- if(RPMBUILD)
+ if(RPMBUILD_EXECUTABLE)
    add_RunCMake_test(CPackRPM)
  endif()
 +
 +# Matlab module related tests
 +if(CMake_TEST_FindMatlab)
 +  add_RunCMake_test(FindMatlab)
 +endif()

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=d891d47434a181f14554622118c39c954d6a9466
commit d891d47434a181f14554622118c39c954d6a9466
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Feb 13 11:47:47 2015 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Feb 13 11:50:38 2015 -0500

    Tests: Consolidate detection of 'rpmbuild'
    
    Several tests use slight variations of the same logic to enable CPack
    RPM tests.  Consolidate this logic into one check before any tests are
    added.  Look for 'rpmbuild' only on Linux and only when the test build
    tree does not have spaces in the path.  In particular, this will make
    the result available in time for the RunCMake.CPackRPM test to be
    activated even if CMake is configured exactly once.

diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 7e7aa2e..cb45e79 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -102,6 +102,17 @@ if(BUILD_TESTING)
     list(APPEND build_options -DCMAKE_MAKE_PROGRAM:FILEPATH=${CMake_TEST_EXPLICIT_MAKE_PROGRAM})
   endif()
 
+  # Look for rpmbuild to use for tests.
+  # The tool does not work with spaces in the path.
+  if (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT CMAKE_CURRENT_BINARY_DIR MATCHES " ")
+    find_program(RPMBUILD_EXECUTABLE NAMES rpmbuild)
+  else()
+    set(RPMBUILD_EXECUTABLE "RPMBUILD_EXECUTABLE-NOTFOUND")
+  endif()
+
+  #---------------------------------------------------------------------------
+  # Add tests below here.
+
   if(NOT CMake_TEST_EXTERNAL_CMAKE)
     add_subdirectory(CMakeLib)
   endif()
@@ -826,11 +837,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
   set(CTEST_package_X11_TEST ${CTEST_TEST_CPACK})
   set(CTEST_RUN_CPackComponentsForAll ${CTEST_TEST_CPACK})
 
-  if (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT CMAKE_CURRENT_BINARY_DIR MATCHES " ")
-    find_program(RPMBUILD NAMES rpmbuild)
-  endif()
   # Do not try to build RPM
-  if (NOT RPMBUILD)
+  if (NOT RPMBUILD_EXECUTABLE)
     set(CPACK_BINARY_RPM OFF)
   endif()
 
@@ -912,7 +920,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
   if(CTEST_RUN_CPackComponentsForAll)
     # Check whether if rpmbuild command is found
     # before adding RPM tests
-    find_program(RPMBUILD_EXECUTABLE NAMES rpmbuild)
     if(RPMBUILD_EXECUTABLE)
       list(APPEND ACTIVE_CPACK_GENERATORS RPM)
     endif()
@@ -931,11 +938,9 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
     if(APPLE)
       list(APPEND GENLST "DragNDrop")
     endif()
-    if (NOT CMAKE_CURRENT_BINARY_DIR MATCHES " ")
-      list(FIND ACTIVE_CPACK_GENERATORS "RPM" RPM_ACTIVE)
-      if (NOT ${RPM_ACTIVE} EQUAL -1)
-        list(APPEND GENLST "RPM")
-      endif()
+    list(FIND ACTIVE_CPACK_GENERATORS "RPM" RPM_ACTIVE)
+    if (NOT ${RPM_ACTIVE} EQUAL -1)
+      list(APPEND GENLST "RPM")
     endif()
     list(FIND ACTIVE_CPACK_GENERATORS "DEB" DEB_ACTIVE)
     if (NOT ${DEB_ACTIVE} EQUAL -1)
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 2de82a7..f0426e5 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -195,6 +195,6 @@ add_RunCMake_test(IfacePaths_INCLUDE_DIRECTORIES TEST_DIR IfacePaths)
 set(IfacePaths_SOURCES_ARGS -DTEST_PROP=SOURCES)
 add_RunCMake_test(IfacePaths_SOURCES TEST_DIR IfacePaths)
 
-if(RPMBUILD)
+if(RPMBUILD_EXECUTABLE)
   add_RunCMake_test(CPackRPM)
 endif()

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

Summary of changes:
 Tests/CMakeLists.txt          |   25 +++++++++++++++----------
 Tests/RunCMake/CMakeLists.txt |    2 +-
 2 files changed, 16 insertions(+), 11 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list