Understanding of cmake

Cmake understanding of:

  cmake official document: https: //cmake.org/documentation/

 

  We only introduce the understanding of the cmake command line:

Generate a Project Buildsystem
 cmake [<options>] <path-to-source>
 cmake [<options>] <path-to-existing-build>
 cmake [<options>] -S <path-to-source> -B <path-to-build>

Build a Project
 cmake --build <dir> [<options>] [-- <build-tool-options>]

Install a Project
 cmake --install <dir> [<options>]

Open a Project
 cmake --open <dir>

Run a Script
 cmake [{-D <var>=<value>}...] -P <cmake-script-file>

Run a Command-Line Tool
 cmake -E <command> [<options>]

Run the Find-Package Tool
 cmake --find-package [<options>]

View Help
 cmake --help[-<topic>]

  The authors compiled mainly used in the first command cmake [<options>] <path-to-source>

  In the build tree directory compiled source tree, source tree which must be resolved cmakeCMakeLists.txt

Guess you like

Origin www.cnblogs.com/live-program/p/10994745.html