georgmartius / vid.stab

Video stabilization library
http://public.hronopik.de/vid.stab/
Other
838 stars 110 forks source link

FindSSE: ensure ${CPUINFO} is quoted #93

Closed mistydemeo closed 3 years ago

mistydemeo commented 3 years ago

If ${CPUINFO} isn't quoted, and it's an empty string, CMake's STRING REPLACE function will error with a note it's being called with too few arguments. Fixes:

CMake Error at CMakeModules/FindSSE.cmake:47 (STRING):
  STRING sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.
Call Stack (most recent call first):
  CMakeLists.txt:8 (include)

This happened to me on an ARM-based Mac, where machdep.cpu.features is empty and therefore CPUINFO was defined as an empty string. I don't think there's any need to worry about not getting any values from it since all that's being checked for is SSE, which is never going to be defined on ARM anyway.

georgmartius commented 3 years ago

Thanks for the pull request. Will merge.

mistydemeo commented 3 years ago

Thanks!