benchmark icon indicating copy to clipboard operation
benchmark copied to clipboard

Try removing attempt to set the C++ standard

Open dmah42 opened this issue 2 years ago • 12 comments

Fixes #1460 #1462

Let's see what the buildbots make of this.

dmah42 avatar Aug 08 '22 23:08 dmah42

No, this is wrong.

LebedevRI avatar Aug 08 '22 23:08 LebedevRI

No, this is wrong.

it's just a draft because i want to see what happens... the compiler used should be free to set it's standard. we already had a fallback to c++0x so the only issue i think would be if someone tries to use a compiler that doesn't support c++11.

if we want to require that then setting CMAKE_CXX_STANDARD and maybe REQUIRED is the way to do that.. but i just want to see how necessary it is.

dmah42 avatar Aug 08 '22 23:08 dmah42

There is absolutely no requirement that a supported compiler version actually happens to have the right (the one you expect, and everyone expects different things) default standard.

LebedevRI avatar Aug 08 '22 23:08 LebedevRI

first test complete: OSX falls back too far beyond C++11.

next up: setting the standard.

dmah42 avatar Aug 08 '22 23:08 dmah42

https://cmake.org/cmake/help/latest/policy/CMP0067.html might be relevant.

LebedevRI avatar Aug 08 '22 23:08 LebedevRI

https://cmake.org/cmake/help/latest/policy/CMP0067.html might be relevant.

nice :)

dmah42 avatar Aug 08 '22 23:08 dmah42

https://cmake.org/cmake/help/latest/policy/CMP0067.html might be relevant.

nice :)

cmake 3.8+ only .. ubuntu 16.04 is still on 3.5.1: https://launchpad.net/ubuntu/xenial/+source/cmake

dmah42 avatar Aug 08 '22 23:08 dmah42

try_compile also doesn't support setting the standard in 3.5.1.

so our older platform support requires explicit --std flag setting, i think... and for consistency, it suggests we need to do the same in the rest of the project.

until we can drop older platforms, i don't think we can embrace updated cmake norms...

any other ideas, @LebedevRI ?

dmah42 avatar Aug 09 '22 00:08 dmah42

cmake 3.5.1 sounds really ancient. Even debian old-old-stable has 3.7. I think 3.13 should be an unambiguous dependency.

LebedevRI avatar Aug 09 '22 00:08 LebedevRI

ubuntu bionic (the oldest LTS ubuntu we support) is 3.10.2 (https://packages.ubuntu.com/bionic/cmake) so i think we can get past 3.8.

it might mean dropping the 14.04 and 16.04 bots but they are really old at this point and we do have a policy on dependencies for a reason.

dmah42 avatar Aug 09 '22 13:08 dmah42

Sounds reasonable?

LebedevRI avatar Aug 10 '22 13:08 LebedevRI

Sounds reasonable?

image

seems like we might just have had our hand forced...

dmah42 avatar Aug 10 '22 17:08 dmah42

@dmah42 what's the status here?

LebedevRI avatar Dec 10 '22 14:12 LebedevRI

@dmah42 what's the status here?

i don't remember where i got to. let me see if i can resurrect it.

dmah42 avatar Dec 10 '22 17:12 dmah42

it builds and passes tests but I'm not sure it's the right thing to do. I would appreciate an ack.

dmah42 avatar Dec 10 '22 18:12 dmah42

it builds and passes tests but I'm not sure it's the right thing to do. I would appreciate an ack.

Given that we don't want to just happen to build under whatever the standard is default for the compiler that is used, but specifically with C++11, this is the right thing to do.

LebedevRI avatar Dec 10 '22 18:12 LebedevRI

merged.. now let's see if anyone finds an issue on any unusual platforms with it.

dmah42 avatar Dec 10 '22 23:12 dmah42