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" \\\