这是一个 CMake 模板库
你可以在CMake官方网站找到下载链接、官方文档以及一份简单的官方教程
Cmake模板都是基于此目录进行的,具体每个项目的目录可能由于其需求不同而不同
.
├─.vscode # VSCode 配置文件
| ├─c_cpp_properties.json #
| ├─launch.json #
| └─setting.json #
├─app # 测试文件目录
├─bin # 二进制输出(编译后产生)
├─build # cmake 构建和 make 编译输出文件目录
├─include # 头文件
| ├─<file>.hpp
| └─...
├─src # 源文件
├─tools # 编译工具链(也可以将工具链添加到系统环境变量中)
├─.clang-format # clang-format 文件(代码自动格式化工具)
├─build.bat # bat 编译脚本
├─build.sh # shell 编译脚本
├─CMakeLists.txt # 根目录的CMake配置文件
└─README.md
- 编译可执行文件 (compile executable file)
- 编译库文件 (compile library)
- 安装库文件 (install library)
- 第三方库的使用 (link 3rd-party))
download gflags in GitHub, see "Installing a binary distribution package"
添加环境变量 CMAKE_GENERATOR
到系统中,值为 MinGW Makefiles
In LLVM official website, choose corresponding Clang-Format Release for your OS in Other builds.
Then, you can download LLVM in this page or in Github Release
when installing LLVM,
in page Install Options
, select if add LLVM to the system
- Do not add LLVM to the system PATH
- Add LLVM to the system PATH for all user
- Add LLVM to the system PATH for current user
use clang-format
with parameter -style
and -i
-style
LLVM、Google、Chromium、Mozilla、WebKit or file(.clang-format)-i
clang-format -style=LLVM -i test.c
or you can edit your custom format file .clang-format
,
clang-format -i test.c
see Clang documentation for more detail of using Clang-Format
in file .git/config
[remote "origin"]
url = https://gitee.com/<user_name>/<repo_name>.git
url = https://github.com/<user_name>/<repo_name>.git
fetch = +refs/heads/*:refs/remotes/origin/*
A command-line utility for retrieving files using HTTP, HTTPS and FTP protocols.
Download:
- Windows binaries of GNU Wget (Downloading ZIP and add to system PATH is recommended.)