mirror of
https://github.com/Kitware/CMake.git
synced 2025-05-08 22:37:04 +08:00

Provide it whenever we can detect a target architecture from the compiler during compiler inspection. In order to avoid changing existing IDs, do this only for compilers where we don't already detect a target architecture during compiler identification. Fixes: #17702
22 lines
454 B
C++
22 lines
454 B
C++
#ifndef __cplusplus
|
|
# error "A C compiler has been selected for C++."
|
|
#endif
|
|
|
|
#include "CMakeCompilerABI.h"
|
|
|
|
int main(int argc, char* argv[])
|
|
{
|
|
int require = 0;
|
|
require += info_sizeof_dptr[argc];
|
|
require += info_byte_order_big_endian[argc];
|
|
require += info_byte_order_little_endian[argc];
|
|
#if defined(ABI_ID)
|
|
require += info_abi[argc];
|
|
#endif
|
|
#if defined(ARCHITECTURE_ID)
|
|
require += info_arch[argc];
|
|
#endif
|
|
(void)argv;
|
|
return require;
|
|
}
|