From f149f52acc5d43f835b32567d43f3d487f59f14260a259697d42a81808a34af9 Mon Sep 17 00:00:00 2001 From: Simon Lees Date: Thu, 17 Aug 2023 02:09:25 +0000 Subject: [PATCH] Accepting request 1104229 from home:jengelh:branches:devel:tools:building - Make %cmake_build insert RELWITHDEBINFO CFLAGS as well to avoid projects overriding our %optflags with some cmake default. OBS-URL: https://build.opensuse.org/request/show/1104229 OBS-URL: https://build.opensuse.org/package/show/devel:tools:building/cmake?expand=0&rev=547 --- cmake.changes | 6 ++++++ cmake.macros | 3 +++ 2 files changed, 9 insertions(+) diff --git a/cmake.changes b/cmake.changes index 31b4dda..9bdd281 100644 --- a/cmake.changes +++ b/cmake.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Aug 16 17:44:46 UTC 2023 - Jan Engelhardt + +- Make %cmake_build insert RELWITHDEBINFO CFLAGS as well to avoid + projects overriding our %optflags with some cmake default. + ------------------------------------------------------------------- Sat Aug 12 12:38:42 UTC 2023 - Christoph G diff --git a/cmake.macros b/cmake.macros index 10cd1f7..3fb5f11 100644 --- a/cmake.macros +++ b/cmake.macros @@ -38,8 +38,11 @@ -DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\ -DCMAKE_BUILD_TYPE=RelWithDebInfo \\\ -DCMAKE_C_FLAGS="${CFLAGS:-%optflags}" \\\ + -DCMAKE_C_FLAGS_RELWITHDEBINFO="${CFLAGS:-%optflags}" \\\ -DCMAKE_CXX_FLAGS="${CXXFLAGS:-%optflags}" \\\ + -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="${CXXFLAGS:-%optflags}" \\\ -DCMAKE_Fortran_FLAGS="${FFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}" \\\ + -DCMAKE_Fortran_FLAGS_RELWITHDEBINFO="${FFLAGS:-%optflags%{?_fmoddir: -I%_fmoddir}}" \\\ -DCMAKE_EXE_LINKER_FLAGS="%{?build_ldflags} -Wl,--as-needed -Wl,-z,now" \\\ -DCMAKE_MODULE_LINKER_FLAGS="%{?build_ldflags} -Wl,--as-needed" \\\ -DCMAKE_SHARED_LINKER_FLAGS="%{?build_ldflags} -Wl,--as-needed -Wl,-z,now" \\\