Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project doesn't compile with Ninja #22

Open
afiskon opened this issue Oct 26, 2017 · 2 comments
Open

Project doesn't compile with Ninja #22

afiskon opened this issue Oct 26, 2017 · 2 comments

Comments

@afiskon
Copy link

afiskon commented Oct 26, 2017

Steps to reproduce:

$ mkdir build
$ cd build
$ cmake -G Ninja ..
[...]
$ ninja
ninja: error: 'ext/gtest/src/googletest-build/libgtest.a', needed by 'cpp-lru-cache-test', missing and no known rule to make it

CMake version is 3.9.4, the environment is Arch Linux x64.

make compiles everything as expected. I believe something is wrong in ExternalProject_Add arguments. Unfortunately I can't give more details since I've never used ExternalProject before (I prefer git submodules).

@lamerman
Copy link
Owner

@afiskon I will have a look soon

@lamerman
Copy link
Owner

@afiskon what I understood so far is that for some reason with cmake -G Ninja .. it generates build.ninja with incompatible paths for static libraries.

So in the build file we have path ext/gtest/src/googletest-build/libgtest.a while in reality when ninja googletest is executed the path where static libraries are generated is ext/gtest/src/googletest-build/googlemock/gtest/libgtest.a

Moreover it somehow doesn't work if you don't execute ninja googletest before ninja.

Now it's all not clear for me, so let the task be open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants