mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-04 20:35:34 +02:00
cmake: fix syntax and adjust per code review
This commit is contained in:
parent
d3fed3b31f
commit
776fdcf77a
1 changed files with 7 additions and 17 deletions
|
@ -1,26 +1,16 @@
|
||||||
# cmake
|
# cmake
|
||||||
|
|
||||||
> CMake is a cross-platform build system generator.
|
> Cross-platform build system generator.
|
||||||
|
> It generates Makefiles, Visual Studio projects or others, depending on the target system.
|
||||||
|
|
||||||
Make a project in the same directory as the source:
|
- Generate a Makefile and use it to compile a project in the same directory as the source:
|
||||||
|
|
||||||
```
|
`cmake && make`
|
||||||
cmake
|
|
||||||
make
|
|
||||||
```
|
|
||||||
|
|
||||||
Make a project in a subdirectory, required for some projects:
|
- Generate a Makefule and use it to compile a project in a separate directory (out-of-source build):
|
||||||
|
|
||||||
```
|
`cd {{build_dir}} && cmake ../ && make`
|
||||||
mkdir build
|
|
||||||
cd build
|
|
||||||
cmake ../
|
|
||||||
make
|
|
||||||
```
|
|
||||||
|
|
||||||
To run cmake in interactive mode (It will ask you for each variable,
|
- Run cmake in interactive mode (it will ask for each variable, instead of using defaults):
|
||||||
instead of relying on defaults):
|
|
||||||
|
|
||||||
`cmake -i`
|
`cmake -i`
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue