3

ビルド プロセスで (git を使用して) 複製される ExternalProject 依存関係があります。これはすべて、CMake + Make でうまく機能します。

mkdir build && cd build; 
cmake ..
make

make と入力すると、git を使用してライブラリのクローンが正しく作成され、ビルドされます。

ただし、Ninja Generator を使用すると、次のようになります。

mkdir build && cd build; 
cmake -GNinja ..
ninja

次のエラーが表示されます。

$ cmake -GNinja ..                                                                                                                                                                                                                                                   -- The C compiler identification is AppleClang 6.0.0.6000054
-- The CXX compiler identification is AppleClang 6.0.0.6000054
-- Check for working C compiler using: Ninja
-- Check for working C compiler using: Ninja -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Ninja
-- Check for working CXX compiler using: Ninja -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Boost version: 1.56.0
-- Found the following Boost libraries:
--   unit_test_framework
-- Found Git: /usr/local/bin/git (found version "2.1.2")
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/carneiro/src/gamgee/build

$ ninja ninja: error: 'contrib/htslib-prefix/src/htslib/libhts.a', needed by 'test/gamgee_test', missing and no known rule to make it

外部プロジェクトの git ダウンロードは cmake+ninja コンボでサポートされていませんか?

4

1 に答える 1

2

ビルドする前にクリーンを実行すると、すべてが機能し、忍者は私の依存関係を正しくダウンロードします。

したがって、ワークフローは次のようになります。

mkdir build && cd build
cmake -G Ninja ..
ninja clean  # if you don't do this, it will not download Externalproject dependencies
ninja

Ninja ジェネレーターの何らかのバグに違いありませんが、今のところこのワークフローに満足しています。

于 2014-11-02T16:51:02.207 に答える