Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. CMake - syntax error ?

CMake - syntax error ?

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestionannouncement
1 Posts 1 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Vaclav_
    wrote on last edited by
    #1

    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 as

    cmake_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 as

    cmake_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 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

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups