Files
CMake/Tests/RunCMake/ABI/CUDA.cmake
Brad King fcc89bda1d TestBigEndian: Re-implement using byte order detected from ABI check
Document the module as deprecated in favor of the ABI check results.
2020-11-06 09:17:30 -05:00

14 lines
474 B
CMake

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()