CMakeNVCCFilterImplicitInfo.cmake 721 B

12345678910111213141516
  1. # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. # file Copyright.txt or https://cmake.org/licensing for details.
  3. macro(cmake_nvcc_filter_implicit_info lang lang_var_)
  4. # Remove the CUDA Toolkit include directories from the set of
  5. # implicit system include directories.
  6. # This resolves the issue that NVCC doesn't specify these
  7. # includes as SYSTEM includes when compiling device code, and sometimes
  8. # they contain headers that generate warnings, so let users mark them
  9. # as SYSTEM explicitly
  10. if(${lang_var_}TOOLKIT_INCLUDE_DIRECTORIES)
  11. list(REMOVE_ITEM CMAKE_${lang}_IMPLICIT_INCLUDE_DIRECTORIES
  12. ${${lang_var_}TOOLKIT_INCLUDE_DIRECTORIES}
  13. )
  14. endif()
  15. endmacro()