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
70
votes
8 answers

Ninja not found by CMake

I'm trying to build some code I got from GitHub using CMake, but keep getting the followings errors: CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a…
user3871995
  • 983
  • 1
  • 10
  • 19
45
votes
3 answers

CMake -G Ninja on Windows specify x64

I am using CMake on Windows with Ninja generator cmake -G Ninja .. This uses the default Windows x86 toolchain. How to specify x64 using the Ninja generator? PS: I know how to generate x64 with Visual Studio cmake -G "Visual Studio 12 2013 Win64…
xren
  • 1,381
  • 5
  • 14
  • 29
29
votes
1 answer

Is there something in the ninja language that makes it faster than make?

I often see the claim made that Ninja is faster than Make, is better at supporting incremental builds, and better at parallelization. Is this a quality of implementation issue or is there something in the Ninja language that enables this? I…
B.S.
  • 1,435
  • 2
  • 12
  • 18
28
votes
4 answers

Building with CMake, Ninja and Clang on Windows

This question is from 2017 and probably outdated. Please take the provided instructions with a pinch of salt since better solutions might be available now. Dear fellow C++ coders, after using the Visual Studio toolchain for building on windows for…
Simon
  • 594
  • 1
  • 6
  • 13
28
votes
4 answers

Installing only one target (and its dependencies) out of a complex project with cmake (open to better solutions)

Let's say I have a project made of several subprojects A, B, C, D... All subprojects depends on A, which changes rather frequently. Plus, there might be some further dependencies: in this example, D depends on B. Now: many people are working on…
Antonio
  • 19,451
  • 13
  • 99
  • 197
16
votes
1 answer

manipulate build order for independent targets in ninja/cmake

I'm working on a c++ project built with cmake+ninja with approx 1200 build targets on a 64 thread computer. There's one translation unit that takes 10min to compile, most others are comparably fast such that a build of all other targets together…
pseyfert
  • 3,263
  • 3
  • 21
  • 47
15
votes
2 answers

ninja: error: loading 'build.ninja': The system cannot find the file specified

I installed chocolatey and then ninja using choco install ninja. It got installed at C:\ProgramData\chocolatey\lib\ninja\tools. I added the path to the Environment variables too. When I launch ninja now, it throws and error: ninja: error: loading…
Pulkit Pant
  • 151
  • 1
  • 1
  • 4
15
votes
2 answers

Building c++ project on Windows with CMake, Clang and Ninja

I currently have cmake, clang and ninja installed on windows. I am trying to use CMake to generate a ninja build file to compile a very simple hello world program. My CMakeLists.txt looks like this: cmake_minimum_required(VERSION…
reynman
  • 709
  • 3
  • 9
  • 19
14
votes
1 answer

CMake and Ninja - "missing and no known rule to make it"

I have this CMakeLists.txt file: cmake_minimum_required(VERSION 3.8) include(${CMAKE_CURRENT_SOURCE_DIR}/src/Something.cmake) add_executable(execute main.cpp) add_dependencies(somethingInterface Something) add_dependencies(execute…
Rox Rosales
  • 145
  • 1
  • 1
  • 6
13
votes
2 answers

Using an ExternalProject download step with Ninja

This seems to be a common problem without a clear answer. The situation is: we have a 3rd party dependency that we want to install at build time when building a target that depends on it. That's roughly: ExternalProject_Add(target-ep …
Barry
  • 286,269
  • 29
  • 621
  • 977
13
votes
3 answers

How to install ninja-build for C++

https://github.com/ninja-build/ninja/releases I have downloaded the ninja-win.zip folder and extracted it. When I open it, there is a single .exe file in the entire folder. When I double click it a cmd window flashes for a split second. I have also…
Senyokbalgul
  • 1,058
  • 4
  • 13
  • 37
13
votes
3 answers

Error when try to compile Chromium

I try to use the command ninja -C out/Debug chrome to compile Chromium. However the error msg says that: ninja error loading 'build.ninja': the system cannot find the file specified ninja Entering dictory 'out/Debug' Could I know what's the…
user1487718
12
votes
1 answer

Extra verbose ninja debug output

I have a ninja build that seems to get stuck at a particular command, however if I run the command manually it completes quickly with no problems. Is there a way to get ninja to output more debugging information than ninja -v so I can work out why…
Timmmm
  • 88,195
  • 71
  • 364
  • 509
12
votes
4 answers

Ninja is required to load C++ extensions

I download a program and want to run it. It's from github. I enter the experiments/segmentation/ folder, and input "python test.py --dataset PContext --model-zoo Encnet_ResNet50_PContext --eval" to the terminal. The terminal shows "RuntimeError:…
alyssa
  • 121
  • 1
  • 1
  • 3
12
votes
4 answers

Ninja equivalent of Make's "build from this directory down" feature (with CMake)?

When building a project using CMake and Make, you can execute make from a subdirectory of your build tree (i.e. from a directory below whatever directory contains your top-level Makefile), and make will (as far as I can tell) build all targets at or…
Kyle Strand
  • 15,941
  • 8
  • 72
  • 167
1
2 3
40 41