Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Kitware
GitHub Repository: Kitware/CMake
Path: blob/master/Modules/CMakeCUDACompilerABI.cu
5009 views
1
#ifndef __CUDACC__
2
# error "A C or C++ compiler has been selected for CUDA"
3
#endif
4
5
#include "CMakeCompilerABI.h"
6
#include "CMakeCompilerCUDAArch.h"
7
8
int main(int argc, char* argv[])
9
{
10
int require = 0;
11
require += info_sizeof_dptr[argc];
12
require += info_byte_order_big_endian[argc];
13
require += info_byte_order_little_endian[argc];
14
#if defined(ABI_ID)
15
require += info_abi[argc];
16
#endif
17
#if defined(ARCHITECTURE_ID)
18
require += info_arch[argc];
19
#endif
20
static_cast<void>(argv);
21
22
if (!cmakeCompilerCUDAArch()) {
23
// Convince the compiler that the non-zero return value depends
24
// on the info strings so they are not optimized out.
25
return require ? -1 : 1;
26
}
27
28
return 0;
29
}
30
31