跳转到主要内容

在此处添加简短描述

项目描述

欢迎使用我的C++项目

License: MIT GitHub Workflow Status PyPI Release Documentation Status codecov Quality Gate Status

先决条件

构建我的C++项目需要安装以下软件

  • 符合C++11规范的编译器
  • CMake >= 3.9
  • Doxygen(可选,如果缺失则跳过文档构建)
  • 用于构建测试套件的测试框架 Catch2,以及构建Python绑定的Python >= 3.8

构建我的C++项目

以下命令序列构建我的C++项目。它假定您当前的工作目录是刚刚克隆的仓库的顶级目录

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
cmake --build .

可以通过以下CMake变量自定义构建过程,这些变量可以通过将-D<var>={ON, OFF}添加到cmake调用中来设置

  • BUILD_TESTING:启用测试套件的构建(默认:ON
  • BUILD_DOCS:启用文档的构建(默认:ON
  • BUILD_PYTHON:启用Python绑定的构建(默认:ON

如果您希望在没有访问C++构建工件(如库和可执行文件)的情况下将项目构建和安装为Python项目,则可以从根目录使用pip完成此操作

python -m pip install .

测试我的C++项目

根据上述说明构建(带有-DBUILD_TESTING=ON),可以使用构建目录中的ctest运行My C++ Project的C++测试套件

cd build
ctest

可以通过首先从顶级目录运行pip-install安装Python包,然后从顶级目录运行pytest来运行Python测试套件

python -m pip install .
pytest

文档

我的C++项目提供基于Sphinx的文档,可以在readthedocs.org在线浏览。要本地构建它,首先确保已通过从顶级源目录运行此命令安装了所有需求

pip install -r doc/requirements.txt

然后从顶级构建目录构建sphinx文档

cmake --build . --target sphinx-doc

然后可以通过在浏览器中打开doc/sphinx/index.html来浏览Web文档。

项目详情


下载文件

下载适用于您平台文件的文件。如果您不确定选择哪个,请了解更多关于 安装包 的信息。

源分发

此发行版没有可用的源分发文件。请参阅有关 生成分发存档 的教程。

构建分发

testghacookiecutter-0.0.100-cp311-cp311-win_amd64.whl (55.1 kB 查看哈希值)

上传时间 CPython 3.11 Windows x86-64

testghacookiecutter-0.0.100-cp311-cp311-win32.whl (50.0 kB 查看哈希值)

上传时间 CPython 3.11 Windows x86

testghacookiecutter-0.0.100-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (74.1 kB 查看哈希值)

上传时间 CPython 3.11 manylinux: glibc 2.17+ x86-64

testghacookiecutter-0.0.100-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl (79.7 kB 查看哈希值)

上传时间 CPython 3.11 manylinux: glibc 2.17+ i686

testghacookiecutter-0.0.100-cp311-cp311-macosx_10_9_x86_64.whl (47.9 kB 查看哈希值)

上传时间 CPython 3.11 macOS 10.9+ x86-64

testghacookiecutter-0.0.100-cp310-cp310-win_amd64.whl (55.3 kB 查看哈希值)

上传时间 CPython 3.10 Windows x86-64

testghacookiecutter-0.0.100-cp310-cp310-win32.whl (49.9 kB 查看哈希值)

上传时间 CPython 3.10 Windows x86

testghacookiecutter-0.0.100-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (74.1 kB 查看哈希值)

上传于 CPython 3.10 manylinux: glibc 2.17+ x86-64

testghacookiecutter-0.0.100-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl (79.8 kB 查看哈希)

上传于 CPython 3.10 manylinux: glibc 2.17+ i686

testghacookiecutter-0.0.100-cp310-cp310-macosx_10_9_x86_64.whl (47.9 kB 查看哈希)

上传于 CPython 3.10 macOS 10.9+ x86-64

testghacookiecutter-0.0.100-cp39-cp39-win_amd64.whl (55.3 kB 查看哈希)

上传于 CPython 3.9 Windows x86-64

testghacookiecutter-0.0.100-cp39-cp39-win32.whl (50.1 kB 查看哈希)

上传于 CPython 3.9 Windows x86

testghacookiecutter-0.0.100-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (74.3 kB 查看哈希)

上传于 CPython 3.9 manylinux: glibc 2.17+ x86-64

testghacookiecutter-0.0.100-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl (79.9 kB 查看哈希)

上传于 CPython 3.9 manylinux: glibc 2.17+ i686

testghacookiecutter-0.0.100-cp39-cp39-macosx_10_9_x86_64.whl (48.0 kB 查看哈希)

上传于 CPython 3.9 macOS 10.9+ x86-64

testghacookiecutter-0.0.100-cp38-cp38-win_amd64.whl (55.1 kB 查看哈希)

上传于 CPython 3.8 Windows x86-64

testghacookiecutter-0.0.100-cp38-cp38-win32.whl (49.9 kB 查看哈希)

上传于 CPython 3.8 Windows x86

testghacookiecutter-0.0.100-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (74.1 kB 查看哈希)

上传于 CPython 3.8 manylinux: glibc 2.17+ x86-64

testghacookiecutter-0.0.100-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl (79.6 kB 查看哈希值)

上传于 CPython 3.8 manylinux: glibc 2.17+ i686

testghacookiecutter-0.0.100-cp38-cp38-macosx_10_9_x86_64.whl (47.9 kB 查看哈希值)

上传于 CPython 3.8 macOS 10.9+ x86-64

支持者

AWS AWS 云计算和安全赞助商 Datadog Datadog 监控 Fastly Fastly CDN Google Google 下载分析 Microsoft Microsoft PSF 赞助商 Pingdom Pingdom 监控 Sentry Sentry 错误记录 StatusPage StatusPage 状态页面