Repository navigation
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
83 lines (69 loc) · 1.95 KB
/
Copy pathCMakeLists.txt
File metadata and controls
83 lines (69 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
cmake_minimum_required(VERSION 3.30.4)
project(cudf-test-harness LANGUAGES C CXX CUDA)
# Default to Debug build with full debug symbols
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug)
endif()
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_SCAN_FOR_MODULES OFF)
# Debug flags
set(CMAKE_CXX_FLAGS_DEBUG "-g3 -O0")
set(CMAKE_CUDA_FLAGS_DEBUG "-g -G -O0")
include(FetchContent)
find_package(CUDAToolkit REQUIRED)
if(CUDAToolkit_VERSION VERSION_LESS 13.0)
message(FATAL_ERROR "cuDF source builds require CUDA Toolkit 13.0 or newer")
endif()
foreach(option
BUILD_TESTS
BUILD_BENCHMARKS
CUDF_BUILD_TESTUTIL
CUDF_BUILD_STREAMS_TEST_UTIL
CUDF_KVIKIO_REMOTE_IO
)
set(${option} OFF CACHE BOOL "Disabled for cudf-test-harness cuDF source build" FORCE)
endforeach()
FetchContent_Declare(
cudf
GIT_REPOSITORY https://github.com/rapidsai/cudf.git
# rapidsai/cudf#22620: fix Arrow Device string-view imports with producer-owned
# ArrowArray.private_data.
GIT_TAG 3ad0f0c9aeed6e5a521b07587e97c58943a714f7
SOURCE_SUBDIR cpp
)
FetchContent_MakeAvailable(cudf)
# Create the executable
add_executable(cudf-test-harness
src/main.cpp
)
target_include_directories(cudf-test-harness PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/include
)
target_link_libraries(cudf-test-harness PRIVATE
cudf::cudf
${CMAKE_DL_LIBS}
)
# Set RPATH for bundled distribution (looks for libs relative to binary)
set_target_properties(cudf-test-harness PROPERTIES
INSTALL_RPATH "$ORIGIN/lib"
BUILD_WITH_INSTALL_RPATH OFF
)
# Install target
install(TARGETS cudf-test-harness
RUNTIME DESTINATION .
COMPONENT harness
)
# Optional: Build test library
option(BUILD_TEST_LIB "Build the test export library" ON)
if(BUILD_TEST_LIB)
add_library(test_export_lib SHARED
test/test_export_lib.cpp
)
set_target_properties(test_export_lib PROPERTIES
CUDA_SEPARABLE_COMPILATION ON
)
target_link_libraries(test_export_lib PRIVATE
CUDA::cudart
)
endif()