summaryrefslogtreecommitdiffstats
path: root/Help/release/dev
diff options
context:
space:
mode:
authorRaul Tambre <raul@tambre.ee>2021-05-29 15:34:18 (GMT)
committerRaul Tambre <raul@tambre.ee>2021-09-29 19:28:40 (GMT)
commit4a0485be7f4ab06201c478f5a46111ab1e8e773e (patch)
treea4a89916f051e70a7fac32fbba0daaefbcc4ac0d /Help/release/dev
parent29e2b8517126389b2c4b2f3479c4634a8260bea3 (diff)
downloadCMake-4a0485be7f4ab06201c478f5a46111ab1e8e773e.zip
CMake-4a0485be7f4ab06201c478f5a46111ab1e8e773e.tar.gz
CMake-4a0485be7f4ab06201c478f5a46111ab1e8e773e.tar.bz2
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.
Diffstat (limited to 'Help/release/dev')
-rw-r--r--Help/release/dev/compile-features-standard-logic-rework.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/Help/release/dev/compile-features-standard-logic-rework.rst b/Help/release/dev/compile-features-standard-logic-rework.rst
new file mode 100644
index 0000000..432a756
--- /dev/null
+++ b/Help/release/dev/compile-features-standard-logic-rework.rst
@@ -0,0 +1,10 @@
+compile-features-standard-logic-rework
+--------------------------------------
+
+* The :manual:`Compile Features <cmake-compile-features(7)>` functionality now
+ correctly disables or enables compiler extensions when no standard level is
+ specified and avoids unnecessarily adding language standard flags if the
+ requested settings match the compiler's defaults. See :policy:`CMP0128`.
+
+* :prop_tgt:`<LANG>_EXTENSIONS` is initialized to
+ :variable:`CMAKE_<LANG>_EXTENSIONS_DEFAULT`. See :policy:`CMP0128`.