Skip to content
  • Adam Strzelecki's avatar
    FindCUDA: Fix OSX Clang & no C language enabled · 32bcec5f
    Adam Strzelecki authored
    When setting default CUDA_HOST_COMPILER we must dereference CMAKE_C_COMPILER,
    i.e. /usr/bin/clang should be used instead /usr/bin/cc which is symlink.
    Otherwise CUDA thinks it is GCC and issues -dumpspecs which is unknown option
    to Clang.
    
    Also in case neither CMAKE_C_COMPILER is defined (project does not use C
    language) nor CUDA_HOST_COMPILER is specified manually we should skip -ccbin
    and let nvcc use its own default C compiler.
    32bcec5f