1 # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 # file Copyright.txt or https://cmake.org/licensing for details.
4 # Produce an image containing a portable CMake binary package for Linux/x86_64.
5 # Build using the CMake source directory as the build context.
6 # The resulting image will have an '/out' directory containing the package.
8 # Keep this in sync with the `.gitlab/os-linux.yml` `.linux_release_x86_64` image.
9 ARG FROM_IMAGE_NAME=kitware/cmake:build-linux-x86_64-deps-2020-04-02
10 ARG FROM_IMAGE_DIGEST=@sha256:77e9ab183f34680990db9da5945473e288f0d6556bce79ecc1589670d656e157
11 ARG FROM_IMAGE=$FROM_IMAGE_NAME$FROM_IMAGE_DIGEST
14 COPY . /opt/cmake/src/cmake
19 && mkdir -p /opt/cmake/src/cmake-build \
20 && cd /opt/cmake/src/cmake-build \
21 && cp ../cmake/Utilities/Release/linux/x86_64/cache.txt CMakeCache.txt \
22 && source /opt/rh/devtoolset-6/enable \
23 && source /opt/rh/rh-python36/enable \
25 && ../cmake/bootstrap --parallel=$(nproc) --docdir=doc/cmake \
26 && nice make -j $(nproc) \
28 # Run tests that require the full build tree.
29 bin/ctest --output-on-failure -j 8 -R '^(CMake\.|CMakeLib\.|RunCMake\.ctest_memcheck)'; \
32 && bin/cpack -G STGZ \
35 && mv cmake-*-linux-x86_64.* /out \