CMakeCUDAFilterImplicitLibs.cmake 876 B

1234567891011121314151617181920
  1. # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. # file Copyright.txt or https://cmake.org/licensing for details.
  3. # In CMakeDetermineCUDACompiler and CMakeTestCUDACompiler we detect
  4. # libraries that the CUDA compiler implicitly passes to the host linker.
  5. # CMake invokes the host linker directly and so needs to pass these libraries.
  6. # Filter out implicit link libraries that should not be passed unconditionally.
  7. macro(cmake_cuda_filter_implicit_libs _var_CMAKE_CUDA_IMPLICIT_LINK_LIBRARIES)
  8. list(REMOVE_ITEM "${_var_CMAKE_CUDA_IMPLICIT_LINK_LIBRARIES}"
  9. # The CUDA runtime libraries are controlled by CMAKE_CUDA_RUNTIME_LIBRARY.
  10. cudart cudart.lib
  11. cudart_static cudart_static.lib
  12. cudadevrt cudadevrt.lib
  13. # Dependencies of the CUDA static runtime library on Linux hosts.
  14. rt
  15. pthread
  16. dl
  17. )
  18. endmacro()