aewallin / opencamlib

open source computer aided manufacturing algorithms library
http://www.anderswallin.net/CAM
GNU Lesser General Public License v2.1
409 stars 138 forks source link

Incorrectly checks for git/version from release #154

Open hobbes1069 opened 1 year ago

hobbes1069 commented 1 year ago

The cmake configuration checks for git even when cmake is executed from a versioned source download.

Cmake needs to be adjusted to skip this check in this case.

Error:

-- Found Git: /usr/bin/git (found version "2.40.0") 
CMake Warning at src/version_string.cmake:38 (message):
  Git failed (not a repo, or no tags).
Call Stack (most recent call first):
  src/CMakeLists.txt:185 (include)

-- version_string.cmake read from file GIT_COMMIT_ID: 
-- OpenCAMLib version: ..
CMake Error at src/version_string.cmake:39 (file):
  file failed to open for reading (No such file or directory):

    /builddir/build/BUILD/opencamlib-2023.01.11/src/git-tag.txt
Call Stack (most recent call first):
  src/CMakeLists.txt:185 (include)

CMake Error at src/version_string.cmake:40 (string):
  string sub-command REPLACE requires at least four arguments.
Call Stack (most recent call first):
  src/CMakeLists.txt:185 (include)