Re: cmake cxx standard and USES compiler:c++{17,14,11}-lang

From: Felix Palmen <>
Date: Sun, 31 Jul 2022 07:17:53 UTC
Hello Nuno,

* Nuno Teixeira <> [20220730 22:00]:
> I'm working on a port that have wrksrc CMakeLists.txt:
> ---
> ---
> but port Makefile have:
> ---
> USES= cmake compiler:c++14-lang
> ---
> Should I change it to compiler:c++17-lang?

Most likely yes.

> Do USES= compiler have any influence on cmake building?

Currently not in practice. It will just pull in a compiler from ports
*if* the base compiler doesn't offer the standard required, but as far
as I know, a base compiler supporting c++14 will also support c++17 (and
after EOL of 12, there won't be any base compilers left not supporting
these standards).

I have a review open trying to add c++20 and c++2b *and* to honor
LLVM_DEFAULT in case it will pull in llvm here:

BR, Felix

 Dipl.-Inform. Felix Palmen  <>   ,.//..........
 {web}  {jabber} [see email]   ,//
 {pgp public key}   //   """""""""""
 {pgp fingerprint} A891 3D55 5F2E 3A74 3965 B997 3EF2 8B0A BC02 DA2A