cuda : fix CUDA_FLAGS not being applied (#10403)

This commit is contained in:
Diego Devesa 2024-11-19 14:29:38 +01:00 committed by GitHub
parent 8e752a777b
commit 3ee6382d48
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 1 additions and 2 deletions

View file

@ -149,7 +149,7 @@ if (CUDAToolkit_FOUND)
list(APPEND CUDA_FLAGS -Xcompiler ${CUDA_CXX_FLAGS_JOINED})
endif()
add_compile_options("$<$<COMPILE_LANGUAGE:CUDA>:${CUDA_FLAGS}>")
target_compile_options(ggml-cuda PRIVATE "$<$<COMPILE_LANGUAGE:CUDA>:${CUDA_FLAGS}>")
else()
message(FATAL_ERROR "CUDA Toolkit not found")
endif()