基础样例
# 基础样例
此目录中的基本示例展示了如何设置 CMake 项目、设置编译标志、创建和链接可执行文件和库以及安装它们。
包括的例子是:
hello-cmake. A hello world example.
hello-headers. A slightly more complicated hello world example, using separate source and include folders.
static-library. An example using a static library.
shared-library. An example using a shared library.
installing. Shows how to create a 'make install' target that will install binaries and libraries.
build-type. An example showing how to set a default build and optimization flags for your project.
compile-flags. Shows how to set additional compile flags.
third-party-library. Shows an example of how to link third party libraries.
compiling-with-clang. An example of invoking the clang compiler.
building-with-ninja - Shows how to generate ninja build files
imported-targets - Shows how to link boost using the new imported targets
cpp-standard - Shows various methods to set the C++ standard