Actions
Bug #1047
closedconfig/tests/cxx11.cc fails on MSVC
Start date:
2022-11-17
Due date:
% Done:
0%
Estimated time:
Module:
CMake
Operating System:
Windows
Compiler:
MSVC
Description
According to the following forum post, the recognition of newer C++ versions fails on MSVC because MSVC does not update the _cplusplus macro,
which is checked in config/tests/cxx11.cc, unless the "/Zc:_cplusplus" option is specified:
https://forum.dcmtk.org/viewtopic.php?f=3&t=5219
The "/Zc:__cplusplus" option was introduced in Visual Studio 2017. We should, therefore, modify the CMake code to automatically set this option when MSVC 2017 or newer is detected.
Actions