Skip to content

Commit 57c2bde

Browse files
committed
clang Wno-error=c2y-extensions
1 parent 091eb99 commit 57c2bde

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

CMakeLists.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,11 @@ set(BUILD_TESTING CACHE BOOL "Build unit tests")
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
106106
if(WIN32)
107-
#clang wants c++26 for some catch2 stuff
108-
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND BUILD_TESTING)
109-
add_compile_options(--std=gnu++26)
107+
set(CMAKE_CXX_STANDARD 20)
108+
109+
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
110+
add_compile_options(-Wno-error=c2y-extensions)
110111
else()
111-
set(CMAKE_CXX_STANDARD 20)
112-
endif()
113112
else()
114113
set(CMAKE_CXX_STANDARD 17)
115114
endif()

0 commit comments

Comments
 (0)