https://github.com/Kitware/CMake
Raw File
Tip revision: 105cb4ee02adcb3754a388b71db54ff8a01b1313 authored by Brad King on 13 February 2024, 14:07:34 UTC
CMake 3.29.0-rc1
Tip revision: 105cb4e
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