cmake-basis/BASIS

FindOpenCV.cmake REGEX REPLACE incorrect arguments

ahundt opened this issue · 0 comments

It seems the regex replace triggers a bug in some cmake versions, particularly the one found in the ubuntu ppa 'ppa:george-edison55/cmake-3.x' on 14.04. This is often missed because most current versions of OpenCV provide their own config scripts, so this find script is never entered.

Based on my experience with camodocal, it may simply be time to remove the FindOpenCV script since all current 2.x and 3.x versions provide their own cmake config scripts.

-- Looking for OpenCV (optional)...
CMake Error at /usr/local/share/basis/cmake-modules/FindOpenCV.cmake:155 (string):
  string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.
Call Stack (most recent call first):
  /usr/local/share/basis/cmake-modules/CommonTools.cmake:56 (_find_package)
  /usr/local/share/basis/cmake-modules/CommonTools.cmake:367 (find_package)
  /usr/local/share/basis/cmake-modules/ProjectTools.cmake:1694 (basis_find_package)
  /usr/local/share/basis/cmake-modules/ProjectTools.cmake:1909 (basis_find_packages)
  /usr/local/share/basis/cmake-modules/ProjectTools.cmake:2159 (basis_project_begin)
  CMakeLists.txt:84 (basis_project_impl)


CMake Error at /usr/local/share/basis/cmake-modules/FindOpenCV.cmake:156 (string):
  string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.
Call Stack (most recent call first):
  /usr/local/share/basis/cmake-modules/CommonTools.cmake:56 (_find_package)
  /usr/local/share/basis/cmake-modules/CommonTools.cmake:367 (find_package)
  /usr/local/share/basis/cmake-modules/ProjectTools.cmake:1694 (basis_find_package)
  /usr/local/share/basis/cmake-modules/ProjectTools.cmake:1909 (basis_find_packages)
  /usr/local/share/basis/cmake-modules/ProjectTools.cmake:2159 (basis_project_begin)
  CMakeLists.txt:84 (basis_project_impl)


CMake Error at /usr/local/share/basis/cmake-modules/FindOpenCV.cmake:157 (string):
  string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.
Call Stack (most recent call first):
  /usr/local/share/basis/cmake-modules/CommonTools.cmake:56 (_find_package)
  /usr/local/share/basis/cmake-modules/CommonTools.cmake:367 (find_package)
  /usr/local/share/basis/cmake-modules/ProjectTools.cmake:1694 (basis_find_package)
  /usr/local/share/basis/cmake-modules/ProjectTools.cmake:1909 (basis_find_packages)
  /usr/local/share/basis/cmake-modules/ProjectTools.cmake:2159 (basis_project_begin)
  CMakeLists.txt:84 (basis_project_impl)


-- Looking for OpenCV (optional)... - not found