mirror of https://github.com/procxx/kepka.git
Switched to boolean conditionals in RPM SPEC file.
Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>
This commit is contained in:
parent
a85f82d1b1
commit
4d0ee2cefe
31
kepka.spec
31
kepka.spec
|
@ -1,10 +1,10 @@
|
||||||
# Setting some build conditions...
|
# Setting some build conditions...
|
||||||
%global clang 0
|
%bcond_with clang
|
||||||
%global ipo 1
|
%bcond_without ipo
|
||||||
|
|
||||||
# Applying workaround to RHBZ#1559007...
|
# Applying workaround to RHBZ#1559007...
|
||||||
%if 0%{?clang}
|
%if %{with clang}
|
||||||
%global optflags %(echo %{optflags} | sed -e 's/-mcet//g' -e 's/-fcf-protection//g' -e 's/-fstack-clash-protection//g')
|
%global optflags %(echo %{optflags} | sed -e 's/-mcet//g' -e 's/-fcf-protection//g' -e 's/-fstack-clash-protection//g' -e 's/$/-Qunused-arguments -Wno-unknown-warning-option/')
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: kepka
|
Name: kepka
|
||||||
|
@ -31,7 +31,7 @@ BuildRequires: cmake
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
|
|
||||||
# Clang compiler and tools if enabled...
|
# Clang compiler and tools if enabled...
|
||||||
%if 0%{?clang}
|
%if %{with clang}
|
||||||
BuildRequires: compiler-rt
|
BuildRequires: compiler-rt
|
||||||
BuildRequires: clang
|
BuildRequires: clang
|
||||||
BuildRequires: llvm
|
BuildRequires: llvm
|
||||||
|
@ -76,17 +76,24 @@ personal or business messaging needs.
|
||||||
mkdir -p %{_target_platform}
|
mkdir -p %{_target_platform}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# Overriding compiler settings...
|
|
||||||
%if 0%{?clang}
|
|
||||||
export CC=clang
|
|
||||||
export CXX=clang++
|
|
||||||
%endif
|
|
||||||
|
|
||||||
# Configuring application...
|
# Configuring application...
|
||||||
pushd %{_target_platform}
|
pushd %{_target_platform}
|
||||||
%cmake -G Ninja \
|
%cmake -G Ninja \
|
||||||
|
%if %{with clang}
|
||||||
|
-DCMAKE_C_COMPILER=clang \
|
||||||
|
-DCMAKE_CXX_COMPILER=clang++ \
|
||||||
|
-DCMAKE_AR=%{_bindir}/llvm-ar \
|
||||||
|
-DCMAKE_RANLIB=%{_bindir}/llvm-ranlib \
|
||||||
|
-DCMAKE_LINKER=%{_bindir}/llvm-ld \
|
||||||
|
-DCMAKE_OBJDUMP=%{_bindir}/llvm-objdump \
|
||||||
|
-DCMAKE_NM=%{_bindir}/llvm-nm \
|
||||||
|
%else
|
||||||
|
-DCMAKE_AR=%{_bindir}/gcc-ar \
|
||||||
|
-DCMAKE_RANLIB=%{_bindir}/gcc-ranlib \
|
||||||
|
-DCMAKE_NM=%{_bindir}/gcc-nm \
|
||||||
|
%endif
|
||||||
-DPACKAGED_BUILD:BOOL=ON \
|
-DPACKAGED_BUILD:BOOL=ON \
|
||||||
%if 0%{?ipo}
|
%if %{with ipo}
|
||||||
-DENABLE_IPO:BOOL=ON \
|
-DENABLE_IPO:BOOL=ON \
|
||||||
%endif
|
%endif
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
-DCMAKE_BUILD_TYPE=Release \
|
||||||
|
|
Loading…
Reference in New Issue