CLion Docker Environment
The engine can be built and debugged in the CLion IDE through a Docker toolchain, without installing the compilers and libraries on the host. The image is defined in Docker/development/Dockerfile and is based on intel/oneapi-hpckit (Intel icx, icpx and ifx). The same instructions are in Docker/development/README.md.
Prerequisites
Building the image
From the repository root:
docker build --build-arg UID=$(id -u) -t ads-idac-engine-debugger Docker/development/UID is the user id the container runs with (default 1000). Passing your own id keeps the files that the container writes into the mounted project owned by you.
CLion configuration
Toolchain
- Open
Settings | Build, Execution, Deployment | Toolchains. - Click
Add toolchainand selectDocker. - Select the image
ads-idac-engine-debuggerand wait until the tool detection finishes. - Set the C compiler to
icx, the C++ compiler toicpx, the Fortran compiler toifxand the debugger togdb-oneapi.
CMake
Select the Docker toolchain in the CMake profile (Settings | Build, Execution, Deployment | CMake), or move it to the top of the toolchain list to make it the default. CLion mounts the project directory into a container, runs the build, the program or the debugger in it, and stops the container afterwards.
On Windows, Docker with the WSL 2 backend gives better performance.