diff --git a/cmake.changes b/cmake.changes index 2845b14..356805e 100644 --- a/cmake.changes +++ b/cmake.changes @@ -1,9 +1,3 @@ -------------------------------------------------------------------- -Fri Oct 20 07:25:25 UTC 2023 - Jan Engelhardt - -- Stick -DNDEBUG back into CMAKE_C_FLAGS. Can't find a spontaneous - resolution for projects relying on its presence. - ------------------------------------------------------------------- Fri Oct 13 08:06:23 UTC 2023 - Paolo Stivanin @@ -35,12 +29,6 @@ Wed Aug 23 20:04:25 UTC 2023 - Andreas Stieger * Graphviz: Restore support for per-target dependency graph options * FindOpenSSL: Fix OpenSSL 3.0.0 version extraction -------------------------------------------------------------------- -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 1fb9674..10cd1f7 100644 --- a/cmake.macros +++ b/cmake.macros @@ -10,11 +10,6 @@ %__cmake_make_prefix_relative() %{lua:print((string.gsub((rpm.expand("%1")), ((rpm.expand("%{_prefix}")) .. "/"), "", 1)))} %__cmake_make_root_relative() %{lua:print((string.gsub((rpm.expand("%1")), "/", "", 1)))} -# -# Some cmake-using software has an unfortunate reliance on -DNDEBUG being -# present (when cmake is used without explicitly selecting a build type or -# cflags). Cf. https://bugzilla.redhat.com/show_bug.cgi?id=1692426 -# %cmake \ find %__sourcedir -type f -name CMakeLists.txt \\\ -exec sed -i -re '/^[[:blank:]]*[sS][eE][tT][[:blank:]]*\\\([[:blank:]]*(CMAKE_BUILD_TYPE|CMAKE_COLOR_MAKEFILE|CMAKE_INSTALL_PREFIX|CMAKE_VERBOSE_MAKEFILE).*\\\)/{s/^/#IGNORE /}' {} + \ @@ -42,12 +37,9 @@ -DSYSCONF_INSTALL_DIR:PATH=%{_sysconfdir} \\\ -DSHARE_INSTALL_PREFIX:PATH=%{_datadir} \\\ -DCMAKE_BUILD_TYPE=RelWithDebInfo \\\ - -DCMAKE_C_FLAGS="-DNDEBUG ${CFLAGS:-%optflags}" \\\ - -DCMAKE_C_FLAGS_RELWITHDEBINFO="-DNDEBUG ${CFLAGS:-%optflags}" \\\ - -DCMAKE_CXX_FLAGS="${CXXFLAGS:--DNDEBUG %optflags}" \\\ - -DCMAKE_CXX_FLAGS_RELWITHDEBINFO="${CXXFLAGS:--DNDEBUG %optflags}" \\\ - -DCMAKE_Fortran_FLAGS="${FFLAGS:--DNDEBUG %optflags%{?_fmoddir: -I%_fmoddir}}" \\\ - -DCMAKE_Fortran_FLAGS_RELWITHDEBINFO="${FFLAGS:--DNDEBUG %optflags%{?_fmoddir: -I%_fmoddir}}" \\\ + -DCMAKE_C_FLAGS="${CFLAGS:-%optflags}" \\\ + -DCMAKE_CXX_FLAGS="${CXXFLAGS:-%optflags}" \\\ + -DCMAKE_Fortran_FLAGS="${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" \\\