diff options
Diffstat (limited to 'src/cmake')
-rw-r--r-- | src/cmake/cpu.cmake | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cmake/cpu.cmake b/src/cmake/cpu.cmake index 20dab7bfce1..b2af1aa0926 100644 --- a/src/cmake/cpu.cmake +++ b/src/cmake/cpu.cmake @@ -14,7 +14,10 @@ ############################################################################## # Cache line size detection ############################################################################## -if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)") +if(CMAKE_CROSSCOMPILING) + message(STATUS "Cross-compiling - cache line size detection disabled") + set(VPP_LOG2_CACHE_LINE_SIZE 6) +elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64.*|AARCH64.*)") file(READ "/proc/cpuinfo" cpuinfo) string(REPLACE "\n" ";" cpuinfo ${cpuinfo}) foreach(l ${cpuinfo}) |