Gentoo Archives: gentoo-dev

From: parona <parona@××××××××××.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 12:06:23
Message-Id: MBLVAdyBLycHAcmklx8NK-j3JhlJNEvm9FIQZaIuhB6CV3neIqVKNZUvcwuXe3mxf0HHWzq1LcxufGQoI5a7hQ0vrSFgQZtYW2nisK4vBy0=@protonmail.com
In Reply to: [gentoo-dev] How to add -std=c++14 to CXXFLAGS of a cmake.eclass based package? by Andrey Grozin
1 Hi,
2
3 > but this makes no difference, c++17 is still used. How to convince
4 > cmake_src_compile to use -std=c++14?
5
6 Cmake sets those flags during src_configure (when the build dir is configured) and therefore ignores CXXFLAGS entirely during src_compile.
7
8 You should set those in src_configure before cmake_src_configure gets called. And Arsen Arsenovićs reply applies here on how to use flag-o-matic function append-cxxflags to do it.
9
10 --
11 Alfred Wingate