File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -100,12 +100,16 @@ set(DISABLE_PCH CACHE BOOL "Disable precompiled headers as this may break certai
100100set (BUILD_TESTING CACHE BOOL "Build unit tests" )
101101
102102# Build with C++ 17 on Linux for maximum compatibility with older system
103- # but for Windows, enable C++ 26 to bypass a deprecation warning
103+ # but for Windows, enable C++ 20 to bypass a deprecation warning
104104# (workaround for https://github.com/KhronosGroup/Vulkan-Hpp/issues/2034)
105105# even though we do not yet use any C++ 20 features in our codebase
106- # also catch2 now wants to build with c++26 on windows clang?
107106if (WIN32 )
108- set (CMAKE_CXX_STANDARD 26)
107+ #clang wants c++2y for some catch2 stuff
108+ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND BUILD_TESTING)
109+ add_compile_options (--std=c++2y )
110+ else ()
111+ set (CMAKE_CXX_STANDARD 20)
112+ endif ()
109113else ()
110114 set (CMAKE_CXX_STANDARD 17)
111115endif ()
You can’t perform that action at this time.
0 commit comments