Skip to content

arBmind/cmake-containers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

Docker images for CMake

This project generate a set of Docker images around the CMake build system used for CI runs and development setups.

Image (latest versions) Size
Docker Image Version (latest semver) Docker Image Size (latest semver)
Docker Image Version (latest semver) Docker Image Size (latest semver)
Docker Image Version (latest semver) Docker Image Size (latest semver)
Docker Image Version (latest semver) Docker Image Size (latest semver)
Docker Image Version (latest semver) Docker Image Size (latest semver)
Docker Image Version (latest semver) Docker Image Size (latest semver)
Docker Image Version (latest semver) Docker Image Size (latest semver)

Versions

The compiler and Qt versions, modules and packages are provided as build-args.

See links to Dockerhub for older versions listed in tags. See .github/workflows/docker_build.yml for the current bulid matrix.

Basic Usage

The default entry point is the bash shell. For your CI you should write a simple bash script that runs the build, as cmake requires multiple invocations.

docker run -it \
    --mount src="$(pwd)",target=/project,type=bind
    -w /project \
    arbmind/cmake-clang-libstdcpp:latest \
    script/cmake_build.sh

This mounts your current directory to /project and a build volume in the container. Changes the workdir to /project.

In the image bash you can do the canonical cmake stuff.

mkdir build
cd build
cmake ..
cmake --build

If you want to see how this works, take a look at these repositories:

Development Setup

The development setup was tested with CLion bud can be used with any custom setup.

For CLion simply add the docker image as a Docker toolchain.

Note: CLion and other IDEs may not always fully support the latest CMake versions.

Details

The Dockerfile is multi staged and has different targets for all the variants. All targets with underscores are meant to be internally only.

Note: clang libc++ Qt combination is missing because the Qt Company does not publish Linux binaries built for libc++

About

Docker containers for building CMake projects with Qt and Clang or GCC

Topics

Resources

Stars

Watchers

Forks