summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-06-03 13:29:58 (GMT)
committerBrad King <brad.king@kitware.com>2015-06-03 13:29:58 (GMT)
commitb8746c4cfe325f05dbcb4e9a99ca78496c90e74e (patch)
treec93f1c62fdb3f794ae96aaba854c5b7c6a6a7e82
parentc2cb80cbfa25eb5d6e054693ebd18e74bd7c8b75 (diff)
parent39fc3ed7e0db554818f41c3623bd858e0399dbb0 (diff)
downloadCMake-b8746c4cfe325f05dbcb4e9a99ca78496c90e74e.zip
CMake-b8746c4cfe325f05dbcb4e9a99ca78496c90e74e.tar.gz
CMake-b8746c4cfe325f05dbcb4e9a99ca78496c90e74e.tar.bz2
Merge branch 'CPackDeb-dpkg-shlibdeps-check-flag' into releasev3.3.0-rc1
-rw-r--r--Modules/CPackDeb.cmake18
1 files changed, 11 insertions, 7 deletions
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index 226153c..09cddcd 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -352,10 +352,11 @@ function(cpack_deb_prepare_package_vars)
OUTPUT_VARIABLE _TMP_VERSION
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE)
- string(REGEX MATCH "dpkg-shlibdeps version ([0-9]+\\.[0-9]+\\.[0-9]+)"
- SHLIBDEPS_EXECUTABLE_VERSION
- "${_TMP_VERSION}")
- set(SHLIBDEPS_EXECUTABLE_VERSION "${CMAKE_MATCH_1}")
+ if(_TMP_VERSION MATCHES "dpkg-shlibdeps version ([0-9]+\\.[0-9]+\\.[0-9]+)")
+ set(SHLIBDEPS_EXECUTABLE_VERSION "${CMAKE_MATCH_1}")
+ else()
+ set(SHLIBDEPS_EXECUTABLE_VERSION "")
+ endif()
if(CPACK_DEBIAN_PACKAGE_DEBUG)
message("CPackDeb Debug: dpkg-shlibdeps --version output is '${_TMP_VERSION}'")
@@ -398,9 +399,12 @@ function(cpack_deb_prepare_package_vars)
file(MAKE_DIRECTORY ${CPACK_TEMPORARY_DIRECTORY}/debian)
file(WRITE ${CPACK_TEMPORARY_DIRECTORY}/debian/control "")
- # only set ignore-missing-info flag for dpkg-shlibdeps that have --version option
- # (those are newer and also have --ignore-missing-info flag)
- if(SHLIBDEPS_EXECUTABLE_VERSION)
+ # Add --ignore-missing-info if the tool supports it
+ execute_process(COMMAND env LC_ALL=C ${SHLIBDEPS_EXECUTABLE} --help
+ OUTPUT_VARIABLE _TMP_HELP
+ ERROR_QUIET
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ if(_TMP_HELP MATCHES "--ignore-missing-info")
set(IGNORE_MISSING_INFO_FLAG "--ignore-missing-info")
endif()