diff options
author | Leandro Lacerda <leandrolcampos@yahoo.com.br> | 2025-08-02 11:09:30 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-02 09:09:30 -0500 |
commit | acdc01b0392343daa7b91a34ba5d9c45372ed1bf (patch) | |
tree | a6eb1f0c9db7a2154a7d1dafa2c44b1123df66af | |
parent | 16a0892a9db1825ffa5e42b801e13215418d93b9 (diff) | |
download | llvm-acdc01b0392343daa7b91a34ba5d9c45372ed1bf.zip llvm-acdc01b0392343daa7b91a34ba5d9c45372ed1bf.tar.gz llvm-acdc01b0392343daa7b91a34ba5d9c45372ed1bf.tar.bz2 |
[Offload][UnitTests] Fix incorrect CUDA path variable in CMake helper (#151820)
This PR fixes a minor bug in the `add_offload_test_device_code` CMake
helper function in `offload/unittests/CMakeLists.txt`.
The function was discovering the local CUDA Toolkit path and storing it
in the `cuda_path` variable but was then using the incorrect `CUDA_ROOT`
variable in the `add_custom_command` call for the NVPTX target.
This change corrects the command to use the intended `cuda_path`
variable.
-rw-r--r-- | offload/unittests/CMakeLists.txt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/offload/unittests/CMakeLists.txt b/offload/unittests/CMakeLists.txt index 6d165ffd..24826a1 100644 --- a/offload/unittests/CMakeLists.txt +++ b/offload/unittests/CMakeLists.txt @@ -40,7 +40,7 @@ function(add_offload_test_device_code test_filename test_name) OUTPUT ${output_file} COMMAND ${CMAKE_C_COMPILER} --target=nvptx64-nvidia-cuda -march=${nvptx_arch} - -nogpulib --cuda-path=${CUDA_ROOT} -flto ${ARGN} + -nogpulib --cuda-path=${cuda_path} -flto ${ARGN} ${SRC_PATH} -o ${output_file} DEPENDS ${SRC_PATH} ) |