]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
Fix x86 WITH_* options dependencies.
authorVladislav Shchapov <vladislav@shchapov.ru>
Fri, 19 Jan 2024 19:29:22 +0000 (00:29 +0500)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Thu, 25 Jan 2024 09:21:49 +0000 (10:21 +0100)
Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
CMakeLists.txt

index 9ae46d6959e74a23bff3fef330783e3215c09eab..4226b7a187b6d4fa4650794709c1a6bd777b6684 100644 (file)
@@ -114,14 +114,14 @@ elseif(BASEARCH_S360_FOUND)
     option(WITH_DFLTCC_INFLATE "Build with DFLTCC intrinsics for decompression on IBM Z" OFF)
     option(WITH_CRC32_VX "Build with vectorized CRC32 on IBM Z" ON)
 elseif(BASEARCH_X86_FOUND)
-    option(WITH_AVX2 "Build with AVX2" ON)
-    option(WITH_AVX512 "Build with AVX512" ON)
-    option(WITH_AVX512VNNI "Build with AVX512 VNNI extensions" ON)
     option(WITH_SSE2 "Build with SSE2" ON)
-    option(WITH_SSSE3 "Build with SSSE3" ON)
-    option(WITH_SSE42 "Build with SSE42" ON)
-    option(WITH_PCLMULQDQ "Build with PCLMULQDQ" ON)
-    option(WITH_VPCLMULQDQ "Build with VPCLMULQDQ" ON)
+    cmake_dependent_option(WITH_SSSE3 "Build with SSSE3" ON "WITH_SSE2" OFF)
+    cmake_dependent_option(WITH_SSE42 "Build with SSE42" ON "WITH_SSSE3" OFF)
+    cmake_dependent_option(WITH_PCLMULQDQ "Build with PCLMULQDQ" ON "WITH_SSE42" OFF)
+    cmake_dependent_option(WITH_AVX2 "Build with AVX2" ON "WITH_SSE42" OFF)
+    cmake_dependent_option(WITH_AVX512 "Build with AVX512" ON "WITH_AVX2" OFF)
+    cmake_dependent_option(WITH_AVX512VNNI "Build with AVX512 VNNI extensions" ON "WITH_AVX512" OFF)
+    cmake_dependent_option(WITH_VPCLMULQDQ "Build with VPCLMULQDQ" ON "WITH_PCLMULQDQ;WITH_AVX512" OFF)
 endif()
 
 option(INSTALL_UTILS "Copy minigzip and minideflate during install" OFF)