From e8854b6bdc956c46dc4232bd07c17163034a00f2 Mon Sep 17 00:00:00 2001 From: Lasse Collin Date: Sat, 15 Jun 2024 18:07:04 +0300 Subject: [PATCH] CMake: Add XZ_ASSUME_RAM --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 48ddfe89..4ebce3f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1790,7 +1790,9 @@ if(NOT MSVC OR MSVC_VERSION GREATER_EQUAL 1900) target_link_libraries(xz PRIVATE liblzma libgnu) - target_compile_definitions(xz PRIVATE ASSUME_RAM=128) + set(XZ_ASSUME_RAM "128" CACHE STRING "Assume that the system has \ +this many MiB of RAM if xz cannot determine the amount at runtime") + target_compile_definitions(xz PRIVATE "ASSUME_RAM=${XZ_ASSUME_RAM}") if(WIN32) # Add the Windows resource file for xz.exe.