brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · c8547a1 Raw
45 lines · plain
1#===-- lib/cuda/CMakeLists.txt ---------------------------------------------===#2#3# Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4# See https://llvm.org/LICENSE.txt for license information.5# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6#7#===------------------------------------------------------------------------===#8 9add_flangrt_library(flang_rt.cuda STATIC SHARED10  allocatable.cpp11  allocator.cpp12  descriptor.cpp13  init.cpp14  kernel.cpp15  memmove-function.cpp16  memory.cpp17  pointer.cpp18  registration.cpp19 20  TARGET_PROPERTIES21    # libflang_rt.runtime depends on a certain version of CUDA. To be able to have22    # multiple build of this library with different CUDA version, the version is23    # added to the library name.24    OUTPUT_NAME "flang_rt.cuda_${CUDAToolkit_VERSION_MAJOR}.${CUDAToolkit_VERSION_MINOR}"25  INCLUDE_DIRECTORIES26    PRIVATE ${CUDAToolkit_INCLUDE_DIRS}27  INSTALL_WITH_TOOLCHAIN28)29 30# For the static library, link-in the static dependencies as well.31if (TARGET flang_rt.cuda.static)32  target_link_libraries(flang_rt.cuda.static PUBLIC33    flang_rt.runtime.static34    CUDA::cudart_static35  )36endif ()37 38# For the shared library, use the shared versions of the dependencies.39if (TARGET flang_rt.cuda.shared)40  target_link_libraries(flang_rt.cuda.shared PUBLIC41    flang_rt.runtime.shared42    CUDA::cudart43  )44endif ()45