README.rst 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. CMake Release Utilities
  2. ***********************
  3. This directory contains scripts used to package CMake itself for distribution
  4. on ``cmake.org``. See also the `CMake Source Code Guide`_.
  5. .. _`CMake Source Code Guide`: ../../Help/dev/source.rst
  6. File Table
  7. ----------
  8. The set of package files distributed on ``cmake.org`` varies by CMake version.
  9. Clients providing automatic download functionality may query the set of
  10. package files available using a special file that lists them:
  11. * `File Table v1`_ Documentation
  12. .. _`File Table v1`: files-v1.rst
  13. Docker
  14. ------
  15. The ``<os>/<arch>/`` directories contain Docker specifications that anyone
  16. may use to produce binaries for CMake on the following platforms:
  17. * ``linux/x86_64/``: Linux on ``x86_64`` architectures.
  18. * ``linux/aarch64/``: Linux on ``aarch64`` architectures.
  19. Each ``<os>/<arch>/`` directory contains the following:
  20. * ``<os>/<arch>/base/Dockerfile``:
  21. Produces a base image with a build environment for portable CMake binaries.
  22. This image is published in the `kitware/cmake Docker Hub Repository`_
  23. with tag ``build-<os>-<arch>-base-<date>``.
  24. * ``<os>/<arch>/deps/Dockerfile``:
  25. Produces an image with custom-built dependencies for portable CMake binaries.
  26. This image is published in the `kitware/cmake Docker Hub Repository`_
  27. with tag ``build-<os>-<arch>-deps-<date>``.
  28. * ``<os>/<arch>/Dockerfile``:
  29. Produce an image containing a portable CMake binary package.
  30. Build this image using the CMake source directory as the build context.
  31. The resulting image will have an ``/out`` directory
  32. containing the package. For example, on Linux ``x86_64``:
  33. .. code-block:: console
  34. $ docker build --tag=cmake:build --network none \
  35. -f cmake-src/Utilities/Release/linux/x86_64/Dockerfile cmake-src
  36. $ docker container create --name cmake-build cmake:build
  37. $ docker cp cmake-build:/out .
  38. $ ls out/cmake-*-linux-x86_64.*
  39. * ``<os>/<arch>/test/Dockerfile``:
  40. Produces a base image with a test environment for packaged CMake binaries.
  41. For example, on Linux ``x86_64``, one may build the test base image:
  42. .. code-block:: console
  43. $ docker build --tag=cmake:test-base \
  44. cmake-src/Utilities/Release/linux/x86_64/test
  45. Then create a local ``test/Dockerfile`` to prepare an image with both the
  46. CMake source tree and the above-built package::
  47. FROM cmake:test-base
  48. COPY cmake-src /opt/cmake/src/cmake
  49. ADD out/cmake-<ver>-linux-x86_64.tar.gz /opt/
  50. ENV PATH=/opt/cmake-<ver>-linux-x86_64/bin:$PATH
  51. Build the test image and run it to drive testing:
  52. .. code-block:: console
  53. $ docker build --tag cmake:test --network none -f test/Dockerfile .
  54. $ docker run --network none cmake:test bash test-make.bash
  55. $ docker run --network none cmake:test bash test-ninja.bash
  56. .. _`kitware/cmake Docker Hub Repository`: https://hub.docker.com/r/kitware/cmake
  57. macOS
  58. -----
  59. The ``macos/`` directory contains scripts used to produce dependencies
  60. for building CMake binaries on macOS.
  61. Windows
  62. -------
  63. The ``win/`` directory contains scripts used to produce dependencies
  64. for building CMake binaries on Windows.