c++ - Using CMake + Ninja to download dependencies using GIT -
c++ - Using CMake + Ninja to download dependencies using GIT -
i have externalproject dependency gets cloned (using git) in build process. works great cmake + make.
mkdir build && cd build; cmake .. make it correctly clones , builds library using git when type make.
however, when utilize ninja generator:
mkdir build && cd build; cmake -gninja .. ninja i next error: $ cmake -gninja .. -- c compiler identification appleclang 6.0.0.6000054 -- cxx compiler identification appleclang 6.0.0.6000054 -- check working c compiler using: ninja -- check working c compiler using: ninja -- works -- detecting c compiler abi info -- detecting c compiler abi info - done -- check working cxx compiler using: ninja -- check working cxx compiler using: ninja -- works -- detecting cxx compiler abi info -- detecting cxx compiler abi info - done -- boost version: 1.56.0 -- found next 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 'test/gamgee_test', missing , no known rule create
is git downloading of external projects not supported cmake+ninja combo?
turns out if clean before building, works , ninja download dependencies correctly.
so workflow looks this:
mkdir build && cd build cmake -g ninja .. ninja clean # if don't this, not download externalproject dependencies ninja must kind of bug in ninja generator, i'm happy workflow now.
c++ cmake ninja
Comments
Post a Comment