mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-22 16:22:08 +02:00

As initially discussed in #1379. This removes the need to use `mkdir` and `cd`. Inspired by this post: https://www.reddit.com/r/programming/comments/6b9r19/how_to_build_a_cmakebased_project/dhlfh05/
16 lines
506 B
Markdown
16 lines
506 B
Markdown
# cmake
|
|
|
|
> Cross-platform build system generator.
|
|
> It generates Makefiles, Visual Studio projects or others, depending on the target system.
|
|
|
|
- Generate a Makefile and use it to compile a project in the same folder as the source:
|
|
|
|
`cmake && make`
|
|
|
|
- Generate a Makefile and use it to compile a project in a separate "build" folder (out-of-source build):
|
|
|
|
`cmake -H. -B{{build}} && make -C {{build}}`
|
|
|
|
- Run cmake in interactive mode (it will ask for each variable, instead of using defaults):
|
|
|
|
`cmake -i`
|