【问题标题】:cmake error with a software bam-window software软件 bam-window 软件的 cmake 错误
【发布时间】:2015-03-31 16:33:04
【问题描述】:

我正在尝试安装工具 bam-window,但出现 cmake 错误。我在 linux 中下载了 bam-window-master.zip。该工具的链接托管在 git https://github.com/genome-vendor/bam-window 中。我下载并按照以下命令进行操作。

unzip bam-window-master.zip
cd bam-window-master
mkdir build
cd build
cmake ..

在做 cmake .. 编译一段时间后我得到一个错误

-- The C compiler identification is GNU 4.7.2
-- The CXX compiler identification is GNU 4.7.2
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - 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
-- Found Git: /usr/bin/git (found version "1.7.10.4") 
CMake Error at cmake/GitHelper.cmake:15 (message):
  Failed to get git revision, abort: fatal: Not a git repository (or any
  parent up to mount point /scratch/GT)

  Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

  !
Call Stack (most recent call first):
  CMakeLists.txt:9 (get_git_version_info)

如何摆脱这种情况并正确安装?

【问题讨论】:

    标签: linux github build cmake cmake-gui


    【解决方案1】:

    此项目的 CMakeLists.txt 假定(不幸的是)源代码不是作为 zip 文件下载的,而是从 github 克隆的。

    所以不要使用“下载 ZIP”链接,只需使用常规 GIT 命令克隆它:

    git 克隆https://github.com/genome-vendor/bam-window.git

    【讨论】:

    • fanstastic .. 它有效。我没有详细介绍 CMakeLists.txt。非常感谢。
    猜你喜欢
    • 2012-04-22
    • 2016-08-06
    • 1970-01-01
    • 1970-01-01
    • 2017-04-28
    • 1970-01-01
    • 2015-11-18
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多