cannot build CUDA support with llvm-trunk


I try to build the latest version of llvm-trunk with Cmake (gcc-5.3.0
is necessary for CUDA) on my "SUSE Linux Enterprise Server 12.2 (x86_64)".
Unfortunately, "libomptarget" for CUDA will not be built with that
version. I use the same configuration command as before.

   -DCMAKE_C_FLAGS:STRING="-m64 -I/usr/local/valgrind/include" \
   -DCMAKE_CXX_FLAGS:STRING="-m64 -I/usr/local/valgrind/include" \
-DLIBOMPTARGET_DEP_LIBELF_INCLUDE_DIR:STRING="/usr/local/elfutils-0.169/include" \
-DLIBOMPTARGET_DEP_LIBELF_LIBRARIES:STRING="/usr/local/elfutils-0.169/lib64/" \
   -DCUDA_INCLUDE_DIRS:STRING="/usr/local/cuda/include" \
   -DCUDA_LIBRARIES:STRING="/usr/local/cuda/lib64/" \
   ../llvm \
   >& tee log.cmake

Now I get the following output.

loki build 613 tail -13 log.cmake
-- Generating done
CMake Warning:
   Manually-specified variables were not used by the project:


-- Build files have been written to: /export2/src/llvm-trunk/build
loki build 614

Do you have any ideas why I cannot build CUDA support any longer? Is it
necessary to change my configuration command to build CUDA support?
Thank you very much for any help in advance.

Kind regards



Are you sure it won’t build with CUDA support? The logs you linked only say it does not use some of the variables you defined, not that it failed to configure the project or build it. It could be due to CMake (since 3.8) supporting CUDA as a primary language and no longer needing to use find_package(CUDA). The includes and path to the libraries should be automatically added, so they no longer use those variables you were setting manually.

I don’t have a computer at hand to check that this is indeed the issue, though.

See and for more details about the new support.