对cmake的理解
对cmake的理解:
cmake官方文档:https://cmake.org/documentation/
我们这里只介绍一下对cmake命令行的理解:
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>]
作者在编译中主要用到了第一条命令cmake [<options>] <path-to-source>
在build tree目录下编译source tree,source tree里面必须有cmake要解析的CMakeLists.txt
作者:Alvin2012