CMake: Correctly unset host page size if set via cache
Fixes x86 flatpak builds unnecessarily using dynamic page size.
This commit is contained in:
parent
f90fdf66c8
commit
995a34e0e3
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue