[CMake] -std=c++17 vs -std=c++1y
Andrew Brownsword
andrew.e.brownsword at gmail.com
Sun May 6 11:00:14 EDT 2018
Hi,
Is there a way to get cmake 3.11 to emit 17 vs 1y when setting CMAKE_CXX_STANDARD? I’m finding that it seems to be a common practice to use the value of the preprocessor define __cplusplus (which is a date), and the value differs depending on whether 17 or 1y is used (at least with CLang). I haven’t figured out how to get cmake to emit -std=c++17, it always seems to use 1y, which is causing problems with code that assumes the __cplusplus date reflects the c++17 standardization date.
Thanks,
Andrew
More information about the CMake
mailing list