Skip to content

Commit 652cc82

Browse files
authored
Enable some additional C++20 and C++23 compat warnings with clang (#614)
1 parent e909fa6 commit 652cc82

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

build/CompilerAndLinker.cmake

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,14 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang|IntelLLVM")
119119
if(WINDOWS_STORE)
120120
list(APPEND COMPILER_DEFINES _SILENCE_CLANG_COROUTINE_MESSAGE)
121121
endif()
122+
123+
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 10.0)
124+
list(APPEND COMPILER_SWITCHES -Wc++20-compat)
125+
endif()
126+
127+
if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 19.0)
128+
list(APPEND COMPILER_SWITCHES -Wc++23-compat)
129+
endif()
122130
elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
123131
list(APPEND COMPILER_SWITCHES /Zc:__cplusplus /Zc:inline /fp:fast /Qdiag-disable:161)
124132
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")

0 commit comments

Comments
 (0)