From 995a34e0e359b8c772a41e86b7f5fb470b3080ad Mon Sep 17 00:00:00 2001 From: Stenzek Date: Wed, 12 Feb 2025 22:20:39 +1000 Subject: [PATCH] CMake: Correctly unset host page size if set via cache Fixes x86 flatpak builds unnecessarily using dynamic page size. --- CMakeModules/DuckStationUtils.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeModules/DuckStationUtils.cmake b/CMakeModules/DuckStationUtils.cmake index f0635f1ac..d7ea0b096 100644 --- a/CMakeModules/DuckStationUtils.cmake +++ b/CMakeModules/DuckStationUtils.cmake @@ -120,8 +120,11 @@ function(detect_page_size) # For universal Apple builds, we use preprocessor macros to determine page size. # Similar for Windows, except it's always 4KB. if(NOT CPU_ARCH_ARM64 OR NOT LINUX) + unset(HOST_PAGE_SIZE CACHE) unset(HOST_PAGE_SIZE PARENT_SCOPE) + unset(HOST_MIN_PAGE_SIZE CACHE) unset(HOST_MIN_PAGE_SIZE PARENT_SCOPE) + unset(HOST_MAX_PAGE_SIZE CACHE) unset(HOST_MAX_PAGE_SIZE PARENT_SCOPE) return() elseif(DEFINED HOST_PAGE_SIZE) @@ -168,6 +171,7 @@ endfunction() function(detect_cache_line_size) # This is only needed for ARM64, or if the user hasn't overridden it explicitly. if(NOT CPU_ARCH_ARM64 OR HOST_CACHE_LINE_SIZE) + unset(HOST_CACHE_LINE_SIZE CACHE) unset(HOST_CACHE_LINE_SIZE PARENT_SCOPE) return() endif()