CMake: Define HAVE_CRC_X86_ASM when 32-bit x86 CRC assembly is used

This commit is contained in:
Lasse Collin 2024-06-20 22:55:22 +03:00
parent f76837acb6
commit 1dca581ff2
1 changed files with 3 additions and 0 deletions

View File

@ -704,6 +704,7 @@ else()
if(XZ_ASM_I386)
target_sources(liblzma PRIVATE src/liblzma/check/crc32_x86.S)
target_compile_definitions(liblzma PRIVATE HAVE_CRC_X86_ASM)
else()
target_sources(liblzma PRIVATE src/liblzma/check/crc32_fast.c)
endif()
@ -723,6 +724,8 @@ if("crc64" IN_LIST XZ_CHECKS)
if(XZ_ASM_I386)
target_sources(liblzma PRIVATE src/liblzma/check/crc64_x86.S)
# Adding #define HAVE_CRC_X86_ASM was already handled in
# the CRC32 case a few lines above. CRC32 is always built.
else()
target_sources(liblzma PRIVATE src/liblzma/check/crc64_fast.c)
endif()