Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lanhuidong/cpp-project-template
C++项目模版
https://github.com/lanhuidong/cpp-project-template
cmake conan cpp20 gtest
Last synced: 4 days ago
JSON representation
C++项目模版
- Host: GitHub
- URL: https://github.com/lanhuidong/cpp-project-template
- Owner: lanhuidong
- License: apache-2.0
- Created: 2023-05-19T12:44:27.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-09T15:38:16.000Z (about 1 year ago)
- Last Synced: 2024-10-31T20:07:17.406Z (about 2 months ago)
- Topics: cmake, conan, cpp20, gtest
- Language: CMake
- Homepage:
- Size: 20.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cpp-project-template
C++项目模版### 项目构建
#### macOS
```shell
$ cmake -G Ninja -S . -B build -Dtest=ON -DCMAKE_CXX_COMPILER="/usr/local/opt/llvm/bin/clang++"
$ cmake --build build && ctest --test-dir build
```#### Windows Visual Studio 2017
```powershell
> cmake -G "Visual Studio 15 2017 Win64" -S . -B build
> cmake --config Release --build build
> cmake
```
#### Windows Visual Studio 2022
```powershell
> cmake -G "Visual Studio 17 2022" -S . -B build
> cmake --config Release --build build
> cmake
```### 代码格式
vsc可以安装clang-format插件,clang-format的配置请参考[官方文档](https://clang.llvm.org/docs/ClangFormatStyleOptions.html)