Skip to content

Commit 59d8abf

Browse files
committed
Fix LLVM build errors
1 parent 3b0b79d commit 59d8abf

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@ function(cuco_set_common_compile_options target_name)
116116
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
117117
target_compile_options(${target_name} PRIVATE -Xcompiler -Wno-subobject-linkage)
118118
endif()
119+
120+
# 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")
123+
target_compile_options(${target_name} PRIVATE -Xcompiler -Wno-deprecated-literal-operator)
124+
endif()
119125
endfunction()
120126

121127
###################################################################################################

benchmarks/benchmark_utils.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ template <class OutputIt>
5959
struct lazy_discard {
6060
OutputIt it;
6161

62-
using index_type = typename thrust::iterator_traits<OutputIt>::difference_type;
63-
using value_type = typename thrust::iterator_traits<OutputIt>::value_type;
62+
using index_type = typename cuda::std::iterator_traits<OutputIt>::difference_type;
63+
using value_type = typename cuda::std::iterator_traits<OutputIt>::value_type;
6464

6565
__device__ void device_dispatch(index_type index, value_type const& value) const
6666
{

cmake/header_testing.cmake

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -63,16 +63,9 @@ function(cuco_add_header_tests)
6363
# Create executable test for this specific header
6464
add_executable(${headertest_target} ${header_src})
6565
target_link_libraries(${headertest_target} PRIVATE cuco::cuco CUDA::cudart)
66-
67-
target_compile_options(${headertest_target} PRIVATE
68-
$<$<COMPILE_LANGUAGE:CUDA>:--expt-extended-lambda>
69-
--compiler-options=-Wall --compiler-options=-Wextra
70-
--compiler-options=-Werror -Wno-deprecated-gpu-targets
71-
)
72-
73-
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
74-
target_compile_options(${headertest_target} PRIVATE -Xcompiler -Wno-subobject-linkage)
75-
endif()
66+
67+
# Use common compile options (includes all compiler-specific warning suppressions)
68+
cuco_set_common_compile_options(${headertest_target})
7669

7770
set_target_properties(${headertest_target} PROPERTIES
7871
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/tests/headers"

0 commit comments

Comments
 (0)