1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-05-08 22:37:04 +08:00
CMake/Modules/CMakeCXXCompilerABI.cpp
Brad King 7f0f382c55 Provide CMAKE_<LANG>_COMPILER_ARCHITECTURE_ID on more compilers
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
2025-03-25 09:30:36 -04:00

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;
}