"googlemock/include/vscode:/vscode.git/clone" did not exist on "5f467ec04df33024e3c6760fa403b5cd5d8e9ace"
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( ...@@ -428,7 +428,10 @@ file(
src/network/*.cpp src/network/*.cpp
src/treelearner/*.cpp src/treelearner/*.cpp
src/utils/*.cpp src/utils/*.cpp
if(USE_CUDA) )
file(
GLOB
LGBM_CUDA_SOURCES
src/treelearner/*.cu src/treelearner/*.cu
src/boosting/cuda/*.cpp src/boosting/cuda/*.cpp
src/boosting/cuda/*.cu src/boosting/cuda/*.cu
...@@ -442,9 +445,12 @@ if(USE_CUDA) ...@@ -442,9 +445,12 @@ if(USE_CUDA)
src/io/cuda/*.cpp src/io/cuda/*.cpp
src/cuda/*.cpp src/cuda/*.cpp
src/cuda/*.cu src/cuda/*.cu
endif()
) )
if(USE_CUDA)
list(APPEND SOURCES ${LGBM_CUDA_SOURCES})
endif()
add_library(lightgbm_objs OBJECT ${SOURCES}) add_library(lightgbm_objs OBJECT ${SOURCES})
if(BUILD_CLI) 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