Compilation syntax of build.ninja file

eighteen Unauthorized reproduction is prohibited Understanding the course
Course Introduction
discuss {{interaction.discussNum ? '(' + interaction.discussNum + ')' : ''}}
Suitable for people
Zero foundation, novice, children's shoes who want to quickly learn how to build C and C++projects with ninja under Linux!
You will learn
Master the use of Ninja construction tools and scripting, and be proficient in using Ninja to build C and C++projects
  • Master Ninja's grammar and rule writing
  • Master the explicit dependency, implicit dependency, dynamic dependency and pool of ninja
  • Master the use of various common options of Ninja
Course Introduction

Ninja is an efficient large-scale project construction system developed by Google, which is specially used to accelerate the software construction process. It has simple design and excellent performance, and is widely used to build many well-known open source projects, such as Chromium, LLVM, etc.


Advantages and characteristics of Ninja:

Easy to use: Ninja's configuration file is very concise, simple in syntax, easy to understand and maintain. Compared with other construction tools such as Make or CMake, Ninja has a clearer syntax and a smoother learning curve.


High efficiency: Ninja is famous for its speed. It adopts efficient algorithms and parallel construction mechanism, which can significantly improve the construction speed in large projects. Ninja doesn't waste time rebuilding unnecessary files like some other build tools.


Lightweight: Ninja is a lightweight construction system that does not rely on other complex tool chains. It itself is a separate executable file and does not require additional libraries or dependencies.


Cross platform support: Ninja can run on various operating systems, including Linux, Windows and macOS. This makes it a portable and flexible construction tool that can meet the needs of different platforms.


Extensibility: Although Ninja itself is relatively simple, it has good scalability. Programmers can extend the functions of Ninja to meet the needs of specific projects by writing customized construction rules or plug-ins.


Suitable for large projects: Ninja's efficient performance and parallel construction features make it particularly suitable for large projects. It can process thousands of source files, and make full use of hardware resources on multi-core systems to speed up the construction process.



For students with zero programming foundation, Mr. Huang Qiang carefully polished ninja core knowledge points to help you quickly master the tool construction of ninja in Linux programming!

Applicable crowd: children's shoes with zero foundation, novice, who want to quickly learn how to build C and C++projects with ninja under Linux!


 Linux-ninja_.png

common problem
Q: Can I study this course if I have zero foundation?
Answer: Children's shoes, this course is specially designed for children's shoes with zero foundation. Learn Ninja from the simple to the deep, and master project construction and compilation!
Q: What is the Ninja version of the course?
Answer: The Linux Ubuntu used in this course is 18.04 as a demonstration system! The latest version of Ninja is Ninja 1.10
Q: I want to engage in Linux C/C++development. Is this course suitable for me?
Answer: Children's shoes are very suitable. This course is one of the series of special courses in the development direction of Linux C/C++!
Q: I haven't learned any programming language, can I learn this course?
Answer: Children's shoes, this course is an advanced course, which needs some foundation! We suggest you go to the teacher's homepage to learn C language or C++programming first, and then learn this course!
Expand more
release
 head portrait

{{ item.user.nick_name }} {{ EROLE_NAME[item.user.identity] }}

Topping note
 Discussion Chart
{{ item.create_time }} reply
  • delete

    Are you sure to delete?

    confirm
    cancel
  • {{item. is_top==1? 'Cancel topping': 'topping'}}

    The discussion that has been set to the top, do you want to replace the existing one?

    confirm
    cancel
{{ tag.text}}
 head portrait
{{ subitem.user.nick_name }} {{ EROLE_NAME[subitem.user.identity] }}
{{ subitem.create_time }} reply
delete

Are you sure to delete?

confirm
cancel
release
{{pageType==='video '?' The discussion area grabs the sofa, and you can get double credits': 'The discussion area is empty, please say two sentences~'}}
release
{{tips.text}}
{{ noteHeaderTitle }} note {{hasMyNote? 'My notes':' Take notes'}}
{{hasMyNote? 'My notes':' Take notes'}}
Quality Notes
Updated on: {{$dayjs. format ('YYYY-MM-DD HH: mm: ss', item.last_uptime*1000) }}
 head portrait
{{ detail.username }}

Public notes are visible to others and have the opportunity to be rated as "high-quality notes" by the administrator

{{ noteEditor.content.length }}/2000

Public Notes
preservation
put questions to

The lecturer will answer your questions as soon as possible. If you choose to ask questions in public, you can get more help from students.

Record time point
Record the time when the video is played when asking questions, so as to facilitate subsequent viewing
Open questions
Submit