CMakeCUDACompilerABI.cu 631 B

1234567891011121314151617181920212223242526
  1. #ifndef __CUDACC__
  2. # error "A C or C++ compiler has been selected for CUDA"
  3. #endif
  4. #include "CMakeCompilerABI.h"
  5. #include "CMakeCompilerCUDAArch.h"
  6. int main(int argc, char* argv[])
  7. {
  8. int require = 0;
  9. require += info_sizeof_dptr[argc];
  10. require += info_byte_order_big_endian[argc];
  11. require += info_byte_order_little_endian[argc];
  12. #if defined(ABI_ID)
  13. require += info_abi[argc];
  14. #endif
  15. static_cast<void>(argv);
  16. if (!cmakeCompilerCUDAArch()) {
  17. // Convince the compiler that the non-zero return value depends
  18. // on the info strings so they are not optimized out.
  19. return require ? -1 : 1;
  20. }
  21. return 0;
  22. }