summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/ABI/CUDA.cmake
blob: 8ede3a94a7d023552d2b58cd5c0de4c10944a0c6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
enable_language(CUDA)
if(NOT CMAKE_CUDA_BYTE_ORDER MATCHES "^(BIG_ENDIAN|LITTLE_ENDIAN)$")
  if(CMAKE_OSX_ARCHITECTURES MATCHES ";ppc|ppc;")
    return()
  endif()
  message(FATAL_ERROR "CMAKE_CUDA_BYTE_ORDER has unexpected value '${CMAKE_CUDA_BYTE_ORDER}'")
endif()

include(TestBigEndian)
test_big_endian(IS_BIG_ENDIAN)
if(IS_BIG_ENDIAN AND NOT CMAKE_CUDA_BYTE_ORDER STREQUAL "BIG_ENDIAN")
  message(FATAL_ERROR "test_big_endian result does not match ABI result")
endif()