https://github.com/Kitware/CMake
Raw File
Tip revision: 1f25aa1a0ac61a0b3d5b0c4e2abc98c49cd159a5 authored by Brad King on 29 January 2024, 20:01:32 UTC
CMake 3.28.2
Tip revision: 1f25aa1
CMakeHIPCompilerABI.hip
#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
}
back to top