CPP Getting Started - Hyp-ed/hyped-2024 GitHub Wiki
The following utilities are required to build and test the HYPED code:
We recommend that you use Visual Studio Code for editting but other IDEs and editors should be fine as well as everything can be done through the command line.
The installation on Linux depends on your distribution. For Debian based distros like Ubuntu as well as the WSL, the following commands should do the trick:
$ sudo apt update
$ sudo apt upgrade
$ sudo apt install llvm clang clang-format cmake build-essential
Similar commands exist for other package managers, e.g. sudo pacman -Syu llvm cmake base-devel
on Arch based distributions.
You can use homebrew to install LLVM, CMake and GNU Make with the following command:
$ brew install llvm cmake make
- Read the description of WSL from Microsoft Store
- Enable WSL on your machine as described on the store page.
- Install the app.
- Reboot.
- Run WSL and set (and remember) a password.
- Follow the Linux guide.
Firstly, you will need to clone the repository.
If you have your SSH keys set up, this can be done as follows:
$ git clone [email protected]:Hyp-ed/hyped-2022.git
Now you can create the build directory and cd
into it:
$ mkdir hyped-2022/build
$ cd hyped-2022/build
Before you can build the binaries, you need to configure CMake. This should only be required once if you don't make any changes to the build system.
$ cmake ..
Now you can run make
for any target you want. Note that using the -j
flag to specify the number of CPU cores to use significantly speeds up the compiling process.
You should run
$ make -j4 test
to download all the libraries and verify that everything works. This will create a binary called testrunner
and run it. It may take a while to compile the HYPED code and obtain all the required libraries, though.
Once you are done with this, you can set up VSCode and start editing. Stay HYPED!
If you want to learn more about the build system and how it works, you should go to Build system.