File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -175,6 +175,7 @@ include(external/any) # download libn::any
175
175
include (external/eigen ) # download eigen3
176
176
include (external/pybind11 ) # download pybind11
177
177
include (external/cares )
178
+ include (external/cub )
178
179
179
180
if (WITH_DISTRIBUTE )
180
181
if (WITH_GRPC )
Original file line number Diff line number Diff line change
1
+ if (NOT WITH_GPU )
2
+ return ()
3
+ endif ()
4
+
5
+ include (ExternalProject )
6
+
7
+ set (CUB_SOURCE_DIR ${THIRD_PARTY_PATH} /cub )
8
+ set (CUB_INCLUDE_DIR ${CUB_SOURCE_DIR} /src/extern_cub )
9
+
10
+ include_directories (${CUB_INCLUDE_DIR} )
11
+
12
+ ExternalProject_Add (
13
+ extern_cub
14
+ ${EXTERNAL_PROJECT_LOG_ARGS}
15
+ GIT_REPOSITORY "https://github.com/NVlabs/cub.git"
16
+ GIT_TAG "v1.8.0"
17
+ PREFIX ${CUB_SOURCE_DIR}
18
+ UPDATE_COMMAND ""
19
+ CONFIGURE_COMMAND ""
20
+ BUILD_COMMAND ""
21
+ INSTALL_COMMAND ""
22
+ TEST_COMMAND ""
23
+ )
24
+
25
+ if (${CMAKE_VERSION} VERSION_LESS "3.3.0" )
26
+ set (dummyfile ${CMAKE_CURRENT_BINARY_DIR} /cub_dummy.c )
27
+ file (WRITE ${dummyfile} "const char *dummy = \" ${dummyfile} \" ;" )
28
+ add_library (cub STATIC ${dummyfile} )
29
+ else ()
30
+ add_library (cub INTERFACE )
31
+ endif ()
32
+
33
+ add_dependencies (cub extern_cub )
34
+
35
+ LIST (APPEND externl_project_dependencies cub )
You can’t perform that action at this time.
0 commit comments