| 一级目录 | 二级目录 | 三级目录 | 说明 |
|---|---|---|---|
| standard | iso | ISO C的一些测试文件,其中大部分需要通过GDB调试进行查看 |
|
| standard | posix | POSIX标准的测试文件 | |
| library | mbedTLS | base64 | mbedTLS / base64.h的使用案例 |
| library | mbedTLS | AES | mbedTLS / aes.h的使用案例 |
| library | mbedTLS | MD5 | mbedTLS / md5.h的使用案例 |
| library | mbedTLS | RIPEMD-160 | mbedTLS / ripemd160.h的使用案例 |
| library | mbedTLS | SHA1 | mbedTLS / sha1.h的使用案例 |
| library | mbedTLS | SHA256 | mbedTLS / sha256.h的使用案例 |
| library | mbedTLS | SHA512 | mbedTLS / sha512.h的使用案例 |
| library | mbedTLS | HMAC | mbedTLS / md.h的使用案例 |
| library | mbedTLS | PBKDF2 | mbedTLS / pkcs5.h的使用案例 |
| library | openssl | SHA256 | openssl / sha.h的使用案例 |
| library | libcurl | libcurl的使用案例 | |
| library | cJSON | cJSON的使用案例 | |
| library | libyaml | libyaml的使用案例 | |
| library | libgit2 | libgit2的使用案例 | |
| library | libarchive | libarchive的使用案例 | |
| library | qrencode | qrencode的使用案例 | |
| algorithm | base16 | Base16算法的实现 | |
| algorithm | url | URL编解码算法的实现 | |
| algorithm | bcc | BCC校验算法的实现 | |
| algorithm | lrc | LRC校验算法的实现 | |
| algorithm | chinese-calendar | 中国阳历日期转换为阴历日期、节气、节日算法的实现 |
step1. 安装vcpkg
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
export VCPKG_ROOT="$PWD/vcpkg"
export PATH="$VCPKG_ROOT:$PATH"step2. 通过vcpkg安装依赖库
vcpkg install curl libyaml libgit2 libarchive libqrencode cunitstep3. 配置
cmake \
-S . \
-B build.d \
-DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_BUILD_TYPE=Debug \
-DENABLE_TESTING=ONstep4. 编译
cmake --build build.dstep5. 运行单元测试
ctest --test-dir build.d/algorithm/base16step6. 运行valgrind测试
valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes --verbose --error-exitcode=1 build.d/algorithm/base16step1. 安装vcpkg
git clone https://github.com/microsoft/vcpkg.git
cd vcpkg
./bootstrap-vcpkg.sh
export VCPKG_ROOT="$PWD/vcpkg"
export PATH="$VCPKG_ROOT:$PATH"step2. 通过vcpkg安装依赖库
vcpkg install curl libyaml libgit2 libarchive libqrencode cunitstep3. 配置
cmake \
-S . \
-B build.d \
-DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake \
-DCMAKE_INSTALL_PREFIX=./output \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_BUILD_TYPE=Release \
-DENABLE_TESTING=OFFstep4. 编译
cmake --build build.dstep5. 安装
cmake --install build.d