Can't install from a downloaded ZIP
Closed this issue · 3 comments
cxw42 commented
Thank you for releasing this project, and under a permissive license! I am trying to install from a downloaded ZIP, and installation fails because it can't get the version number from Git.
To reproduce, on Ubuntu 18.04 x64:
curl -L -o libIntegrate.zip \
https://github.com/CD3/libIntegrate/archive/bce57026475bb49ce882438bd8f81bdcf2341eaf.zip
unzip libIntegrate.zip
mv libIntegrate-* libIntegrate # because the dir name has a commit in it
cd libIntegrate
mkdir build
cd build
cmake .. -G Ninja
sudo ninja install
CMake output:
-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: /usr/bin/git (found version "2.17.1")
CMake Error at cmake/Modules/macro-git_version.cmake:54 (message):
Source directory is not a git repo.
Call Stack (most recent call first):
CMakeLists.txt:17 (GIT_VERSION)
-- Configuring incomplete, errors occurred!
Edit The same is true if I download a tagged ZIP such as https://github.com/CD3/libIntegrate/archive/v0.3.2.zip .
CD3 commented
Ah, thank you for bringing this up. I never install from zip, so I haven't run into this. But this should be supported, so I need to rethink how version numbers are detected. Thanks again, I'll look into this.
CD3 commented
This should work now. version 0.3.3 includes a version.txt file that will be used if no git repository is found.
Thanks again.