but this makes no difference, c++17 is still used. How to convince cmake_src_compile to use -std=c++14?
Hello *,
I'm trying to package a new version of sci-visualization/gle which now uses cmake. After some patching CMakeLists.txt, it configures successfully. But at build time it spits zillion errors
error: ISO C++17 does not allow dynamic exception specifications
The natural thing to try is to add -std=c++14 to CXXFLAGS. So I tried
src_compile() {
CXXFLAGS="${CXXFLAGS} -std=c++14" cmake_src_compile
}
but this makes no difference, c++17 is still used. How to convince cmake_src_compile to use -std=c++14?
Thanks in advance,
Andrey
Hello *,
I'm trying to package a new version of sci-visualization/gle which now
uses cmake. After some patching CMakeLists.txt, it configures
successfully. But at build time it spits zillion errors
error: ISO C++17 does not allow dynamic exception specifications
The natural thing to try is to add -std=c++14 to CXXFLAGS. So I tried
src_compile() {
CXXFLAGS="${CXXFLAGS} -std=c++14" cmake_src_compile
}
but this makes no difference, c++17 is still used. How to convince cmake_src_compile to use -std=c++14?
Thanks in advance,
Andrey
Hello.
You need to add
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
into CMakeLists.txt after project() declaration via patching. Since
this is an upstream issue, you need to notify upstream about C++17 incompatibility.
сб, 17 дек. 2022 г. в 14:35, Andrey Grozin <grozin@woodpecker.gentoo.org>:
Hello *,
I'm trying to package a new version of sci-visualization/gle which now
uses cmake. After some patching CMakeLists.txt, it configures
successfully. But at build time it spits zillion errors
error: ISO C++17 does not allow dynamic exception specifications
The natural thing to try is to add -std=c++14 to CXXFLAGS. So I tried
src_compile() {
CXXFLAGS="${CXXFLAGS} -std=c++14" cmake_src_compile
}
but this makes no difference, c++17 is still used. How to convince cmake_src_compile to use -std=c++14?
Thanks in advance,
Andrey
--
From Siberia with Love!
audacity-2.4.2-r3.ebuild has something for this already:Thanks, this works.
``append-cxxflags -std=gnu++14''
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 299 |
Nodes: | 16 (2 / 14) |
Uptime: | 85:48:54 |
Calls: | 6,696 |
Calls today: | 1 |
Files: | 12,230 |
Messages: | 5,348,076 |