You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
cmake/Modules/CMakeHIPCompilerABI.hip

31 lines
642 B

#if !defined(__HIP__) && !defined(__NVCC__)
# error "A C or C++ compiler has been selected for HIP"
#endif
#include "CMakeCompilerABI.h"
#if defined(__NVCC__)
# include "CMakeCompilerCUDAArch.h"
#endif
int main(int argc, char* argv[])
{
int require = 0;
require += info_sizeof_dptr[argc];
#if defined(ABI_ID)
require += info_abi[argc];
#endif
static_cast<void>(argv);
#if defined(__NVCC__)
if (!cmakeCompilerCUDAArch()) {
// Convince the compiler that the non-zero return value depends
// on the info strings so they are not optimized out.
return require ? -1 : 1;
}
return 0;
#else
return require;
#endif
}