From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-dev+bounces-98779-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 34C2B158020
	for <garchives@archives.gentoo.org>; Sat, 17 Dec 2022 13:06:08 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 84066E08E0;
	Sat, 17 Dec 2022 13:06:04 +0000 (UTC)
Received: from mail-qt1-x830.google.com (mail-qt1-x830.google.com [IPv6:2607:f8b0:4864:20::830])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 59DC8E08A0
	for <gentoo-dev@lists.gentoo.org>; Sat, 17 Dec 2022 13:06:04 +0000 (UTC)
Received: by mail-qt1-x830.google.com with SMTP id h26so970321qtu.2
        for <gentoo-dev@lists.gentoo.org>; Sat, 17 Dec 2022 05:06:04 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20210112;
        h=content-transfer-encoding:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:from:to:cc:subject:date
         :message-id:reply-to;
        bh=SnW7dMUTvDAX3dn/ZySGuGSfStr6P8+9JRr7ipiL6qk=;
        b=Ybt0/fwCchKRO+3i3jzUSGLjWK3QmKbz8/3wxxwhInznIz3xo0ABWCcyqj6FB5jcIb
         ET20oBLLhXzLxg+mKjCZmGMmCq3IJQDU9UI7YybAaMTGNhDBusnquPtTO4UChA2s7Lj1
         OJFVRSVutrSFSAuvbW2TEI/iSiCvw0KoIiiL2Xg/nWHMWK99s6ID9c4ozePby9HsyCZs
         8/AZHTxNtaxKTTIPrEy+aBP7ZrPExLJlU+AmOhdGuRsxgosJ+EOmngUDoSX+c4Z/liFy
         kmukz/GpOLXuadGDPhqDLO8M2hTh5MsFwYG2qj/L5rsrnxoNcX10RibR3wiFJdXa+mXh
         kT9Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20210112;
        h=content-transfer-encoding:to:subject:message-id:date:from
         :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc
         :subject:date:message-id:reply-to;
        bh=SnW7dMUTvDAX3dn/ZySGuGSfStr6P8+9JRr7ipiL6qk=;
        b=OFVueaS2rN3Ht7xad2KLIUMIgwfRgRVTeQyWlAUW0ReUx42g1VLKE1pDUdKCHrfASZ
         C4pXvFifBDyIBw1EAnMokUd4dbWHhaXoR40bnNbdF+87AOqwpf8aGZoMzuR9yvY7zMSB
         aaN4GZgKzdV8OTWXaFUoaiGK9qEWwQbjdkOJDHuZfan3wGs0EiDtxOADq4R6LewKxIxm
         vPkKxvjJsu+G57KzXtvl7qpe/QbBIa0UI80ml/9TMFyJ1EN8b9/s2lRRLtMjBdRoPvKJ
         VTMx7SBMl/4c01ayhWGF9cF+Ebu7lgLXrzPO5yiJyP40I1TeIwvgzIhusc+Yd7mXr4rI
         +oEA==
X-Gm-Message-State: ANoB5pl4xX07KYPt2+Q1I07heU0uXH1ZZF9OZeyqoYtBidlMHtuYFu9l
	zqPUiEscJQ/D28x2a1mYsB6D1ppS79Q0jnzY+fRE6Nw5ZIM+/w==
X-Google-Smtp-Source: AA0mqf6/UdUsAill7rGeOB2ws954QXXaaAI6T3tOADNXuhtN37dHmx2hQZqRy+QncVjdBDvnqC5HuMy05fpcdsgGEEQ=
X-Received: by 2002:ac8:514b:0:b0:3a8:2ca4:e81f with SMTP id
 h11-20020ac8514b000000b003a82ca4e81fmr360567qtn.197.1671282363398; Sat, 17
 Dec 2022 05:06:03 -0800 (PST)
Precedence: bulk
List-Post: <mailto:gentoo-dev@lists.gentoo.org>
List-Help: <mailto:gentoo-dev+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-dev+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-dev+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-dev.gentoo.org>
X-BeenThere: gentoo-dev@lists.gentoo.org
Reply-to: gentoo-dev@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
MIME-Version: 1.0
References: <e9f090d4-4137-9033-9771-6498abb2362e@woodpecker.gentoo.org>
In-Reply-To: <e9f090d4-4137-9033-9771-6498abb2362e@woodpecker.gentoo.org>
From: Azamat Hackimov <azamat.hackimov@gmail.com>
Date: Sat, 17 Dec 2022 16:05:52 +0300
Message-ID: <CAFqVybrCgriQrR_LOqHom3VbgEEd85Qj3YP=ybd5bp9LR8om2Q@mail.gmail.com>
Subject: Re: [gentoo-dev] How to add -std=c++14 to CXXFLAGS of a cmake.eclass
 based package?
To: gentoo-dev@lists.gentoo.org
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Archives-Salt: 7f6bd921-19de-4190-9ba3-0b5dbaa9510b
X-Archives-Hash: 72d142f9929d08cd627671133ff387a6

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.

=D1=81=D0=B1, 17 =D0=B4=D0=B5=D0=BA. 2022 =D0=B3. =D0=B2 14:35, Andrey Groz=
in <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=3Dc++14 to CXXFLAGS. So I tried
>
> src_compile() {
>      CXXFLAGS=3D"${CXXFLAGS} -std=3Dc++14" cmake_src_compile
> }
>
> but this makes no difference, c++17 is still used. How to convince
> cmake_src_compile to use -std=3Dc++14?
>
> Thanks in advance,
> Andrey
>


--=20
>From Siberia with Love!