MSVC toolset 14.1+: Set /permissive- when CXX_EXTENSIONS==OFF?
VS2017 (both cl (compiler) version 19.10 and 19.11) have a /permissive-
flag that puts them into standard-conforming mode, i.e. disallowing MSVC-specific C++ language extensions. It may make sense to set this flag if CMAKE_CXX_EXTENSIONS
is set to OFF
?
There is also -Za
and -Zc
, I am not sure whether that is already handled by CMake and what the exact difference to /permissive-
is.
This discussion emerged out of #16482 (closed).
Edited by Patrik Huber