Unverified Commit 2e3543c0 authored by Samuel Johnson's avatar Samuel Johnson Committed by GitHub
Browse files

[cmake] [CUDA] ignore CUDA-specific source files in non-CUDA builds (fixes #6267) (#6268)

parent 5516533c
......@@ -428,7 +428,10 @@ file(
src/network/*.cpp
src/treelearner/*.cpp
src/utils/*.cpp
if(USE_CUDA)
)
file(
GLOB
LGBM_CUDA_SOURCES
src/treelearner/*.cu
src/boosting/cuda/*.cpp
src/boosting/cuda/*.cu
......@@ -442,9 +445,12 @@ if(USE_CUDA)
src/io/cuda/*.cpp
src/cuda/*.cpp
src/cuda/*.cu
endif()
)
if(USE_CUDA)
list(APPEND SOURCES ${LGBM_CUDA_SOURCES})
endif()
add_library(lightgbm_objs OBJECT ${SOURCES})
if(BUILD_CLI)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment