aboutsummaryrefslogtreecommitdiff
path: root/ports/blaze/fix-vm-build.patch
blob: 3936299e0a7a2639d434f45659598bf076c35408 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e5ab1f460..a23c6dbf5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -145,12 +145,13 @@ if (${BLAZE_CACHE_SIZE_AUTO})
       endif (flag EQUAL 0)
    endif (APPLE)
 
-   if (flag)
+   string(REGEX MATCH "([0-9][0-9]+)" tmp ${tmp}) # Get a number containing at least 2 digits in the string tmp
+
+   if (flag OR NOT tmp)
       message("Cache size not found automatically. Using default value as cache size.")
       set(tmp ${BLAZE_CACHE_SIZE_DEFAULT})
    endif (flag)
 
-   string(REGEX MATCH "([0-9][0-9]+)" tmp ${tmp}) # Get a number containing at least 2 digits in the string tmp
    math(EXPR BLAZE_CACHE_SIZE ${tmp}*1024) # Convert to bytes (assuming that the value is given in kibibytes)
 
 endif (${BLAZE_CACHE_SIZE_AUTO})