yaml-cpp icon indicating copy to clipboard operation
yaml-cpp copied to clipboard

Cannot build with ninja

Open przecze opened this issue 6 years ago • 4 comments

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

przecze avatar Feb 20 '19 19:02 przecze

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.

Zingam avatar Feb 21 '19 04:02 Zingam

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

nigels-com avatar Oct 03 '23 10:10 nigels-com

Does seem to work for current master branch. Great!

nigels-com avatar Oct 03 '23 11:10 nigels-com