mirror of https://github.com/procxx/kepka.git
Added Clang build support.
Signed-off-by: Vitaly Zaitsev <vitaly@easycoding.org>
This commit is contained in:
parent
792a88d064
commit
450409095a
21
kepka.spec
21
kepka.spec
|
@ -1,3 +1,11 @@
|
||||||
|
# Allow to use Clang compiler...
|
||||||
|
%global clang 0
|
||||||
|
|
||||||
|
# Applying workaround to RHBZ#1559007...
|
||||||
|
%if 0%{?clang}
|
||||||
|
%global optflags %(echo %{optflags} | sed -e 's/-mcet//g' -e 's/-fcf-protection//g' -e 's/-fstack-clash-protection//g')
|
||||||
|
%endif
|
||||||
|
|
||||||
Name: kepka
|
Name: kepka
|
||||||
Version: 2.0.0
|
Version: 2.0.0
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
|
@ -20,6 +28,13 @@ BuildRequires: gcc-c++
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
|
|
||||||
|
# Clang compiler and tools if enabled...
|
||||||
|
%if 0%{?clang}
|
||||||
|
BuildRequires: compiler-rt
|
||||||
|
BuildRequires: clang
|
||||||
|
BuildRequires: llvm
|
||||||
|
%endif
|
||||||
|
|
||||||
# Development packages for main application...
|
# Development packages for main application...
|
||||||
BuildRequires: guidelines-support-library-devel
|
BuildRequires: guidelines-support-library-devel
|
||||||
BuildRequires: libappindicator-devel
|
BuildRequires: libappindicator-devel
|
||||||
|
@ -58,6 +73,12 @@ 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 -DPACKAGED_BUILD=1 -DCMAKE_BUILD_TYPE=Release ..
|
%cmake -G Ninja -DPACKAGED_BUILD=1 -DCMAKE_BUILD_TYPE=Release ..
|
||||||
|
|
Loading…
Reference in New Issue