ninja

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

眉间皱痕 提交于 2019-12-30 04:34:05
问题 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 below that directory. This is because CMake generates a Makefile for every directory that contains targets, so when you're in a directory with targets, make finds the Makefile for building those targets. When CMake generates Ninja files, however,

Ninja giving error while executing

走远了吗. 提交于 2019-12-25 17:16:41
问题 I have created Ninja file using Cmake. While I execute the ninja file it shows following command cmd.exe /C "cmd.exe /C "cd /D C:\Users\user\OneDrive\Documents\GitHub\android-cmake-example-discordia\build && "C:\Program Files\CMake\bin\cmake.exe" -E remove_directory C:/Users/user/OneDrive/Documents/GitHub/android-cmake-example-discordia/build/apk/libs && cd /D C:\Users\user\OneDrive\Documents\GitHub\android-cmake-example-discordia\build && "C:\Program Files\CMake\bin\cmake.exe" -E make

Not able to compile WebRtc AppRTCDemo android application

主宰稳场 提交于 2019-12-25 07:42:20
问题 Not able to compile WebRtc AppRTCDemo Android application using Ninja tool. I am following instructions as given in this README file. I run this command sudo ninja -C out/Debug AppRTCDemo But it gets stuck on following lines: log: ninja version 0.1.3 initializing log: magic group: gid=0 (root) log: entering main loop log: generating initial pid array.. log: now monitoring process activity It never returns from this and I am not able to build the demo application. 回答1: Follow this example, i

Replacing /MD with /MT in CMake is not possible in Release mode

夙愿已清 提交于 2019-12-25 00:13:22
问题 I have a C++ library which I want to compile it using Visual Studio 2017 (CMake/Ninja) with /MT compiler option in Release mode. Here, I asked a similar question some time before. The answer to that question helped but causes the compiler to complain (report warning) about overriding /MD with /MT. Then I used this solution, but setting the CMAKE_CXX_FLAGS_RELEASE has no effect on the compiler command line arguments in Release mode. I mean the following code works well in Debug mode: set

How can I replicate a command line arguments in cmake with ninja?

落爺英雄遲暮 提交于 2019-12-24 07:19:25
问题 I'm having a android (clang based) compiler that i want to use to compile android projects using CMake. with command line arguments am able to compile the project and i want to replicate the same arguments in CMake with Ninja. Command Line Code that is working is as follows : c:\myproj\backup\bin\myandroidcompiler.exe -isysroot C:\Users\Public\Documents\Android\AndroidNDK-9c_x86\platforms\android-14\arch-arm -idirafter =\usr\include -idirafter C:\Users\Public\Documents\Android\AndroidNDK-9c

CMake (Ninja back-end) compile with /MT

北慕城南 提交于 2019-12-23 23:24:32
问题 I have a similar problem to this CMake compile with /MT instead of /MD but with some differences: I'm using Visual Studio 2017 to build a library using CMake and Ninja generator. Visual Studio gives me some choices (configurations) like x86-Debug, etc. There is also a CMakeSettings.json file that seems I can manipulate Visual Studio's default configurations through it. But I don't know how! I want to compile my library with /MT but I don't want to hard code it inside the CMakeLists.txt file

GTest's output has no colors when built with cmake+ninja and executed automatically

馋奶兔 提交于 2019-12-19 07:15:42
问题 I'm trying to configure CMake and ninja as a build system for my project. Except the app itself I have an extra executable for unit tests powered by gtest. I thought it would be nice to have them executed automatically whenever they are built. Here's how I made it: ├── build └── source ├── CMakeLists.txt ├── main.cc └── ut ├── CMakeLists.txt ├── gtest │ ├── ... └── ut.cc source/CMakeLists.txt... cmake_minimum_required (VERSION 2.6) project (trial) add_subdirectory(ut) add_executable(trial

Ninja not found by CMake

社会主义新天地 提交于 2019-12-19 03:37:05
问题 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 different build tool. CMake Error: Error required internal CMake variable not set, cmake may be not be built correctly. Missing variable is: CMAKE_C_COMPILER_ENV_VAR CMake Error: Error required internal CMake variable not set, cmake may be not be built

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

*爱你&永不变心* 提交于 2019-12-17 23:14:04
问题 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 these projects. The main CMakeLists.txt file should include all directories, so that the build all builds everything. But people would like also to be able to work only on one of these projects, and not having to build/install everything everytime.

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

前提是你 提交于 2019-12-17 18:43:10
问题 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 2.8) project(test_project) add_executable(main main.cpp) main.cpp is a simple hello world program. On the command line I run this: cmake -G Ninja .. and I get the following errors: -- The C compiler identification is Clang 3.5.0 clang.exe: error: no such file or