2016-11-30 16:23:28 -05:00
|
|
|
# cmake
|
|
|
|
|
2021-01-18 16:07:14 +05:00
|
|
|
> Cross-platform build, testing and packaging automation system.
|
2021-01-18 16:32:31 +05:00
|
|
|
> CMake uses own shell-like syntax and generates recipes for several build systems.
|
2020-11-16 19:53:30 +01:00
|
|
|
> More information: <https://cmake.org/cmake/help/latest/manual/cmake.1.html>.
|
2016-11-30 16:23:28 -05:00
|
|
|
|
2021-01-18 16:07:14 +05:00
|
|
|
- Generate a build recipe in the current directory with CMakeLists.txt from a project directory:
|
2016-11-30 16:23:28 -05:00
|
|
|
|
2021-01-18 16:07:14 +05:00
|
|
|
`cmake {{path/to/project_dir/}}`
|
2016-11-30 16:23:28 -05:00
|
|
|
|
2021-01-18 16:07:14 +05:00
|
|
|
- Build with the generated recipe in build_dir (artifacts go to build_dir):
|
2016-11-30 16:23:28 -05:00
|
|
|
|
2021-01-18 16:07:14 +05:00
|
|
|
`cmake --build {{path/to/build_dir/}}`
|
|
|
|
|
|
|
|
- Install the project:
|
|
|
|
|
|
|
|
`cmake --install {{path/to/build_dir/}}`
|
|
|
|
|
|
|
|
- Run a custom build target:
|
|
|
|
|
|
|
|
`cmake --build {{path/to/build_dir/}} --target {{target_name}}`
|