CPP Getting Started - Hyp-ed/hyped-2024 GitHub Wiki

Installing everything you need

The following utilities are required to build and test the HYPED code:

  1. LLVM & Clang
  2. CMake
  3. GNU Make

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.

Linux & WSL

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.

Mac

You can use homebrew to install LLVM, CMake and GNU Make with the following command:

$ brew install llvm cmake make

Windows 10

  1. Read the description of WSL from Microsoft Store
  2. Enable WSL on your machine as described on the store page.
  3. Install the app.
  4. Reboot.
  5. Run WSL and set (and remember) a password.
  6. Follow the Linux guide.

Building HYPED

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.

⚠️ **GitHub.com Fallback** ⚠️