vcpkg/ports/blaze/fix-vm-build.patch
ras0219 bb61fc1662
[blaze][ceres][clapack][geogram][lapack][lapack-reference][opencv4][selene] Fix deps issues (#13229)
Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
2020-09-04 18:59:21 -07:00

21 lines
807 B
Diff

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})