fix-vm-build.patch 787 B

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