From 1dca581ff20aa1cde61e9e5267d3aeb0af9b6845 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Thu, 20 Jun 2024 22:55:22 +0300 Subject: [PATCH] CMake: Define HAVE_CRC_X86_ASM when 32-bit x86 CRC assembly is used --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c57deb07..fdabd9f7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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()