opened
Sarcasm
username_0
It is my understanding that CMAKE_CXX_STANDARD
is more targeted to toolchain files than for the projects directly:

- https://gitlab.kitware.com/cmake/cmake/issues/17146#note_299405

Whereas `target_compile_features(hello PUBLIC cxx_std_14)`,
just specify a minimum required standard,
but allow a developer or package to upgrade the standard seemlessly,
e.g. a packager may want to upgrade to C++17 for ABI-compatibility reasons.
This can be done using CMAKE_CXX_STANDARD from a toolchain file,
or from the command line:

    cmake -DCMAKE_CXX_STANDARD=17 ...

CMake will also respect the -std=<standard> flags
if specified specified from the environement variable CXXFLAGS:

    env CXXFLAGS=-std=c++17 cmake ...

or from the command line `CMAKE_CXX_FLAGS`:

    cmake -DCMAKE_CXX_FLAGS=-std=c++17 ...

One thing to be aware with this method,
is that if one wants to make sure, e.g. in CI,
that the minimum C++ standard is actually tested,
it should do so explicitely, using one of the aforementioned methods.
The azure-pipelines.yml has been updated for this reason.
CMake: update method to set C++ Standard
issue
created
Sarcasm
username_0
Fixed the typo, took me a while to see the issue `{ STANTARD => STANDARD }`, thanks for catching it.
Yes, I've been reading about the Github Actions move, will keep an eye on that.
comment