AFAICT when I’m compiling a C++ target with the property
CXX_EXTENSIONS=OFF using MSVC, CMake doesn’t add the
/permissive- flag, which as per the docs:
You can use the
/permissive-compiler option to specify standards-conforming compiler behavior.
It’s true that it isn’t just one flag, as in the case of ISO vs. GNU language dialect, but two separate flags, one for controlling the language standard and one for controlling the presence of extensions. Is there a conflict between the actual meaning of
CXX_EXTENSIONS that precludes from CMake controlling this flag? It seems tedious to hold the hand of CMake and set something manually for which there’s matching CMake and compiler feature.