]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Disable Multithreading in CMake Builds for Android 2899/head
authorW. Felix Handte <w@felixhandte.com>
Thu, 2 Dec 2021 22:23:42 +0000 (17:23 -0500)
committerW. Felix Handte <w@felixhandte.com>
Thu, 2 Dec 2021 22:23:42 +0000 (17:23 -0500)
build/cmake/CMakeLists.txt

index a0505778aa57c1d362942dc563fdd20450b116bc..93a167cafb6a1c376bf402195dbc845945ccf649 100644 (file)
@@ -92,8 +92,14 @@ else ()
     add_definitions(-DZSTD_LEGACY_SUPPORT=0)
 endif ()
 
+if (ANDROID)
+    set(ZSTD_MULTITHREAD_SUPPORT_DEFAULT OFF)
+else()
+    set(ZSTD_MULTITHREAD_SUPPORT_DEFAULT ON)
+endif()
+
 # Multi-threading support
-option(ZSTD_MULTITHREAD_SUPPORT "MULTITHREADING SUPPORT" ON)
+option(ZSTD_MULTITHREAD_SUPPORT "MULTITHREADING SUPPORT" ${ZSTD_MULTITHREAD_SUPPORT_DEFAULT})
 
 if (ZSTD_MULTITHREAD_SUPPORT)
     message(STATUS "ZSTD_MULTITHREAD_SUPPORT is enabled")