[all-commits] [llvm/llvm-project] 3244a8: [OpenMP][CMake] Pass --cuda-path to regression tests.

Michael Kruse via All-commits all-commits at lists.llvm.org
Tue Apr 27 14:29:52 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3244a8b5366dcd7a840963a6a2ae2c7ffe50de2c
      https://github.com/llvm/llvm-project/commit/3244a8b5366dcd7a840963a6a2ae2c7ffe50de2c
  Author: Michael Kruse <llvm-project at meinersbur.de>
  Date:   2021-04-27 (Tue, 27 Apr 2021)

  Changed paths:
    M openmp/libomptarget/deviceRTLs/nvptx/test/lit.cfg
    M openmp/libomptarget/deviceRTLs/nvptx/test/lit.site.cfg.in
    M openmp/libomptarget/test/CMakeLists.txt
    M openmp/libomptarget/test/lit.cfg
    M openmp/libomptarget/test/lit.site.cfg.in

  Log Message:
  -----------
  [OpenMP][CMake] Pass --cuda-path to regression tests.

The OpenMP runtime can be compiled using a CUDA installed at non-default
location with the -DCUDA_TOOLKIT_ROOT_DIR setting. However, check-openmp
will fail afterwards because Clang needs to know where to find the CUDA
headers.

Fix by passing -cuda-path to Clang using the value of
CUDA_TOOLKIT_ROOT_DIR which has been determined by CMake. Also set
LD_LIBRARY_PATH such that it can find the cuda runtime when executing.
This will ensure that the regression test do not depend on the current
environment, but use the environment it was configured for.

Reviewed By: tianshilei1992

Differential Revision: https://reviews.llvm.org/D101266




More information about the All-commits mailing list