diff options
author | Brad King <brad.king@kitware.com> | 2021-11-12 14:02:23 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-11-12 14:02:40 (GMT) |
commit | 9740573673ba9e26108dad83c7b368e09b8b7810 (patch) | |
tree | efdc75421ac1439babbf5dfb3d7f26d016baa9c7 /Source | |
parent | 5154dd2450679e4c2d265d12f7e71656cf0830cf (diff) | |
parent | e47dfce75d74de26ac6ee25625a44989312e29c1 (diff) | |
download | CMake-9740573673ba9e26108dad83c7b368e09b8b7810.zip CMake-9740573673ba9e26108dad83c7b368e09b8b7810.tar.gz CMake-9740573673ba9e26108dad83c7b368e09b8b7810.tar.bz2 |
Merge topic 'cmp0128-fixup' into release-3.22
e47dfce75d CMP0128: Enable/disable extensions if standard same as default
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !6723
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmStandardLevelResolver.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmStandardLevelResolver.cxx b/Source/cmStandardLevelResolver.cxx index 957f4ca..61416e0 100644 --- a/Source/cmStandardLevelResolver.cxx +++ b/Source/cmStandardLevelResolver.cxx @@ -206,7 +206,8 @@ struct StandardLevelComputer // If the standard requested is older than the compiler's default or the // extension mode doesn't match then we need to use a flag. - if (stdIt < defaultStdIt) { + if (stdIt < defaultStdIt || + (cmp0128 == cmPolicies::NEW && ext != defaultExt)) { auto offset = std::distance(cm::cbegin(stds), stdIt); return cmStrCat("CMAKE_", this->Language, stdsStrings[offset], "_", type, "_COMPILE_OPTION"); |