Cannot build with ninja
Steps to reproduce:
mkdir build
cd build
cmake -GNinja ../
ninja
outputs:
ninja: error: 'test/prefix/lib/libgmock.a', needed by 'test/run-tests', missing and no known rule to make it
Related #210 #539 but nothing gives a solution. Adding -DYAML_CPP_BUILD_TOOLS=OFF doesn't change anything.
Environment:
$ cmake --version
cmake version 3.10.2
CMake suite maintained and supported by Kitware (kitware.com/cmake).
$ ninja --version
1.8.2
$ lsb_release -d
Description: Ubuntu 18.04.1 LTS
Using make works fine in the same environment
I made it build with Ninja here: https://github.com/jbeder/yaml-cpp/pull/674/commits/5eefba2b116910641b3131312790f477487d09a0
Unfortunately I couldn't get to build and pass the tests on Travis. I guess a serious change to the build environment is necessary.
Seeing the same error message for ~yaml-cpp-0.6.3 cmake version 3.26.3 on Ubuntu 20.04.6 LTS
cmake --build build/yaml-cpp --config Release --parallel
ninja: error: 'test/prefix/lib/libgmock.a', needed by 'test/run-tests', missing and no known rule to make it
make: *** [manifest/module/Makefile.yaml-cpp:24: build-yaml-cpp] Error 1
Does seem to work for current master branch. Great!