[Cmake-commits] CMake branch, next, updated. v3.2.2-2660-geefab19

Domen Vrankar domen.vrankar at gmail.com
Fri May 8 18:43:33 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  eefab19dc8f52df10efe4caa37b7c4fad61f0734 (commit)
       via  3f300b7ee3b0d7b30137fee2b284c27e05b152af (commit)
      from  db477914cb4ca2d41945e4e300801e7270a4d51d (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=eefab19dc8f52df10efe4caa37b7c4fad61f0734
commit eefab19dc8f52df10efe4caa37b7c4fad61f0734
Merge: db47791 3f300b7
Author:     Domen Vrankar <domen.vrankar at gmail.com>
AuthorDate: Fri May 8 18:43:32 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri May 8 18:43:32 2015 -0400

    Merge topic 'cpack-not-running-tests' into next
    
    3f300b7e CPack DEB and RPM tests not running


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3f300b7ee3b0d7b30137fee2b284c27e05b152af
commit 3f300b7ee3b0d7b30137fee2b284c27e05b152af
Author:     Domen Vrankar <domen.vrankar at gmail.com>
AuthorDate: Sat May 9 00:42:30 2015 +0200
Commit:     Domen Vrankar <domen.vrankar at gmail.com>
CommitDate: Sat May 9 00:42:30 2015 +0200

    CPack DEB and RPM tests not running
    
    CPack DEB and RPM generators were not used
    for some tests because CPACK_BINARY_DEB and
    CPACK_BINARY_RPM variable were not set.
    Patch fixes this, simplifies generators
    selection CTEST_RUN_CPackComponentsForAll
    and fixes bugs that were detected after
    tests were run.

diff --git a/Modules/CPackRPM.cmake b/Modules/CPackRPM.cmake
index e672e72..cb77fb8 100644
--- a/Modules/CPackRPM.cmake
+++ b/Modules/CPackRPM.cmake
@@ -1197,18 +1197,17 @@ function(cpack_rpm_generate_package)
      set(CPACK_RPM_COMPRESSION_TYPE_TMP "")
   endif()
 
-  if(CPACK_PACKAGE_RELOCATABLE)
-    set(CPACK_RPM_PACKAGE_RELOCATABLE TRUE)
-  endif()
-  if(CPACK_RPM_PACKAGE_RELOCATABLE)
+  if(CPACK_PACKAGE_RELOCATABLE OR CPACK_RPM_PACKAGE_RELOCATABLE)
     if(CPACK_RPM_PACKAGE_DEBUG)
       message("CPackRPM:Debug: Trying to build a relocatable package")
     endif()
     if(CPACK_SET_DESTDIR AND (NOT CPACK_SET_DESTDIR STREQUAL "I_ON"))
       message("CPackRPM:Warning: CPACK_SET_DESTDIR is set (=${CPACK_SET_DESTDIR}) while requesting a relocatable package (CPACK_RPM_PACKAGE_RELOCATABLE is set): this is not supported, the package won't be relocatable.")
+      set(CPACK_RPM_PACKAGE_RELOCATABLE FALSE)
     else()
       set(CPACK_RPM_PACKAGE_PREFIX ${CPACK_PACKAGING_INSTALL_PREFIX}) # kept for back compatibility (provided external RPM spec files)
       cpack_rpm_prepare_relocation_paths()
+      set(CPACK_RPM_PACKAGE_RELOCATABLE TRUE)
     endif()
   endif()
 
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 58feefd..f890e56 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -112,6 +112,22 @@ if(BUILD_TESTING)
     set(RPMBUILD_EXECUTABLE "RPMBUILD_EXECUTABLE-NOTFOUND")
   endif()
 
+  if(RPMBUILD_EXECUTABLE)
+    set(CPACK_BINARY_RPM ON)
+  else()
+    set(CPACK_BINARY_RPM OFF)
+  endif()
+
+  # Look for rpmbuild to use for tests.
+  # The tool does not work with spaces in the path.
+  find_program(DPKG_EXECUTABLE NAMES dpkg)
+
+  if(DPKG_EXECUTABLE)
+    set(CPACK_BINARY_DEB ON)
+  else()
+    set(CPACK_BINARY_DEB OFF)
+  endif()
+
   #---------------------------------------------------------------------------
   # Add tests below here.
 
@@ -865,11 +881,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
   set(CTEST_RUN_CPackComponentsForAll ${CTEST_TEST_CPACK})
   set(CTEST_RUN_CPackComponentsPrefix ${CTEST_TEST_CPACK})
 
-  # Do not try to build RPM
-  if (NOT RPMBUILD_EXECUTABLE)
-    set(CPACK_BINARY_RPM OFF)
-  endif()
-
   find_program(NSIS_MAKENSIS_EXECUTABLE NAMES makensis
     PATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\NSIS]
     DOC "makensis program location"
@@ -948,13 +959,12 @@ ${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
-    if(RPMBUILD_EXECUTABLE)
+    if(CPACK_BINARY_RPM)
       list(APPEND ACTIVE_CPACK_GENERATORS RPM)
     endif()
     # Check whether if dpkg command is found
     # before adding DEB tests
-    find_program(DPKG_EXECUTABLE NAMES dpkg)
-    if(DPKG_EXECUTABLE)
+    if(CPACK_BINARY_DEB)
       list(APPEND ACTIVE_CPACK_GENERATORS DEB)
     endif()
 
@@ -962,17 +972,9 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
     # now contains the list of 'active generators'
     set(CPackComponentsForAll_BUILD_OPTIONS)
     # set up list of CPack generators
-    list(APPEND GENLST "ZIP")
+    list(APPEND ACTIVE_CPACK_GENERATORS "ZIP")
     if(APPLE)
-      list(APPEND GENLST "DragNDrop")
-    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)
-      list(APPEND GENLST "DEB")
+      list(APPEND ACTIVE_CPACK_GENERATORS "DragNDrop")
     endif()
 
     # set up list of component packaging ways
@@ -980,7 +982,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release
     list(APPEND CWAYLST "OnePackPerGroup")
     list(APPEND CWAYLST "IgnoreGroup")
     list(APPEND CWAYLST "AllInOne")
-    foreach(CPackGen ${GENLST})
+    foreach(CPackGen IN LISTS ACTIVE_CPACK_GENERATORS)
       set(CPackRun_CPackGen  "-DCPackGen=${CPackGen}")
       foreach(CPackComponentWay ${CWAYLST})
         set(CPackRun_CPackComponentWay "-DCPackComponentWay=${CPackComponentWay}")
diff --git a/Tests/CPackComponentsPrefix/CMakeLists.txt b/Tests/CPackComponentsPrefix/CMakeLists.txt
index 207dae8..770f825 100644
--- a/Tests/CPackComponentsPrefix/CMakeLists.txt
+++ b/Tests/CPackComponentsPrefix/CMakeLists.txt
@@ -6,6 +6,7 @@ install(FILES file-runtime.txt
 install(FILES file-development.txt
         DESTINATION lib COMPONENT Development)
 
+set(CPACK_PACKAGE_CONTACT "None") # mandatore for debian package generator
 set(CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY 1)
 set(CPACK_COMPONENTS_ALL Development)
 set(CPACK_ARCHIVE_COMPONENT_INSTALL 1)

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

Summary of changes:
 Modules/CPackRPM.cmake                     |    7 +++--
 Tests/CMakeLists.txt                       |   40 +++++++++++++++-------------
 Tests/CPackComponentsPrefix/CMakeLists.txt |    1 +
 3 files changed, 25 insertions(+), 23 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list