From 2a93bfd1de2e6c6f7acd6f702d97ac2d1509b701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Sat, 27 May 2023 19:10:21 +0200 Subject: [PATCH] macros: Directly use %set_build_flags, as it is supported since EPEL 7 --- cmake.spec | 1 + macros.cmake.in | 10 +--------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/cmake.spec b/cmake.spec index 651a675..49ce42f 100644 --- a/cmake.spec +++ b/cmake.spec @@ -538,6 +538,7 @@ popd * Sat May 27 2023 Björn Esser - 3.26.4-3 - Rename macros.cmake -> macros.cmake.in - macros: Fix formatting and indentation +- macros: Directly use %%set_build_flags, as it is supported since EPEL 7 * Fri May 19 2023 Neal Gompa - 3.26.4-2 - macros: use the language build flag macros for compiler flags diff --git a/macros.cmake.in b/macros.cmake.in index a96c705..5c9307a 100644 --- a/macros.cmake.in +++ b/macros.cmake.in @@ -18,15 +18,7 @@ # - Set default install prefixes and library install directories # - Turn on shared libraries by default %cmake \ -%if 0%{?set_build_flags:1} \ - %set_build_flags \ -%else \ - CFLAGS="${CFLAGS:-%build_cflags}" ; export CFLAGS ; \ - CXXFLAGS="${CXXFLAGS:-%build_cxxflags}" ; export CXXFLAGS ; \ - FFLAGS="${FFLAGS:-%build_fflags}" ; export FFLAGS ; \ - FCFLAGS="${FCFLAGS:-%build_fflags}" ; export FCFLAGS ; \ - %{?build_ldflags:LDFLAGS="${LDFLAGS:-%build_ldflags}" ; export LDFLAGS ;} \ -%endif \ + %{set_build_flags} \ %__cmake \\\ %{!?__cmake_in_source_build:-S "%{_vpath_srcdir}"} \\\ %{!?__cmake_in_source_build:-B "%{__cmake_builddir}"} \\\