diff options
36 files changed, 208 insertions, 499 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2d72170..78b2fbe 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -52,6 +52,8 @@ p:source-package: - .linux_builder_tags - .cmake_release_artifacts - .run_only_for_package + variables: + CMAKE_CI_ARTIFACTS_NAME: "artifacts-source" p:doc-package: extends: @@ -138,6 +140,8 @@ b:centos6-x86_64: - .cmake_release_artifacts - .linux_builder_tags - .run_manually + variables: + CMAKE_CI_ARTIFACTS_NAME: "artifacts-centos6-x86_64" b:centos7-aarch64: extends: @@ -147,6 +151,7 @@ b:centos7-aarch64: - .linux_builder_tags_aarch64 - .run_manually variables: + CMAKE_CI_ARTIFACTS_NAME: "artifacts-centos7-aarch64" CMAKE_CI_NO_MR: "true" t:debian10-ninja: @@ -600,6 +605,8 @@ b:linux-x86_64-package: - p:doc-package needs: - p:doc-package + variables: + CMAKE_CI_ARTIFACTS_NAME: "artifacts-linux-x86_64" u:linux-x86_64-package: extends: @@ -622,6 +629,8 @@ b:linux-aarch64-package: - p:doc-package needs: - p:doc-package + variables: + CMAKE_CI_ARTIFACTS_NAME: "artifacts-linux-aarch64" u:linux-aarch64-package: extends: @@ -761,6 +770,8 @@ b:macos-package: - p:doc-package needs: - p:doc-package + variables: + CMAKE_CI_ARTIFACTS_NAME: "artifacts-macos-universal" u:macos-package: extends: @@ -782,6 +793,8 @@ b:macos10.10-package: - p:doc-package needs: - p:doc-package + variables: + CMAKE_CI_ARTIFACTS_NAME: "artifacts-macos10.10-universal" u:macos10.10-package: extends: @@ -997,6 +1010,8 @@ b:windows-x86_64-package: - p:doc-package needs: - p:doc-package + variables: + CMAKE_CI_ARTIFACTS_NAME: "artifacts-windows-x86_64-build" k:windows-x86_64-package: extends: @@ -1009,6 +1024,8 @@ k:windows-x86_64-package: - b:windows-x86_64-package needs: - b:windows-x86_64-package + variables: + CMAKE_CI_ARTIFACTS_NAME: "artifacts-windows-x86_64" u:windows-x86_64-package: extends: @@ -1030,6 +1047,8 @@ b:windows-i386-package: - p:doc-package needs: - p:doc-package + variables: + CMAKE_CI_ARTIFACTS_NAME: "artifacts-windows-i386-build" k:windows-i386-package: extends: @@ -1042,6 +1061,8 @@ k:windows-i386-package: - b:windows-i386-package needs: - b:windows-i386-package + variables: + CMAKE_CI_ARTIFACTS_NAME: "artifacts-windows-i386" u:windows-i386-package: extends: diff --git a/.gitlab/artifacts.yml b/.gitlab/artifacts.yml index 57ae573..e0c8252 100644 --- a/.gitlab/artifacts.yml +++ b/.gitlab/artifacts.yml @@ -66,6 +66,7 @@ .cmake_build_package_artifacts: artifacts: expire_in: 1d + name: "$CMAKE_CI_ARTIFACTS_NAME" paths: # Allow CPack to find CMAKE_ROOT. - build/CMakeFiles/CMakeSourceDir.txt @@ -94,6 +95,7 @@ .cmake_release_artifacts: artifacts: expire_in: 5d + name: "$CMAKE_CI_ARTIFACTS_NAME" # Release artifacts are of interest even for failed jobs. when: always paths: diff --git a/Help/guide/tutorial/Adding System Introspection.rst b/Help/guide/tutorial/Adding System Introspection.rst index e149110..8db0cb8 100644 --- a/Help/guide/tutorial/Adding System Introspection.rst +++ b/Help/guide/tutorial/Adding System Introspection.rst @@ -9,17 +9,15 @@ tutorial assume that they are not common. If the platform has ``log`` and ``exp`` then we will use them to compute the square root in the ``mysqrt`` function. We first test for the availability of -these functions using the :module:`CheckSymbolExists` module in -``MathFunctions/CMakeLists.txt``. On some platforms, we will need to link to -the ``m`` library. If ``log`` and ``exp`` are not initially found, require the -``m`` library and try again. +these functions using the :module:`CheckCXXSourceCompiles` module in +``MathFunctions/CMakeLists.txt``. Add the checks for ``log`` and ``exp`` to ``MathFunctions/CMakeLists.txt``, after the call to :command:`target_include_directories`: .. literalinclude:: Step6/MathFunctions/CMakeLists.txt :caption: MathFunctions/CMakeLists.txt - :name: MathFunctions/CMakeLists.txt-check_symbol_exists + :name: MathFunctions/CMakeLists.txt-check_cxx_source_compiles :language: cmake :start-after: # to find MathFunctions.h, while we don't. :end-before: # add compile definitions diff --git a/Help/guide/tutorial/Step6/MathFunctions/CMakeLists.txt b/Help/guide/tutorial/Step6/MathFunctions/CMakeLists.txt index f64c6ac..42e098a 100644 --- a/Help/guide/tutorial/Step6/MathFunctions/CMakeLists.txt +++ b/Help/guide/tutorial/Step6/MathFunctions/CMakeLists.txt @@ -7,19 +7,21 @@ target_include_directories(MathFunctions ) # does this system provide the log and exp functions? -include(CheckSymbolExists) -check_symbol_exists(log "math.h" HAVE_LOG) -check_symbol_exists(exp "math.h" HAVE_EXP) -if(NOT (HAVE_LOG AND HAVE_EXP)) - unset(HAVE_LOG CACHE) - unset(HAVE_EXP CACHE) - set(CMAKE_REQUIRED_LIBRARIES "m") - check_symbol_exists(log "math.h" HAVE_LOG) - check_symbol_exists(exp "math.h" HAVE_EXP) - if(HAVE_LOG AND HAVE_EXP) - target_link_libraries(MathFunctions PRIVATE m) - endif() -endif() +include(CheckCXXSourceCompiles) +check_cxx_source_compiles(" + #include <cmath> + int main() { + std::log(1.0); + return 0; + } +" HAVE_LOG) +check_cxx_source_compiles(" + #include <cmath> + int main() { + std::exp(1.0); + return 0; + } +" HAVE_EXP) # add compile definitions if(HAVE_LOG AND HAVE_EXP) diff --git a/Help/guide/tutorial/Step6/MathFunctions/mysqrt.cxx b/Help/guide/tutorial/Step6/MathFunctions/mysqrt.cxx index 0637063..7eecd26 100644 --- a/Help/guide/tutorial/Step6/MathFunctions/mysqrt.cxx +++ b/Help/guide/tutorial/Step6/MathFunctions/mysqrt.cxx @@ -12,7 +12,7 @@ double mysqrt(double x) // if we have both log and exp then use them #if defined(HAVE_LOG) && defined(HAVE_EXP) - double result = exp(log(x) * 0.5); + double result = std::exp(std::log(x) * 0.5); std::cout << "Computing sqrt of " << x << " to be " << result << " using log and exp" << std::endl; #else diff --git a/Help/manual/cmake-presets.7.rst b/Help/manual/cmake-presets.7.rst index 948d87a..a96c704 100644 --- a/Help/manual/cmake-presets.7.rst +++ b/Help/manual/cmake-presets.7.rst @@ -42,7 +42,22 @@ The root object recognizes the following fields: ``version`` A required integer representing the version of the JSON schema. - The supported versions are ``1``, ``2``, ``3``, ``4``, and ``5``. + The supported versions are: + + ``1`` + .. versionadded:: 3.19 + + ``2`` + .. versionadded:: 3.20 + + ``3`` + .. versionadded:: 3.21 + + ``4`` + .. versionadded:: 3.23 + + ``5`` + .. versionadded:: 3.24 ``cmakeMinimumRequired`` diff --git a/Help/prop_dir/RULE_LAUNCH_COMPILE.rst b/Help/prop_dir/RULE_LAUNCH_COMPILE.rst index 342d0ae..d9b550e 100644 --- a/Help/prop_dir/RULE_LAUNCH_COMPILE.rst +++ b/Help/prop_dir/RULE_LAUNCH_COMPILE.rst @@ -3,5 +3,11 @@ RULE_LAUNCH_COMPILE Specify a launcher for compile rules. -See the global property of the same name for details. This overrides -the global property for a directory. +.. note:: + This property is intended for internal use by :manual:`ctest(1)`. Projects + and developers should use the :prop_tgt:`<LANG>_COMPILER_LAUNCHER` target + properties or the associated :variable:`CMAKE_<LANG>_COMPILER_LAUNCHER` + variables instead. + +See the :prop_gbl:`global property <RULE_LAUNCH_COMPILE>` of the same name +for details. This overrides the global property for a directory. diff --git a/Help/prop_dir/RULE_LAUNCH_LINK.rst b/Help/prop_dir/RULE_LAUNCH_LINK.rst index 3cfb236..922c8d5 100644 --- a/Help/prop_dir/RULE_LAUNCH_LINK.rst +++ b/Help/prop_dir/RULE_LAUNCH_LINK.rst @@ -3,5 +3,11 @@ RULE_LAUNCH_LINK Specify a launcher for link rules. -See the global property of the same name for details. This overrides -the global property for a directory. +.. note:: + This property is intended for internal use by :manual:`ctest(1)`. Projects + and developers should use the :prop_tgt:`<LANG>_LINKER_LAUNCHER` target + properties or the associated :variable:`CMAKE_<LANG>_LINKER_LAUNCHER` + variables instead. + +See the :prop_gbl:`global property <RULE_LAUNCH_LINK>` of the same name for +details. This overrides the global property for a directory. diff --git a/Help/prop_gbl/RULE_LAUNCH_COMPILE.rst b/Help/prop_gbl/RULE_LAUNCH_COMPILE.rst index e0df878..a43e9e5 100644 --- a/Help/prop_gbl/RULE_LAUNCH_COMPILE.rst +++ b/Help/prop_gbl/RULE_LAUNCH_COMPILE.rst @@ -3,6 +3,12 @@ RULE_LAUNCH_COMPILE Specify a launcher for compile rules. +.. note:: + This property is intended for internal use by :manual:`ctest(1)`. Projects + and developers should use the :prop_tgt:`<LANG>_COMPILER_LAUNCHER` target + properties or the associated :variable:`CMAKE_<LANG>_COMPILER_LAUNCHER` + variables instead. + :ref:`Makefile Generators` and the :generator:`Ninja` generator prefix compiler commands with the given launcher command line. This is intended to allow launchers to intercept build problems diff --git a/Help/prop_gbl/RULE_LAUNCH_LINK.rst b/Help/prop_gbl/RULE_LAUNCH_LINK.rst index 567bb68..da376fe 100644 --- a/Help/prop_gbl/RULE_LAUNCH_LINK.rst +++ b/Help/prop_gbl/RULE_LAUNCH_LINK.rst @@ -3,6 +3,12 @@ RULE_LAUNCH_LINK Specify a launcher for link rules. +.. note:: + This property is intended for internal use by :manual:`ctest(1)`. Projects + and developers should use the :prop_tgt:`<LANG>_LINKER_LAUNCHER` target + properties or the associated :variable:`CMAKE_<LANG>_LINKER_LAUNCHER` + variables instead. + :ref:`Makefile Generators` and the :generator:`Ninja` generator prefix link and archive commands with the given launcher command line. This is intended to allow launchers to intercept build problems diff --git a/Help/prop_tgt/RULE_LAUNCH_COMPILE.rst b/Help/prop_tgt/RULE_LAUNCH_COMPILE.rst index e92ab86..3f4305f 100644 --- a/Help/prop_tgt/RULE_LAUNCH_COMPILE.rst +++ b/Help/prop_tgt/RULE_LAUNCH_COMPILE.rst @@ -3,5 +3,11 @@ RULE_LAUNCH_COMPILE Specify a launcher for compile rules. -See the global property of the same name for details. This overrides -the global and directory property for a target. +.. note:: + This property is intended for internal use by :manual:`ctest(1)`. Projects + and developers should use the :prop_tgt:`<LANG>_COMPILER_LAUNCHER` target + properties or the associated :variable:`CMAKE_<LANG>_COMPILER_LAUNCHER` + variables instead. + +See the :prop_gbl:`global property <RULE_LAUNCH_COMPILE>` of the same name +for details. This overrides the global and directory property for a target. diff --git a/Help/prop_tgt/RULE_LAUNCH_LINK.rst b/Help/prop_tgt/RULE_LAUNCH_LINK.rst index f330033..da93be2 100644 --- a/Help/prop_tgt/RULE_LAUNCH_LINK.rst +++ b/Help/prop_tgt/RULE_LAUNCH_LINK.rst @@ -3,5 +3,11 @@ RULE_LAUNCH_LINK Specify a launcher for link rules. -See the global property of the same name for details. This overrides -the global and directory property for a target. +.. note:: + This property is intended for internal use by :manual:`ctest(1)`. Projects + and developers should use the :prop_tgt:`<LANG>_LINKER_LAUNCHER` target + properties or the associated :variable:`CMAKE_<LANG>_LINKER_LAUNCHER` + variables instead. + +See the :prop_gbl:`global property <RULE_LAUNCH_LINK>` of the same name for +details. This overrides the global and directory property for a target. diff --git a/Modules/FetchContent.cmake b/Modules/FetchContent.cmake index 5ca296e..83aafa8 100644 --- a/Modules/FetchContent.cmake +++ b/Modules/FetchContent.cmake @@ -1159,9 +1159,12 @@ function(FetchContent_Declare contentName) set(options "") set(oneValueArgs + SVN_REPOSITORY + DOWNLOAD_NO_EXTRACT + DOWNLOAD_EXTRACT_TIMESTAMP + URL BINARY_DIR SOURCE_DIR - SVN_REPOSITORY ) set(multiValueArgs "") @@ -1188,13 +1191,47 @@ function(FetchContent_Declare contentName) string(SHA1 urlSHA ${ARG_SVN_REPOSITORY}) string(SUBSTRING ${urlSHA} 0 7 urlSHA) string(APPEND ARG_SOURCE_DIR "-${urlSHA}") - list(PREPEND ARG_UNPARSED_ARGUMENTS SVN_REPOSITORY "${ARG_SVN_REPOSITORY}") endif() - list(PREPEND ARG_UNPARSED_ARGUMENTS - SOURCE_DIR "${ARG_SOURCE_DIR}" - BINARY_DIR "${ARG_BINARY_DIR}" - ) + # The ExternalProject_Add() call in the sub-build won't see the CMP0135 + # policy setting of our caller. Work out if that policy will be needed and + # explicitly set the relevant option if not already provided. The condition + # here is essentially an abbreviated version of the logic in + # ExternalProject's _ep_add_download_command() function. + if(ARG_URL AND + NOT IS_DIRECTORY "${ARG_URL}" AND + NOT ARG_DOWNLOAD_NO_EXTRACT AND + NOT DEFINED ARG_DOWNLOAD_EXTRACT_TIMESTAMP) + cmake_policy(GET CMP0135 _FETCHCONTENT_CMP0135 + PARENT_SCOPE # undocumented, do not use outside of CMake + ) + if(_FETCHCONTENT_CMP0135 STREQUAL "") + message(AUTHOR_WARNING + "The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy " + "CMP0135 is not set. The policy's OLD behavior will be used. " + "When using a URL download, the timestamps of extracted files " + "should preferably be that of the time of extraction, otherwise " + "code that depends on the extracted contents might not be " + "rebuilt if the URL changes. The OLD behavior preserves the " + "timestamps from the archive instead, but this is usually not " + "what you want. Update your project to the NEW behavior or " + "specify the DOWNLOAD_EXTRACT_TIMESTAMP option with a value of " + "true to avoid this robustness issue." + ) + set(ARG_DOWNLOAD_EXTRACT_TIMESTAMP TRUE) + elseif(_FETCHCONTENT_CMP0135 STREQUAL "NEW") + set(ARG_DOWNLOAD_EXTRACT_TIMESTAMP FALSE) + else() + set(ARG_DOWNLOAD_EXTRACT_TIMESTAMP TRUE) + endif() + endif() + + # Add back in the keyword args we pulled out and potentially tweaked/added + foreach(key IN LISTS oneValueArgs) + if(DEFINED ARG_${key}) + list(PREPEND ARG_UNPARSED_ARGUMENTS ${key} "${ARG_${key}}") + endif() + endforeach() set(__argsQuoted) foreach(__item IN LISTS ARG_UNPARSED_ARGUMENTS) diff --git a/Modules/GNUInstallDirs.cmake b/Modules/GNUInstallDirs.cmake index bd72901..9796854 100644 --- a/Modules/GNUInstallDirs.cmake +++ b/Modules/GNUInstallDirs.cmake @@ -112,6 +112,8 @@ The following values of :variable:`CMAKE_INSTALL_PREFIX` are special: For example, the ``SYSCONFDIR`` value ``etc`` becomes ``/etc/opt/...``. This is defined by the `Filesystem Hierarchy Standard`_. + This behavior does not apply to paths under ``/opt/homebrew/...``. + .. _`Filesystem Hierarchy Standard`: https://refspecs.linuxfoundation.org/FHS_3.0/fhs/index.html Macros @@ -400,7 +402,7 @@ macro(GNUInstallDirs_get_absolute_install_dir absvar var) else() set(${absvar} "${CMAKE_INSTALL_PREFIX}/${${var}}") endif() - elseif("${CMAKE_INSTALL_PREFIX}" MATCHES "^/opt/.*") + elseif("${CMAKE_INSTALL_PREFIX}" MATCHES "^/opt/" AND NOT "${CMAKE_INSTALL_PREFIX}" MATCHES "^/opt/homebrew/") if("${GGAID_dir}" STREQUAL "SYSCONFDIR" OR "${GGAID_dir}" STREQUAL "LOCALSTATEDIR" OR "${GGAID_dir}" STREQUAL "RUNSTATEDIR") set(${absvar} "/${${var}}${CMAKE_INSTALL_PREFIX}") else() diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 39c9273..8debc42 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,7 +1,7 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 23) -set(CMake_VERSION_PATCH 20220601) +set(CMake_VERSION_PATCH 20220603) #set(CMake_VERSION_RC 0) set(CMake_VERSION_IS_DIRTY 0) diff --git a/Source/cmQtAutoMocUic.cxx b/Source/cmQtAutoMocUic.cxx index 0d38dfb..6e8ada1 100644 --- a/Source/cmQtAutoMocUic.cxx +++ b/Source/cmQtAutoMocUic.cxx @@ -2175,7 +2175,14 @@ void cmQtAutoMocUicT::JobMocsCompilationT::Process() // Placeholder content content += "// No files found that require moc or the moc files are " "included\n" - "enum some_compilers { need_more_than_nothing };\n"; + "struct cmake_automoc_silence_linker_warning{\n" + " virtual ~cmake_automoc_silence_linker_warning();\n" + "};\n" + "\n" + "inline " + "cmake_automoc_silence_linker_warning::" + "~cmake_automoc_silence_linker_warning()\n" + "{}\n"; } else { // Valid content const bool mc = this->BaseConst().MultiConfig; diff --git a/Tests/RunCMake/CMP0135/CMP0135-Common.cmake b/Tests/RunCMake/CMP0135/CMP0135-Common.cmake index 4b7cce5..ad60b7c 100644 --- a/Tests/RunCMake/CMP0135/CMP0135-Common.cmake +++ b/Tests/RunCMake/CMP0135/CMP0135-Common.cmake @@ -1,7 +1,8 @@ +#============================================================================== +# ExternalProject +#============================================================================== +set(stamp_dir "${CMAKE_CURRENT_BINARY_DIR}/stamps-ep") include(ExternalProject) - -set(stamp_dir "${CMAKE_CURRENT_BINARY_DIR}/stamps") - ExternalProject_Add(fake_ext_proj # We don't actually do a build, so we never try to download from this URL URL https://example.com/something.zip @@ -12,7 +13,33 @@ ExternalProject_Add(fake_ext_proj set(extraction_script "${stamp_dir}/extract-fake_ext_proj.cmake") file(STRINGS "${extraction_script}" results REGEX "--touch") if("${results}" STREQUAL "") - message(STATUS "Using timestamps from archive") + message(STATUS "ExternalProject: Using timestamps from archive") +else() + message(STATUS "ExternalProject: Using extraction time for the timestamps") +endif() + +#============================================================================== +# FetchContent +#============================================================================== +set(stamp_dir "${CMAKE_CURRENT_BINARY_DIR}/stamps-fc") +set(archive_file ${CMAKE_CURRENT_BINARY_DIR}/test_archive.7z) +file(ARCHIVE_CREATE + OUTPUT ${archive_file} + PATHS ${CMAKE_CURRENT_LIST_DIR} + FORMAT 7zip +) +include(FetchContent) +FetchContent_Declare(fake_fc_proj + URL file://${archive_file} + STAMP_DIR ${stamp_dir} +) +FetchContent_MakeAvailable(fake_fc_proj) + +# Report whether the --touch option was added to the extraction script +set(extraction_script "${stamp_dir}/extract-fake_fc_proj-populate.cmake") +file(STRINGS "${extraction_script}" results REGEX "--touch") +if("${results}" STREQUAL "") + message(STATUS "FetchContent: Using timestamps from archive") else() - message(STATUS "Using extraction time for the timestamps") + message(STATUS "FetchContent: Using extraction time for the timestamps") endif() diff --git a/Tests/RunCMake/CMP0135/CMP0135-NEW-stdout.txt b/Tests/RunCMake/CMP0135/CMP0135-NEW-stdout.txt index bf53c0b..ceef9b8 100644 --- a/Tests/RunCMake/CMP0135/CMP0135-NEW-stdout.txt +++ b/Tests/RunCMake/CMP0135/CMP0135-NEW-stdout.txt @@ -1 +1,2 @@ -Using extraction time for the timestamps +-- ExternalProject: Using extraction time for the timestamps +-- FetchContent: Using extraction time for the timestamps diff --git a/Tests/RunCMake/CMP0135/CMP0135-OLD-stdout.txt b/Tests/RunCMake/CMP0135/CMP0135-OLD-stdout.txt index ee57beb..1288c20 100644 --- a/Tests/RunCMake/CMP0135/CMP0135-OLD-stdout.txt +++ b/Tests/RunCMake/CMP0135/CMP0135-OLD-stdout.txt @@ -1 +1,2 @@ -Using timestamps from archive +-- ExternalProject: Using timestamps from archive +-- FetchContent: Using timestamps from archive diff --git a/Tests/RunCMake/CMP0135/CMP0135-WARN-stderr.txt b/Tests/RunCMake/CMP0135/CMP0135-WARN-stderr.txt index 8ba0027..6bf944e 100644 --- a/Tests/RunCMake/CMP0135/CMP0135-WARN-stderr.txt +++ b/Tests/RunCMake/CMP0135/CMP0135-WARN-stderr.txt @@ -8,3 +8,14 @@ CMake Warning \(dev\) at .*/Modules/ExternalProject.cmake:[0-9]+ \(message\): what you want\. Update your project to the NEW behavior or specify the DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this robustness issue\. +.* +CMake Warning \(dev\) at .*/Modules/FetchContent.cmake:[0-9]+ \(message\): + The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is + not set\. The policy's OLD behavior will be used\. When using a URL + download, the timestamps of extracted files should preferably be that of + the time of extraction, otherwise code that depends on the extracted + contents might not be rebuilt if the URL changes\. The OLD behavior + preserves the timestamps from the archive instead, but this is usually not + what you want\. Update your project to the NEW behavior or specify the + DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this + robustness issue\. diff --git a/Tests/RunCMake/CMP0135/CMP0135-WARN-stdout.txt b/Tests/RunCMake/CMP0135/CMP0135-WARN-stdout.txt index ee57beb..1288c20 100644 --- a/Tests/RunCMake/CMP0135/CMP0135-WARN-stdout.txt +++ b/Tests/RunCMake/CMP0135/CMP0135-WARN-stdout.txt @@ -1 +1,2 @@ -Using timestamps from archive +-- ExternalProject: Using timestamps from archive +-- FetchContent: Using timestamps from archive diff --git a/Utilities/Release/README.rst b/Utilities/Release/README.rst index 770b579..d5bbd2b 100644 --- a/Utilities/Release/README.rst +++ b/Utilities/Release/README.rst @@ -24,7 +24,7 @@ The ``<os>/<arch>/`` directories contain Docker specifications that anyone may use to produce binaries for CMake on the following platforms: * ``linux/x86_64/``: Linux on ``x86_64`` architectures. -* ``win/x86/``: Windows on ``x86_64`` and ``i386`` architectures. +* ``linux/aarch64/``: Linux on ``aarch64`` architectures. Each ``<os>/<arch>/`` directory contains the following: @@ -41,7 +41,7 @@ Each ``<os>/<arch>/`` directory contains the following: * ``<os>/<arch>/Dockerfile``: Produce an image containing a portable CMake binary package. Build this image using the CMake source directory as the build context. - The resulting image will have an ``/out`` (or ``c:/out``) directory + The resulting image will have an ``/out`` directory containing the package. For example, on Linux ``x86_64``: .. code-block:: console @@ -52,9 +52,6 @@ Each ``<os>/<arch>/`` directory contains the following: $ docker cp cmake-build:/out . $ ls out/cmake-*-linux-x86_64.* - On Windows, the ``win/x86`` specifications support both the ``x86_64`` - and ``i386`` architectures selected via ``--build-arg ARCH=...``. - * ``<os>/<arch>/test/Dockerfile``: Produces a base image with a test environment for packaged CMake binaries. For example, on Linux ``x86_64``, one may build the test base image: @@ -80,10 +77,6 @@ Each ``<os>/<arch>/`` directory contains the following: $ docker run --network none cmake:test bash test-make.bash $ docker run --network none cmake:test bash test-ninja.bash - On Windows, the test scripts are called ``test-nmake.bat`` and - ``test-ninja.bat``. In the ``x86`` architecture they accept one - argument specifying either ``x86_64`` or ``i386``. - .. _`kitware/cmake Docker Hub Repository`: https://hub.docker.com/r/kitware/cmake macOS diff --git a/Utilities/Release/win/x86/Dockerfile b/Utilities/Release/win/x86/Dockerfile deleted file mode 100644 index d5a036a..0000000 --- a/Utilities/Release/win/x86/Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -# escape=` - -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -# Produce an image containing a portable CMake binary package for Windows. -# Build using the CMake source directory as the build context. -# The resulting image will have a 'c:\out' directory containing the package. - -ARG FROM_IMAGE_NAME=kitware/cmake:build-win-x86-deps-2020-04-27 -ARG FROM_IMAGE_DIGEST=@sha256:04e229c0c0ba2247855d0e8c0fb87c1686f983adbafa4ce413e61b3905edb76b -ARG FROM_IMAGE=$FROM_IMAGE_NAME$FROM_IMAGE_DIGEST - -FROM $FROM_IMAGE as source -COPY . C:\cmake\src\cmake - -FROM source as build -ARG ARCH="x86_64" -ARG TEST="true" -RUN \cmake\src\cmake\Utilities\Release\win\x86\build.bat %ARCH% %TEST% - -# Package in a separate stage so the builder can optionally skip it. -FROM build as pack -ARG PACK="ZIP WIX" -RUN \cmake\src\cmake\Utilities\Release\win\x86\pack.bat %PACK% diff --git a/Utilities/Release/win/x86/base/Dockerfile b/Utilities/Release/win/x86/base/Dockerfile deleted file mode 100644 index c2c00f8..0000000 --- a/Utilities/Release/win/x86/base/Dockerfile +++ /dev/null @@ -1,30 +0,0 @@ -# escape=` - -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -# Produce a base image with a build environment for portable CMake binaries. -# Build using the directory containing this file as its own build context. - -ARG FROM_IMAGE_NAME=mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019 -ARG FROM_IMAGE_DIGEST=@sha256:a94289bfd61ba89cd162f7cf84afe0e307d4d2576b44b9bd277e7b3036ccfa6b -ARG FROM_IMAGE=$FROM_IMAGE_NAME$FROM_IMAGE_DIGEST -FROM $FROM_IMAGE - -# Use a traditional Windows shell. -SHELL ["cmd", "/S", "/C"] - -# Install Visual Studio Build Tools for desktop development with C++. -ADD https://aka.ms/vs/16/release/vs_buildtools.exe C:\TEMP\vs_buildtools.exe -RUN C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache ` - --installPath C:\BuildTools ` - --add Microsoft.VisualStudio.Workload.VCTools ` - --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 ` - --add Microsoft.VisualStudio.Component.VC.CLI.Support ` - --add Microsoft.VisualStudio.Component.VC.ATL ` - --add Microsoft.VisualStudio.Component.Windows10SDK.18362 ` - || IF "%ERRORLEVEL%"=="3010" EXIT 0 -RUN del C:\TEMP\vs_buildtools.exe - -# Add a toolchain environment loader for each architecture. -COPY msvc-x86_64.bat msvc-i386.bat C:\ diff --git a/Utilities/Release/win/x86/base/msvc-i386.bat b/Utilities/Release/win/x86/base/msvc-i386.bat deleted file mode 100755 index a63bdd2..0000000 --- a/Utilities/Release/win/x86/base/msvc-i386.bat +++ /dev/null @@ -1 +0,0 @@ -@C:\BuildTools\VC\Auxiliary\Build\vcvarsall.bat x86 diff --git a/Utilities/Release/win/x86/base/msvc-x86_64.bat b/Utilities/Release/win/x86/base/msvc-x86_64.bat deleted file mode 100755 index cffe0e7..0000000 --- a/Utilities/Release/win/x86/base/msvc-x86_64.bat +++ /dev/null @@ -1 +0,0 @@ -@C:\BuildTools\VC\Auxiliary\Build\vcvarsall.bat x64 diff --git a/Utilities/Release/win/x86/build.bat b/Utilities/Release/win/x86/build.bat deleted file mode 100755 index 2125572..0000000 --- a/Utilities/Release/win/x86/build.bat +++ /dev/null @@ -1,19 +0,0 @@ -@rem Distributed under the OSI-approved BSD 3-Clause License. See accompanying -@rem file Copyright.txt or https://cmake.org/licensing for details. - -set ARCH=%1 -set TEST=%2 - -copy \msvc-%ARCH%.bat \msvc.bat -call \msvc.bat && @echo on || exit /b -set PATH=C:\ninja;%PATH% - -mkdir \cmake\src\cmake-build && ^ -cd \cmake\src\cmake-build && ^ -copy ..\cmake\Utilities\Release\win\x86\cache-%ARCH%.txt CMakeCache.txt && ^ -\cmake\cmake\bin\cmake ..\cmake -GNinja && ^ -ninja && ( - if "%TEST%"=="true" ( - bin\ctest --output-on-failure -j %NUMBER_OF_PROCESSORS% -R "^(CMake\.|CMakeLib\.|CMakeServerLib\.|RunCMake\.ctest_memcheck)" - ) -) diff --git a/Utilities/Release/win/x86/cache-i386.txt b/Utilities/Release/win/x86/cache-i386.txt deleted file mode 100644 index 7f58fdd..0000000 --- a/Utilities/Release/win/x86/cache-i386.txt +++ /dev/null @@ -1,42 +0,0 @@ -CMAKE_BUILD_TYPE:STRING=Release - -# Use APIs from at most Windows 7 -CMAKE_C_FLAGS:STRING=-D_WIN32_WINNT=0x601 -DNTDDI_VERSION=0x06010000 -CMAKE_CXX_FLAGS:STRING=-GR -EHsc -D_WIN32_WINNT=0x601 -DNTDDI_VERSION=0x06010000 -CMAKE_EXE_LINKER_FLAGS:STRING=-machine:x86 -subsystem:console,6.01 - -# Link C/C++ runtime library statically. -CMAKE_MSVC_RUNTIME_LIBRARY:STRING=MultiThreaded$<$<CONFIG:Debug>:Debug> - -# No ssl support in curl: use native Windows APIs. -CMAKE_USE_OPENSSL:BOOL=OFF - -# Enable cmake-gui with static qt plugins -BUILD_QtDialog:BOOL=TRUE -CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:STRING=3 -CMAKE_PREFIX_PATH:STRING=C:/qt-i386 -CMake_QT_STATIC_QWindowsIntegrationPlugin_LIBRARIES:STRING=c:/qt-i386/plugins/platforms/qwindows.lib;c:/qt-i386/plugins/styles/qwindowsvistastyle.lib;c:/qt-i386/lib/Qt5EventDispatcherSupport.lib;c:/qt-i386/lib/Qt5FontDatabaseSupport.lib;c:/qt-i386/lib/Qt5ThemeSupport.lib;c:/qt-i386/lib/qtfreetype.lib;c:/qt-i386/lib/qtlibpng.lib;imm32.lib;wtsapi32.lib - -# Build documentation. -CMAKE_DOC_DIR:STRING=doc/cmake -Python_EXECUTABLE:FILEPATH=C:/python3/python.exe -SPHINX_EXECUTABLE:FILEPATH=C:/python3/Scripts/sphinx-build.exe -SPHINX_HTML:BOOL=ON -SPHINX_MAN:BOOL=ON -SPHINX_QTHELP:BOOL=ON -QHELPGENERATOR_EXECUTABLE:PATH=C:/qt-i386/bin/qhelpgenerator.exe - -# No bootstrap with MSVC tools. -CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE - -# No Fortran compiler. -CMAKE_Fortran_COMPILER:FILEPATH=FALSE - -# No Swift compiler. -CMAKE_Swift_COMPILER:FILEPATH=FALSE - -# Skip Qt5 tests because our Qt is static. -CMake_TEST_Qt5:BOOL=FALSE - -# CPack package file name component for this platform. -CPACK_SYSTEM_NAME:STRING=windows-i386 diff --git a/Utilities/Release/win/x86/cache-x86_64.txt b/Utilities/Release/win/x86/cache-x86_64.txt deleted file mode 100644 index d034640..0000000 --- a/Utilities/Release/win/x86/cache-x86_64.txt +++ /dev/null @@ -1,42 +0,0 @@ -CMAKE_BUILD_TYPE:STRING=Release - -# Use APIs from at most Windows 7 -CMAKE_C_FLAGS:STRING=-D_WIN32_WINNT=0x601 -DNTDDI_VERSION=0x06010000 -CMAKE_CXX_FLAGS:STRING=-GR -EHsc -D_WIN32_WINNT=0x601 -DNTDDI_VERSION=0x06010000 -CMAKE_EXE_LINKER_FLAGS:STRING=-machine:x64 -subsystem:console,6.01 - -# Link C/C++ runtime library statically. -CMAKE_MSVC_RUNTIME_LIBRARY:STRING=MultiThreaded$<$<CONFIG:Debug>:Debug> - -# No ssl support in curl: use native Windows APIs. -CMAKE_USE_OPENSSL:BOOL=OFF - -# Enable cmake-gui with static qt plugins -BUILD_QtDialog:BOOL=TRUE -CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:STRING=3 -CMAKE_PREFIX_PATH:STRING=C:/qt-x86_64 -CMake_QT_STATIC_QWindowsIntegrationPlugin_LIBRARIES:STRING=c:/qt-x86_64/plugins/platforms/qwindows.lib;c:/qt-x86_64/plugins/styles/qwindowsvistastyle.lib;c:/qt-x86_64/lib/Qt5EventDispatcherSupport.lib;c:/qt-x86_64/lib/Qt5FontDatabaseSupport.lib;c:/qt-x86_64/lib/Qt5ThemeSupport.lib;c:/qt-x86_64/lib/qtfreetype.lib;c:/qt-x86_64/lib/qtlibpng.lib;imm32.lib;wtsapi32.lib - -# Build documentation. -CMAKE_DOC_DIR:STRING=doc/cmake -Python_EXECUTABLE:FILEPATH=C:/python3/python.exe -SPHINX_EXECUTABLE:FILEPATH=C:/python3/Scripts/sphinx-build.exe -SPHINX_HTML:BOOL=ON -SPHINX_MAN:BOOL=ON -SPHINX_QTHELP:BOOL=ON -QHELPGENERATOR_EXECUTABLE:PATH=C:/qt-x86_64/bin/qhelpgenerator.exe - -# No bootstrap with MSVC tools. -CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE - -# No Fortran compiler. -CMAKE_Fortran_COMPILER:FILEPATH=FALSE - -# No Swift compiler. -CMAKE_Swift_COMPILER:FILEPATH=FALSE - -# Skip Qt5 tests because our Qt is static. -CMake_TEST_Qt5:BOOL=FALSE - -# CPack package file name component for this platform. -CPACK_SYSTEM_NAME:STRING=windows-x86_64 diff --git a/Utilities/Release/win/x86/deps/Dockerfile b/Utilities/Release/win/x86/deps/Dockerfile deleted file mode 100644 index 4b294c1..0000000 --- a/Utilities/Release/win/x86/deps/Dockerfile +++ /dev/null @@ -1,127 +0,0 @@ -# escape=` - -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -# Produce an image with custom-built dependencies for portable CMake binaries. -# Build using the directory containing this file as its own build context. - -ARG FROM_IMAGE_NAME=kitware/cmake:build-win-x86-base-2020-04-27 -ARG FROM_IMAGE_DIGEST=@sha256:c5a8948d636319cdac0180266996558bb6fb037125792b5b837f069d02e53d7c -ARG FROM_IMAGE=$FROM_IMAGE_NAME$FROM_IMAGE_DIGEST - -# Qt Source -FROM $FROM_IMAGE AS qt-src - -# JOM -ADD http://download.qt-project.org/official_releases/jom/unstable-jom.zip C:\jom\jom.zip -RUN cd \jom ` - && powershell -Command " ` - if ($(Get-FileHash jom.zip).Hash -eq '128fdd846fe24f8594eed37d1d8929a0ea78df563537c0c1b1861a635013fff8') {` - Expand-Archive -Path jom.zip -DestinationPath .` - } else {` - exit 1 ` - }" ` - && del jom.zip - -# XZ -ADD https://tukaani.org/xz/xz-5.2.5-windows.zip C:\xz\xz.zip -RUN cd \xz ` - && powershell -Command " ` - if ($(Get-FileHash xz.zip).Hash -eq 'd83b82ca75dfab39a13dda364367b34970c781a9df4d41264db922ac3a8f622d') {` - Expand-Archive -Path xz.zip -DestinationPath .` - } else {` - exit 1 ` - }" ` - && del xz.zip - -# Git -ADD https://github.com/git-for-windows/git/releases/download/v2.26.2.windows.1/MinGit-2.26.2-busybox-64-bit.zip C:\git\git.zip -RUN cd \git ` - && powershell -Command " ` - if ($(Get-FileHash git.zip).Hash -eq 'e834ea73fe093fb180dc45f67a1f2a7a566dab53d1d45bc3cd150106f5c40520') {` - Expand-Archive -Path git.zip -DestinationPath .` - } else {` - exit 1 ` - }" ` - && del git.zip - -# Qt Source -ADD https://download.qt.io/official_releases/qt/5.12/5.12.1/single/qt-everywhere-src-5.12.1.tar.xz C:\qt-src\qt.tar.xz -RUN cd \qt-src ` - && powershell -Command " ` - if ($(Get-FileHash qt.tar.xz).Hash -eq 'caffbd625c7bc10ff8c5c7a27dbc7d84fa4de146975c0e1ffe904b514ccd6da4') {` - \xz\bin_x86-64\xz -d qt.tar.xz ` - } else {` - exit 1 ` - }" ` - && tar xvf qt.tar ` - && del qt.tar ` - && move qt-everywhere-src-5.12.1 qt -COPY qt-build.bat qt-install.patch C:\qt-src\ - -# Qt Build i386 -FROM qt-src as qt-i386 -RUN \qt-src\qt-build.bat i386 - -# Qt Build x86_64 -FROM qt-src as qt-x86_64 -RUN \qt-src\qt-build.bat x86_64 - -# Output Stage -FROM $FROM_IMAGE - -# Qt -COPY --from=qt-i386 C:\qt-i386 C:\qt-i386 -COPY --from=qt-x86_64 C:\qt-x86_64 C:\qt-x86_64 - -# WIX -ADD https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip C:\wix\wix.zip -RUN cd \wix ` - && powershell -Command " ` - if ($(Get-FileHash wix.zip).Hash -eq '2c1888d5d1dba377fc7fa14444cf556963747ff9a0a289a3599cf09da03b9e2e') {` - Expand-Archive -Path wix.zip -DestinationPath .` - } else {` - exit 1 ` - }" ` - && del wix.zip - -# Python and Sphinx -ADD https://www.python.org/ftp/python/3.8.2/python-3.8.2-embed-amd64.zip C:\python3\python3.zip -RUN cd \python3 ` - && powershell -Command " ` - if ($(Get-FileHash python3.zip).Hash -eq '2927a3a6d0fe1f6e047a86059220aeda374eed23113b9ef5355acb8452d56453') {` - Expand-Archive -Path python3.zip -DestinationPath .` - } else {` - exit 1 ` - }" ` - && del python3.zip ` - && curl -O https://bootstrap.pypa.io/get-pip.py ` - && python get-pip.py ` - && del python38._pth ` - && set "PY_LIBS=C:\python3\Lib;C:\Python3\Lib\site-packages" ` - && set "PY_PIP=C:\python3\Scripts" ` - && Scripts\pip install --no-warn-script-location sphinx==2.1.2 - -# Ninja -ADD https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-win.zip C:\ninja\ninja.zip -RUN cd \ninja ` - && powershell -Command " ` - if ($(Get-FileHash ninja.zip).Hash -eq '919fd158c16bf135e8a850bb4046ec1ce28a7439ee08b977cd0b7f6b3463d178') {` - Expand-Archive -Path ninja.zip -DestinationPath .` - } else {` - exit 1 ` - }" ` - && del ninja.zip - -# CMake -ADD https://github.com/Kitware/CMake/releases/download/v3.17.1/cmake-3.17.1-win64-x64.zip C:\cmake\cmake.zip -RUN cd \cmake ` - && powershell -Command " ` - if ($(Get-FileHash cmake.zip).Hash -eq 'a5af7a2fe73f34070456397e940042e4469f072126c82974f44333ac43d478b1') {` - Expand-Archive -Path cmake.zip -DestinationPath .` - } else {` - exit 1 ` - }" ` - && move cmake-*-win64-x64 cmake ` - && del cmake.zip diff --git a/Utilities/Release/win/x86/deps/qt-build.bat b/Utilities/Release/win/x86/deps/qt-build.bat deleted file mode 100755 index e8bfa81..0000000 --- a/Utilities/Release/win/x86/deps/qt-build.bat +++ /dev/null @@ -1,47 +0,0 @@ -set ARCH=%1 -call \msvc-%ARCH%.bat && @echo on || exit /b -mkdir \qt-src\qt-build && ^ -cd \qt-src\qt-build && ^ -..\qt\configure.bat ^ - -prefix C:/qt-%ARCH% ^ - -static ^ - -static-runtime ^ - -release ^ - -opensource -confirm-license ^ - -platform win32-msvc ^ - -mp ^ - -gui ^ - -widgets ^ - -qt-pcre ^ - -qt-zlib ^ - -qt-libpng ^ - -qt-libjpeg ^ - -no-gif ^ - -no-icu ^ - -no-pch ^ - -no-angle ^ - -no-opengl ^ - -no-dbus ^ - -no-harfbuzz ^ - -no-accessibility ^ - -skip declarative ^ - -skip multimedia ^ - -skip qtcanvas3d ^ - -skip qtconnectivity ^ - -skip qtdeclarative ^ - -skip qtlocation ^ - -skip qtmultimedia ^ - -skip qtsensors ^ - -skip qtserialport ^ - -skip qtsvg ^ - -skip qtwayland ^ - -skip qtwebchannel ^ - -skip qtwebengine ^ - -skip qtwebsockets ^ - -skip qtxmlpatterns ^ - -nomake examples -nomake tests ^ - && ^ -\jom\jom.exe -J %NUMBER_OF_PROCESSORS% && ^ -\jom\jom.exe install && ^ -cd \qt-%ARCH% && ^ -\git\cmd\git apply \qt-src\qt-install.patch diff --git a/Utilities/Release/win/x86/deps/qt-install.patch b/Utilities/Release/win/x86/deps/qt-install.patch deleted file mode 100644 index 39a649e..0000000 --- a/Utilities/Release/win/x86/deps/qt-install.patch +++ /dev/null @@ -1,26 +0,0 @@ -diff --git a/lib/cmake/Qt5Core/Qt5CoreConfig.cmake b/lib/cmake/Qt5Core/Qt5CoreConfig.cmake -index 04ec302..75d5596 100644 ---- a/lib/cmake/Qt5Core/Qt5CoreConfig.cmake -+++ b/lib/cmake/Qt5Core/Qt5CoreConfig.cmake -@@ -118,7 +118,7 @@ if (NOT TARGET Qt5::Core) - list(REMOVE_DUPLICATES Qt5Core_COMPILE_DEFINITIONS) - list(REMOVE_DUPLICATES Qt5Core_EXECUTABLE_COMPILE_FLAGS) - -- set(_Qt5Core_LIB_DEPENDENCIES "") -+ set(_Qt5Core_LIB_DEPENDENCIES "${_qt5Core_install_prefix}/lib/qtpcre2.lib;netapi32.lib;version.lib") - - - add_library(Qt5::Core STATIC IMPORTED) -diff --git a/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake b/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake -index a07b953..2e07371 100644 ---- a/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake -+++ b/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake -@@ -118,7 +118,7 @@ if (NOT TARGET Qt5::Widgets) - list(REMOVE_DUPLICATES Qt5Widgets_COMPILE_DEFINITIONS) - list(REMOVE_DUPLICATES Qt5Widgets_EXECUTABLE_COMPILE_FLAGS) - -- set(_Qt5Widgets_LIB_DEPENDENCIES "Qt5::Gui;Qt5::Core") -+ set(_Qt5Widgets_LIB_DEPENDENCIES "Qt5::Gui;Qt5::Core;dwmapi.lib;uxtheme.lib") - - - add_library(Qt5::Widgets STATIC IMPORTED) diff --git a/Utilities/Release/win/x86/pack.bat b/Utilities/Release/win/x86/pack.bat deleted file mode 100755 index 2d37eef..0000000 --- a/Utilities/Release/win/x86/pack.bat +++ /dev/null @@ -1,12 +0,0 @@ -@rem Distributed under the OSI-approved BSD 3-Clause License. See accompanying -@rem file Copyright.txt or https://cmake.org/licensing for details. - -call \msvc.bat && @echo on || exit /b -set PATH=C:\wix;C:\ninja;%PATH% -cd \cmake\src\cmake-build && ( - for %%p in (%*) do ( - bin\cpack -G %%p - ) -) && ^ -mkdir \out && ^ -move cmake-*-win* \out diff --git a/Utilities/Release/win/x86/test/Dockerfile b/Utilities/Release/win/x86/test/Dockerfile deleted file mode 100644 index 15bcd37..0000000 --- a/Utilities/Release/win/x86/test/Dockerfile +++ /dev/null @@ -1,37 +0,0 @@ -# escape=` - -# Distributed under the OSI-approved BSD 3-Clause License. See accompanying -# file Copyright.txt or https://cmake.org/licensing for details. - -# Produce a base image with a test environment for packaged CMake binaries. -# Build using the directory containing this file as its own build context. - -ARG FROM_IMAGE_NAME=kitware/cmake:build-win-x86-base-2020-04-27 -ARG FROM_IMAGE_DIGEST=@sha256:c5a8948d636319cdac0180266996558bb6fb037125792b5b837f069d02e53d7c -ARG FROM_IMAGE=$FROM_IMAGE_NAME$FROM_IMAGE_DIGEST -FROM $FROM_IMAGE - -# Python -ADD https://www.python.org/ftp/python/3.8.2/python-3.8.2-embed-amd64.zip C:\python3\python3.zip -RUN cd \python3 ` - && powershell -Command " ` - if ($(Get-FileHash python3.zip).Hash -eq '2927a3a6d0fe1f6e047a86059220aeda374eed23113b9ef5355acb8452d56453') {` - Expand-Archive -Path python3.zip -DestinationPath .` - } else {` - exit 1 ` - }" ` - && del python3.zip ` - && del python38._pth - -# Ninja -ADD https://github.com/ninja-build/ninja/releases/download/v1.10.0/ninja-win.zip C:\ninja\ninja.zip -RUN cd \ninja ` - && powershell -Command " ` - if ($(Get-FileHash ninja.zip).Hash -eq '919fd158c16bf135e8a850bb4046ec1ce28a7439ee08b977cd0b7f6b3463d178') {` - Expand-Archive -Path ninja.zip -DestinationPath .` - } else {` - exit 1 ` - }" ` - && del ninja.zip - -COPY test-nmake.bat test-ninja.bat C:\ diff --git a/Utilities/Release/win/x86/test/test-ninja.bat b/Utilities/Release/win/x86/test/test-ninja.bat deleted file mode 100755 index fb43589..0000000 --- a/Utilities/Release/win/x86/test/test-ninja.bat +++ /dev/null @@ -1,18 +0,0 @@ -@rem Distributed under the OSI-approved BSD 3-Clause License. See accompanying -@rem file Copyright.txt or https://cmake.org/licensing for details. - -set ARCH=%1 -call \msvc-%ARCH%.bat && @echo on || exit /b -set "PATH=C:\cmake\cmake\bin;C:\ninja;C:\python3;%PATH%" -mkdir \cmake\src\cmake-ninja && ^ -cd \cmake\src\cmake-ninja && ^ -> CMakeCache.txt ( - @echo CMAKE_Fortran_COMPILER:STRING= - @echo CMAKE_Swift_COMPILER:STRING= - @echo CMake_TEST_IPO_WORKS_C:BOOL=ON - @echo CMake_TEST_IPO_WORKS_CXX:BOOL=ON - @echo CMake_TEST_NO_NETWORK:BOOL=ON -) && ^ -cmake ..\cmake -DCMake_TEST_HOST_CMAKE=1 -G "Ninja" && ^ -ninja && ^ -ctest --output-on-failure -j %NUMBER_OF_PROCESSORS% diff --git a/Utilities/Release/win/x86/test/test-nmake.bat b/Utilities/Release/win/x86/test/test-nmake.bat deleted file mode 100755 index 9d7e447..0000000 --- a/Utilities/Release/win/x86/test/test-nmake.bat +++ /dev/null @@ -1,18 +0,0 @@ -@rem Distributed under the OSI-approved BSD 3-Clause License. See accompanying -@rem file Copyright.txt or https://cmake.org/licensing for details. - -set ARCH=%1 -call \msvc-%ARCH%.bat && @echo on || exit /b -set "PATH=C:\cmake\cmake\bin;C:\python3;%PATH%" -mkdir \cmake\src\cmake-nmake && ^ -cd \cmake\src\cmake-nmake && ^ -> CMakeCache.txt ( - @echo CMAKE_Fortran_COMPILER:STRING= - @echo CMAKE_Swift_COMPILER:STRING= - @echo CMake_TEST_IPO_WORKS_C:BOOL=ON - @echo CMake_TEST_IPO_WORKS_CXX:BOOL=ON - @echo CMake_TEST_NO_NETWORK:BOOL=ON -) && ^ -cmake ..\cmake -DCMake_TEST_HOST_CMAKE=1 -G "NMake Makefiles" && ^ -nmake && ^ -ctest --output-on-failure -j %NUMBER_OF_PROCESSORS% |