MSVC: C17 support
I have a CMakeLists.txt set to use the C17 standard:
set(CMAKE_C_STANDARD 17)
When I try to configure with an MSVC compiler, I get the following error:
Target "test" requires the language dialect "C17" (with compiler
extensions), but CMake does not know the compile flags to use to enable it.
I think that the compiler flags for C17 MSVC-C need to be added. According to the Visual Studio documentation, the needed flag is: /std:c17
, and has been available since Visual Studio 2019 version 16.8 (same as the flag for C11).
Edited by Brad King