2016-12-01 00:23:28 +03:00
|
|
|
# cmake
|
|
|
|
|
2017-05-04 02:18:57 +03:00
|
|
|
> Cross-platform build system generator.
|
|
|
|
> It generates Makefiles, Visual Studio projects or others, depending on the target system.
|
2016-12-01 00:23:28 +03:00
|
|
|
|
2017-05-16 13:37:47 +03:00
|
|
|
- Generate a Makefile and use it to compile a project in the same folder as the source:
|
2016-12-01 00:23:28 +03:00
|
|
|
|
2017-05-04 02:18:57 +03:00
|
|
|
`cmake && make`
|
2016-12-01 00:23:28 +03:00
|
|
|
|
2017-05-16 13:51:20 +03:00
|
|
|
- Generate a Makefile and use it to compile a project in a separate "build" folder (out-of-source build):
|
2016-12-01 00:23:28 +03:00
|
|
|
|
2017-05-16 13:51:20 +03:00
|
|
|
`mkdir -p {{build}} && cd {{build}} && cmake ../ && make`
|
2016-12-01 00:23:28 +03:00
|
|
|
|
2017-05-04 02:18:57 +03:00
|
|
|
- Run cmake in interactive mode (it will ask for each variable, instead of using defaults):
|
2016-12-01 00:23:28 +03:00
|
|
|
|
|
|
|
`cmake -i`
|