Questions tagged [ninja]

Ninja is a small build system with a focus on speed.

Ninja is a small build system with a focus on speed. It is designed to have its input files generated by a higher-level build system, and it is designed to run builds as fast as possible. Website: https://ninja-build.org/

614 questions
11
votes
1 answer

Difference between invoking `ninja` directly vs through `cmake --build`

Follow the commands: First I do: cmake -G Ninja .. then: cmake --build . -j10 or: ninja -j10 What is the difference between them? Are there pros or cons between them?
phribeiro
  • 119
  • 1
  • 1
  • 4
11
votes
1 answer

How to customize Ninja log output with CMake? (Possible?)

When I'm compiling with Makefile build log is colorful and detailed. But when I use Ninja I'm getting only one line with progress, without percentage and color. How can I make Ninja build log look like Makefile's one? Is this even possible or that…
Maxim Zhuchkov
  • 141
  • 1
  • 10
9
votes
1 answer

Produce all possible errors with Clang/Ninja / Keep going with Ninja / Ninja equivalent of make -k

I am compiling a fairly large library with many outside dependencies that I need to pull in. Each time I attempt a compilation I get a new error about a missing header file. I then have to go and track down where to find that header/library and add…
javey
  • 374
  • 4
  • 12
9
votes
4 answers

Limit CPU cores for ndkBuild with Cmake and Ninja

Before, when I was using ndkBuld for building native code on Android I was able to pass an argument to make to define a number of CPU cores to be used. If I wanted to utilize 4 cores I could add something like this externalNativeBuild { ndkBuild…
bio007
  • 893
  • 11
  • 20
9
votes
1 answer

libswiftDemangle.so on Linux

While compiling Swift on Mac machine, there is a dynamic library libswiftDemangle.dylib created. I need the dynamic library created on Linux machine as well, however, the dynamic library isn't created after a compilation of a source code. The file…
agoldis
  • 1,067
  • 16
  • 28
8
votes
2 answers

How to set up googletest wtih meson?

I have a git repository with some test code in C++ and I want to use Googletest to write some tests. I used git submodule to get it as part of the above repository. I want to use meson as the build engine. So far, so good. However, I cannot fathom…
Sardathrion - against SE abuse
  • 17,269
  • 27
  • 101
  • 156
8
votes
2 answers

Error when build LineageOS: "make: *** [ninja_wrapper] Error 1"

frameworks/av/camera/cameraserver/Android.mk:18: Target has integrated cameraserver into mediaserver. This is weakening security measures introduced in 7.0 find:…
Xuan An Nguyen
  • 536
  • 1
  • 6
  • 6
8
votes
1 answer

cmake ExternalProject_Add project not building before targets that depend on it

I have ExternalProjectAdd(googletest ......) ... add_library(gtest_main UNKNOWN IMPORTED) set_target_properties(gtest_main PROPERTIES "IMPORTED_LOCATION" ${binary_dir}/googlemock/gtest/libgtest_main.a ) ... add_executable(sometest…
lanza
  • 1,512
  • 2
  • 13
  • 26
8
votes
2 answers

Linking against an ExternalProject_add dependency in CMAKE

I'm getting this ninja build error below while running Ninja. My CMAKE build command iscmake -G"Ninja" -DCMAKE_BUILD_TYPE=Release. ninja: error: 'ext_deps/api/src/ext_api/build/src/lib/libapi.a', needed by 'Project', missing and no known rule to…
BlazePascal
  • 391
  • 5
  • 12
8
votes
0 answers

Real world performance of ninja vs msbuild?

I'm thinking about porting a huge C++ and C# code base from msbuild to cmake/ninja based on the promise that ninja has much better parallelism than msbuild when it comes to building native code. Does anyone have any real world experience of doing…
paulm
  • 5,629
  • 7
  • 47
  • 70
8
votes
2 answers

Quickfix list in vim when working with ninja and clang++

I have a C++ project which I compile using ninja and clang++, and would like to have errors during compilation appear in the quickfix list. Currently, when I set makeprg=ninja, and then run :make, all of the output generated by ninja simply appears…
Futile
  • 133
  • 1
  • 6
7
votes
1 answer

Android Studio CMake/Ninja Not Used for Building an NDK project

I have the following CMAKE & Ninja installed through Android Studio's SDK Tools: ~/Library/Android/sdk/cmake/3.10.2.4988404/bin/ninja --version 1.8.2 I run into "Error Configuring" while trying to build my project. Here is the build…
ssk
  • 9,045
  • 26
  • 96
  • 169
7
votes
0 answers

How do I parallelize externalNativeBuild for different ABIs?

Background I'm currently working on an Android project which contains a fair amount of native code. The native code is built for multiple ABIs. For various reasons, the native code has up until now been built using a custom Gradle task that invokes…
Michael
  • 57,169
  • 9
  • 80
  • 125
7
votes
1 answer

CMake building for Windows (clang-cl) using Ninja Generator

I am trying to build a simple application on a Windows machine using CMake as the main build tool. Once CMake is invoked on the project the is an error on configuration phase: > cmake -H. -G Ninja -Bbuild -DCMAKE_C_COMPILER:PATH="C:\Program…
maxik
  • 1,053
  • 13
  • 34
7
votes
0 answers

how to add include path in a gn file

I have a list of source file that i have included in source variable. I have included all header files required in include variable. So my gn file looks something like this. shared_library(mylib) { sources = [ ] …
Midhun
  • 744
  • 2
  • 15
  • 31
1
2
3
40 41