]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
CMake: Define HAVE_CRC_X86_ASM when 32-bit x86 CRC assembly is used
authorLasse Collin <lasse.collin@tukaani.org>
Thu, 20 Jun 2024 19:55:22 +0000 (22:55 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Sun, 23 Jun 2024 11:36:44 +0000 (14:36 +0300)
CMakeLists.txt

index c57deb0790e3a7bf98739d3ce7c58628679e37cd..fdabd9f7e9241b1267ee8899de2f6df154b25f45 100644 (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()