File: CubCompilerHacks.cmake

package info (click to toggle)
cub 1.11.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 3,716 kB
  • sloc: cpp: 1,466; ansic: 1,135; makefile: 375; sh: 22
file content (17 lines) | stat: -rw-r--r-- 700 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# Setup compiler paths.
# This file must be included before enabling any languages.

if (NOT ("${CMAKE_CUDA_HOST_COMPILER}" STREQUAL "" OR
  "${CMAKE_CUDA_HOST_COMPILER}" STREQUAL "${CMAKE_CXX_COMPILER}"))
  set(tmp "${CMAKE_CUDA_HOST_COMPILER}")
  unset(CMAKE_CUDA_HOST_COMPILER CACHE)
  message(FATAL_ERROR
    "For convenience, CUB's test harness uses CMAKE_CXX_COMPILER for the "
    "CUDA host compiler. Refusing to overwrite specified "
    "CMAKE_CUDA_HOST_COMPILER -- please reconfigure without setting this "
    "variable. Currently:\n"
    "CMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}\n"
    "CMAKE_CUDA_HOST_COMPILER=${tmp}"
  )
endif()
set(CMAKE_CUDA_HOST_COMPILER "${CMAKE_CXX_COMPILER}")