From 6096414317c164eb31603db6c12e6f95fab41e552d0d7699a7dfbb43dc3be4ea Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 30 May 2023 22:35:02 +0000 Subject: [PATCH] 15.4 compiler selection OBS-URL: https://build.opensuse.org/package/show/X11:Wayland/spirv-tools?expand=0&rev=100 --- spirv-tools.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spirv-tools.spec b/spirv-tools.spec index cdbf8b7..fcfda27 100644 --- a/spirv-tools.spec +++ b/spirv-tools.spec @@ -32,7 +32,11 @@ Source9: baselibs.conf Patch1: ver.diff BuildRequires: bison BuildRequires: cmake >= 3.17.2 +%if 0%{?suse_version} >= 1599 BuildRequires: gcc-c++ +%else +BuildRequires: gcc11-c++ +%endif BuildRequires: pkg-config BuildRequires: python3-base BuildRequires: python3-xml @@ -69,6 +73,9 @@ find . -type f -name CMakeLists.txt -exec \ perl -i -pe 's{\@PACKAGE_VERSION\@}{%version}' CMakeLists.txt {} + %build +%if 0%{?suse_version} && 0%{?suse_version} < 1599 +export CXX=g++-11 +%endif %cmake -DSPIRV-Headers_SOURCE_DIR="%_prefix" \ -DSPIRV_TOOLS_BUILD_STATIC:BOOL=OFF -DBUILD_SHARED_LIBS:BOOL=ON %cmake_build