CMU15-445
本文最后更新于:20 天前
CMU15-445环境搭建及实操
前提
提前安装好WSL2,这里我使用的系统是Ubuntu 22.04 LTS版
CMU15-445必需的环境:
- git
- clang
- gdb
- cmake
1 |
|
配置CMU15-445
-
创建一个Github私有库
-
克隆公开的BusTub仓库
1
$ git clone --bare https://github.com/cmu-db/bustub.git bustub-public
-
将公共的BusTub存储库push到自己的私有BusTub存储库
1
2
3cd bustub-public
git push 你的私有库的git仓库地址 master
rm -rf bustub-public -
将私有存储库克隆到使用的开发计算机中
1
git clone 你的私有库的git仓库地址
-
从私有存储库的项目设置中禁用 GitHub Actions,否则您可能会用完 GitHub Actions 配额
1
Settings > Actions > General > Actions permissions > Disable actions.
编译CMU15-445
-
为了确保您的计算机上有正确的软件包,请运行以下脚本来自动安装它们
1
sudo build_support/packages.sh
-
然后运行以下命令来构建系统
1
2
3
4mkdir build
cd build
cmake ..
make -
如果要在调试模式下编译系统,请将以下标志传递给 cmake,默认情况下,这会启用AddressSanitizer。
1
2cmake -DCMAKE_BUILD_TYPE=Debug ..
make -j`nproc` -
测试
1
2cd build
make check-tests