fix appending to CUDA_FLAGS

This commit is contained in:
Jared Van Bortel 2024-01-26 11:37:30 -05:00
parent 7105287f0d
commit bc0192f654

View file

@ -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("$<$<COMPILE_LANGUAGE:CUDA>:${CUDA_FLAGS}>")
list(APPEND CUDA_FLAGS -Xcompiler ${CUDA_CXX_FLAGS_JOINED})
endif()
endif()
add_compile_options("$<$<COMPILE_LANGUAGE:CUDA>:${CUDA_FLAGS}>")