From bc0192f65444694667e7704dc9c8f7ee8ba45755 Mon Sep 17 00:00:00 2001 From: Jared Van Bortel Date: Fri, 26 Jan 2024 11:37:30 -0500 Subject: [PATCH] fix appending to CUDA_FLAGS --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ec4bf1340..f7670a515 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -716,8 +716,7 @@ if (LLAMA_CUBLAS) list(APPEND CUDA_CXX_FLAGS ${ARCH_FLAGS}) list(JOIN CUDA_CXX_FLAGS " " CUDA_CXX_FLAGS_JOINED) # pass host compiler flags as a single argument if (NOT CUDA_CXX_FLAGS_JOINED STREQUAL "") - set(CUDA_FLAGS -Xcompiler ${CUDA_CXX_FLAGS_JOINED}) - add_compile_options("$<$:${CUDA_FLAGS}>") + list(APPEND CUDA_FLAGS -Xcompiler ${CUDA_CXX_FLAGS_JOINED}) endif() endif() add_compile_options("$<$:${CUDA_FLAGS}>")