Skip to content

Commit 54b50f7

Browse files
committed
Clang 15 or + fix
1 parent 59d8abf commit 54b50f7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,9 @@ function(cuco_set_common_compile_options target_name)
118118
endif()
119119

120120
# Add Clang-specific warning suppression for deprecated literal operators
121-
# (Catch2 still uses deprecated syntax as of v3.9.1)
122-
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
121+
# (Catch2 and cuco code still use deprecated syntax)
122+
# Only for Clang 15+ which introduced this warning
123+
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 15.0)
123124
target_compile_options(${target_name} PRIVATE -Xcompiler -Wno-deprecated-literal-operator)
124125
endif()
125126
endfunction()

0 commit comments

Comments
 (0)