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:41 (GMT) |
commit | 648b66a1d30c010dbf28aaad8dfc2eff56ea2c03 (patch) | |
tree | 1d9ce063bd275c2c8661dcb459989cce7345ef9a /Source | |
parent | 9f6c91eb30804d573bc605e0b6cce4cf72ac164a (diff) | |
parent | e47dfce75d74de26ac6ee25625a44989312e29c1 (diff) | |
download | CMake-648b66a1d30c010dbf28aaad8dfc2eff56ea2c03.zip CMake-648b66a1d30c010dbf28aaad8dfc2eff56ea2c03.tar.gz CMake-648b66a1d30c010dbf28aaad8dfc2eff56ea2c03.tar.bz2 |
Merge topic 'cmp0128-fixup'
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"); |