CMake - syntax error ?
-
I hope this forum will forgive me to ask this, but... CMake wants to have line added cmake_minimum_required(VERSION 3.5) after which opencv.sh complains ./opencv.sh: line 1: syntax error near unexpected token `VERSION' ./opencv.sh: line 1: `cmake_minimum_required(VERSION 3.5)' I am enclosing my crude log to illustrate some details. And no, I do not know how to change CMake options to remove this version requirement and still would like to know the "syntax" error I made. pre lang="text">
CMake Error at traincascade/CMakeLists.txt:2 (ocv_check_dependencies):
Unknown CMake command "ocv_check_dependencies".
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such ascmake_minimum_required(VERSION 3.5)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
Configuring incomplete, errors occurred!
after adding
CMake Error at traincascade/CMakeLists.txt:2 (ocv_check_dependencies):
Unknown CMake command "ocv_check_dependencies".
CMake Warning (dev) in CMakeLists.txt:
No cmake_minimum_required command is present. A line of code such ascmake_minimum_required(VERSION 3.5)
should be added at the top of the file. The version specified may be lower
if you wish to support older CMake versions for this project. For more
information run "cmake --help-policy CMP0000".
This warning is for project developers. Use -Wno-dev to suppress it.
Configuring incomplete, errors occurred!
after addingCmake complains
im-desktop:~$ ./opencv.sh
./opencv.sh: line 1: syntax error near unexpected token `VERSION'
./opencv.sh: line 1: `cmake_minimum_required(VERSION 3.5)'
jim@jim-desktop:~$Cheers Vaclav