Gentoo Archives: gentoo-dev

From: Azamat Hackimov <azamat.hackimov@×××××.com>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] How to add -std=c++14 to CXXFLAGS of a cmake.eclass based package?
Date: Sat, 17 Dec 2022 13:16:44
Message-Id: CAFqVybohe7gQ1UADNmvpdaO+rrPFCABYAGrhd4j74BsgB7RN-A@mail.gmail.com
In Reply to: Re: [gentoo-dev] How to add -std=c++14 to CXXFLAGS of a cmake.eclass based package? by Azamat Hackimov
1 Also, according to commit history, dynamic exception usage was removed
2 in https://github.com/vlabella/GLE/commit/14753e9aba9eb6490358caaeb60f6e36ba314acc,
3 so you can try to apply this patch.
4
5 сб, 17 дек. 2022 г. в 16:05, Azamat Hackimov <azamat.hackimov@×××××.com>:
6 >
7 > Hello.
8 >
9 > You need to add
10 >
11 > set(CMAKE_CXX_STANDARD 14)
12 > set(CMAKE_CXX_STANDARD_REQUIRED ON)
13 >
14 > into CMakeLists.txt after project() declaration via patching. Since
15 > this is an upstream issue, you need to notify upstream about C++17
16 > incompatibility.
17 >
18 > сб, 17 дек. 2022 г. в 14:35, Andrey Grozin <grozin@×××××××××××××××××.org>:
19 > >
20 > > Hello *,
21 > >
22 > > I'm trying to package a new version of sci-visualization/gle which now
23 > > uses cmake. After some patching CMakeLists.txt, it configures
24 > > successfully. But at build time it spits zillion errors
25 > >
26 > > error: ISO C++17 does not allow dynamic exception specifications
27 > >
28 > > The natural thing to try is to add -std=c++14 to CXXFLAGS. So I tried
29 > >
30 > > src_compile() {
31 > > CXXFLAGS="${CXXFLAGS} -std=c++14" cmake_src_compile
32 > > }
33 > >
34 > > but this makes no difference, c++17 is still used. How to convince
35 > > cmake_src_compile to use -std=c++14?
36 > >
37 > > Thanks in advance,
38 > > Andrey
39 > >
40 >
41 >
42 > --
43 > From Siberia with Love!
44
45
46
47 --
48 From Siberia with Love!