To build and work with this C++ project, ensure you have the following software installed. While CMake is essential for project compilation, other tools are optional but highly recommended for static analysis, source code formatting, and documentation.
- Cppcheck
- Clang-Tidy (LLVM Extra Clang Tools)
- ClangFormat (LLVM Clang Tools)
Follow these steps to build the project:
- Navigate to the project root directory:
cd [project root]
- Create a build directory:
mkdir build
- Change into the build directory:
cd build
- Configure CMake and generate build files:
cmake ..
- Compile the project libraries and executable:
make
After completing the above steps, you'll find the executable at [project root]/build/simulation/main
.
Tips:
- Combine steps 4 and 5 using the
&&
operator:cmake .. && make
. - Speed up compilation with
make -j4
.
The tests cases are built alongside the project by default.
From the build
directory, run ./simulation/tests/test -s
.
The project's documentation website is hosted on GitHub Pages. The website updates automatically when commits are pushed onto the master
branch via GitHub Actions. To generate a local preview of the documentation:
- Navigate to the project's documentation directory:
cd docs
- Run
doxygen Doxyfile.in
to create a_build
subdirectory. - Open the generated HTML documentation:
[project root]/docs/_build/html/index.html
using your preferred browser.
The source code is a C++ translation of NUS CS2030S Lab 1 (AY21/22 Semester 2), originally written in Java by Assoc Prof Ooi Wei Tsang.