From 32d74e1068b56dd1a70f9d052b371fafe21f49f5 Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Mon, 17 Sep 2018 23:31:15 -0700 Subject: [PATCH] - Allow cpack if test cases are built (the googletest issue is fixed) - Allow cpack also in RelWithDebInfo mode - Disable stripping of binaries --- cpack/CMakeLists.txt | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/cpack/CMakeLists.txt b/cpack/CMakeLists.txt index 8aba91e3..4bc95b99 100644 --- a/cpack/CMakeLists.txt +++ b/cpack/CMakeLists.txt @@ -1,8 +1,7 @@ # We only allow generating distribution packages if: # - it is a release build (to ensure all generated debian packages are fine to be distributed) -# - tests are not built (because otherwise CPack would start installing googletest with the package as well) string(TOUPPER "${CMAKE_BUILD_TYPE}" BUILDTYPE) -if(BUILDTYPE MATCHES RELEASE AND NOT BUILD_TESTING) +if(BUILDTYPE MATCHES RELEASE OR BUILDTYPE MATCHES RELWITHDEBINFO) if("${CMAKE_VERSION}" VERSION_LESS "3.3") # Earlier cmake versions generate .deb packages for which the package manager says they're bad quality # and asks the user whether they really want to install it. Cmake 3.3 fixes this. @@ -33,9 +32,9 @@ if(BUILDTYPE MATCHES RELEASE AND NOT BUILD_TESTING) #set(CPACK_NSIS_CONTACT "messmer@cryfs.org") #set(CPACK_NSIS_MODIFY_PATH ON) else(WIN32 AND NOT UNIX) - set(CPACK_STRIP_FILES ON) - set(CPACK_SOURCE_STRIP_FILES ON) - endif(WIN32 AND NOT UNIX) + set(CPACK_STRIP_FILES OFF) + set(CPACK_SOURCE_STRIP_FILES OFF) + endif() set(CPACK_PACKAGE_EXECUTABLES "cryfs" "CryFS") set(CPACK_DEBIAN_PACKAGE_SECTION "utils") set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) @@ -49,5 +48,5 @@ if(BUILDTYPE MATCHES RELEASE AND NOT BUILD_TESTING) set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA "${CMAKE_CURRENT_SOURCE_DIR}/debfiles/postinst;${CMAKE_CURRENT_SOURCE_DIR}/debfiles/postrm") include(CPack) - endif("${CMAKE_VERSION}" VERSION_LESS "3.3") -endif(BUILDTYPE MATCHES RELEASE AND NOT BUILD_TESTING) + endif() +endif()