MPS-Basic
|
There are two choices to make.
Contrary to Windows, Compiler and Libraries are combined in one choice.
First install CMake, Clang and Ninja.
For Ubuntu 22.04 and later, please run the following command:
(If you're using VSCode,) add the following to .vscode/settings.json
. Create one if you don't have. This will make CMake to use Ninja as a generator (meaning VSCode will add -G "Ninja"
to the command)
Now you can build and execute following Execution page. Make sure you choose Clang
as a compiler in the CMake tab in Visual Studio Code.
To enable multi-threading, OpenMP version 5 is required. OpenMP official site provides a list of compilers that support OpenMP 5.
Clang is easy to install, and recommended in this MPS-Basic project. To enable OpenMP, OpenMP runtime (libomp-dev
in debian/Ubuntu) is required.
GCC is a traditional compiler that is widely installed. However, OpenMP support is not as good as Clang. Since this project uses new features of OpenMP 5.0, we recommend Clang.
OneAPI (formerly known as Intel compiler) is a suite of tools for Intel CPUs. OpenMP 5.0 is supported from version 2021.1.
AOCC (AMD Optimizing C/C++ Compiler) is a compiler for AMD CPUs. OpenMP 5.0 is supported from version 4.2.
There are mainly three build systems that Windows users can choose.
Ninja is easy to install and easy to use. We recommend beginners to use this build system since it's simple and fast.
Make is a traditional build system that is widely installed. It's also easy to use, but -jX
(X
: the number of concurrent jobs) option is required to build in parallel.