tldr/pages/common/cmake.md

14 lines
487 B
Markdown
Raw Normal View History

2016-11-30 21:23:28 +00:00
# cmake
> Cross-platform build system generator.
> It generates Makefiles, Visual Studio projects or others, depending on the target system.
2020-11-16 18:53:30 +00:00
> More information: <https://cmake.org/cmake/help/latest/manual/cmake.1.html>.
2016-11-30 21:23:28 +00:00
- Generate a Makefile and use it to compile a project in the same directory as the source:
2016-11-30 21:23:28 +00:00
`cmake && make`
2016-11-30 21:23:28 +00:00
- Generate a Makefile and use it to compile a project in a separate "build" directory (out-of-source build):
2016-11-30 21:23:28 +00:00
2020-11-16 18:53:30 +00:00
`cmake -H. -B {{build}} && make -C {{build}}`