@@ -3,7 +3,7 @@ project(mmapper CXX)
33
44list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR } /cmake)
55
6- set (CMAKE_CXX_STANDARD 17 )
6+ set (CMAKE_CXX_STANDARD 20 )
77set (CMAKE_CXX_STANDARD_REQUIRED ON )
88set (CMAKE_CXX_EXTENSIONS OFF )
99
@@ -419,6 +419,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
419419 endif ()
420420
421421 add_compile_options (-Weverything )
422+ add_compile_options (-Wno-c++20-compat )
422423 add_compile_options (-Wno-c++98-c++11-compat-binary-literal ) # never useful.
423424 add_compile_options (-Wno-c++98-compat ) # never useful.
424425 add_compile_options (-Wno-c++98-compat-pedantic ) # sometimes useful.
@@ -461,7 +462,7 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
461462 add_compile_options (-Werror=shorten-64-to-32 )
462463 add_compile_options (-Werror=sign-conversion ) # can warn about hard-to-spot bugs.
463464 add_compile_options (-Werror=switch )
464- add_compile_options (-Werror=unused-result ) # required for c++17 [[nodiscard]]
465+ add_compile_options (-Werror=unused-result ) # required for [[nodiscard]]
465466 add_compile_options (-Werror=weak-vtables ) # can result in crashes for ODR violations.
466467
467468 # remove noise (most of these cannot be fixed)
@@ -472,6 +473,7 @@ if(MSVC)
472473 add_definitions (-DNOMINMAX )
473474 # modernize the __cplusplus value
474475 add_compile_options (/Zc:__cplusplus )
476+ add_compile_options (/Zc:preprocessor )
475477 add_compile_options (/utf-8 )
476478 add_compile_options (/permissive- )
477479 if (CMAKE_BUILD_TYPE_UPPER MATCHES "^RELWITHDEBINFO$" )
0 commit comments