From 5db80372484f05e17443471f5d93e5bb6c638592 Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Fri, 20 Nov 2020 08:32:34 -0500 Subject: [PATCH] Ensure CMake does not strip binaries with package builds --- cmake.spec | 5 ++++- macros.cmake | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/cmake.spec b/cmake.spec index 2ead551..cb2c87d 100644 --- a/cmake.spec +++ b/cmake.spec @@ -62,7 +62,7 @@ %{?rcsuf:%global versuf -%{rcsuf}} # For handling bump release by rpmdev-bumpspec and mass rebuild -%global baserelease 2 +%global baserelease 3 # Uncomment if building for EPEL #global name_suffix %%{major_version} @@ -512,6 +512,9 @@ mv -f Modules/FindLibArchive.disabled Modules/FindLibArchive.cmake %changelog +* Fri Nov 20 08:32:34 EST 2020 Neal Gompa - 3.18.4-3 +- Ensure CMake does not strip binaries with package builds + * Mon Nov 09 2020 Miro HronĨok - 3.18.4-2 - Add support for Python 3.10 diff --git a/macros.cmake b/macros.cmake index 5749a32..54598ee 100644 --- a/macros.cmake +++ b/macros.cmake @@ -13,6 +13,7 @@ # - CMAKE_*_FLAGS_RELEASE are added *after* the *FLAGS environment variables # and default to -O3 -DNDEBUG. Strip the -O3 so we can override with *FLAGS # - Turn on verbose makefiles so we can see and verify compile flags +# - Turn off stripping by default so RPM can do it separately # - Set default install prefixes and library install directories # - Turn on shared libraries by default %cmake \ @@ -32,6 +33,7 @@ -DCMAKE_CXX_FLAGS_RELEASE:STRING="-DNDEBUG" \\\ -DCMAKE_Fortran_FLAGS_RELEASE:STRING="-DNDEBUG" \\\ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \\\ + -DCMAKE_INSTALL_DO_STRIP:BOOL=OFF \\\ -DCMAKE_INSTALL_PREFIX:PATH=%{_prefix} \\\ -DINCLUDE_INSTALL_DIR:PATH=%{_includedir} \\\ -DLIB_INSTALL_DIR:PATH=%{_libdir} \\\