Files
CMake/Tests/RunCMake/CompileFeatures/CMP0128WarnUnset-stderr.txt
Raul Tambre 4a0485be7f cmStandardLevelResolver: Avoid unnecessary flags, fix unset level logic
The changes are part of CMP0128.

When the standard level is unset:
* Flags are added if extension mode doesn't match the compiler's default.
  Previously logic only worked if LANG_EXTENSIONS was ON. Fixes #22224.
* The full flag is used. Previously CMAKE_LANG_EXTENSION_COMPILE_OPTION was
  used. This was only supported for IAR.

Otherwise:
* Avoid adding flags if not necessary per the detected compiler defaults.
* Fixed check for when the requested standard is older. It now matches the
  nearby comments.

I reworded the fallback comment as its logic was a bit difficult to wrap my
head around.
2021-09-29 22:28:40 +03:00

9 lines
436 B
Plaintext

CMake Warning \(dev\) in CMakeLists\.txt:
Policy CMP0128 is not set: Selection of language standard and extension
flags improved\. Run "cmake --help-policy CMP0128" for policy details\. Use
the cmake_policy command to set the policy and suppress this warning\.
For compatibility with older versions of CMake, compiler extensions won't
be @opposite@\.
This warning is for project developers\. Use -Wno-dev to suppress it\.