mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-09 07:15:46 +02:00
cmake: use -H -B trick for out-of-src build
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/
This commit is contained in:
parent
efe5302dc1
commit
b4dc9ec224
1 changed files with 1 additions and 1 deletions
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
- Generate a Makefile and use it to compile a project in a separate "build" folder (out-of-source build):
|
- Generate a Makefile and use it to compile a project in a separate "build" folder (out-of-source build):
|
||||||
|
|
||||||
`mkdir -p {{build}} && cd {{build}} && cmake ../ && make`
|
`cmake -H. -B{{build}} && make -C {{build}}`
|
||||||
|
|
||||||
- Run cmake in interactive mode (it will ask for each variable, instead of using defaults):
|
- Run cmake in interactive mode (it will ask for each variable, instead of using defaults):
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue