1#ifndef __HIP__ 2# error "A C or C++ compiler has been selected for HIP" 3#endif 4 5@CMAKE_HIP_COMPILER_ID_CONTENT@ 6 7/* Construct the string literal in pieces to prevent the source from 8 getting matched. Store it in a pointer rather than an array 9 because some compilers will just produce instructions to fill the 10 array rather than assigning a pointer to a static array. */ 11char const* info_compiler = "INFO" ":" "compiler[" COMPILER_ID "]"; 12#ifdef SIMULATE_ID 13char const* info_simulate = "INFO" ":" "simulate[" SIMULATE_ID "]"; 14#endif 15 16@CMAKE_HIP_COMPILER_ID_PLATFORM_CONTENT@ 17@CMAKE_HIP_COMPILER_ID_ERROR_FOR_TEST@ 18 19const char* info_language_standard_default = "INFO" ":" "standard_default[" 20#if __cplusplus > 202002L 21 "23" 22#elif __cplusplus > 201703L 23 "20" 24#elif __cplusplus >= 201703L 25 "17" 26#elif __cplusplus >= 201402L 27 "14" 28#elif __cplusplus >= 201103L 29 "11" 30#else 31 "98" 32#endif 33"]"; 34 35const char* info_language_extensions_default = "INFO" ":" "extensions_default[" 36#if (defined(__clang__) || defined(__GNUC__)) && !defined(__STRICT_ANSI__) 37 "ON" 38#else 39 "OFF" 40#endif 41"]"; 42 43/*--------------------------------------------------------------------------*/ 44 45int main(int argc, char* argv[]) 46{ 47 int require = 0; 48 require += info_compiler[argc]; 49 require += info_platform[argc]; 50#ifdef COMPILER_VERSION_MAJOR 51 require += info_version[argc]; 52#endif 53#ifdef SIMULATE_ID 54 require += info_simulate[argc]; 55#endif 56#ifdef SIMULATE_VERSION_MAJOR 57 require += info_simulate_version[argc]; 58#endif 59 require += info_language_standard_default[argc]; 60 require += info_language_extensions_default[argc]; 61 (void)argv; 62 return require; 63} 64