1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-19 02:17:27 +08:00

CMakeDetermineCompilerABI: Make ABI info string more robust

Apply the fix from commit 70c2dc8a64 (ENH: Make compiler id detection
more robust, 2008-03-10, v2.6.0~67) the `INFO:abi` string.
This commit is contained in:
Brad King
2025-03-13 14:55:10 -04:00
parent 67ab580804
commit c0224f5aa1

View File

@@ -40,6 +40,12 @@ static unsigned short const info_byte_order_little_endian[] = {
# define ABI_ID "ELF"
#endif
/* Construct the string literal in pieces to prevent the source from
getting matched. Store it in a pointer rather than an array
because some compilers will just produce instructions to fill the
array rather than assigning a pointer to a static array. */
#if defined(ABI_ID)
static char const info_abi[] = "INFO:abi[" ABI_ID "]";
static char const* info_abi = "INFO"
":"
"abi[" ABI_ID "]";
#endif