diff --git a/.clang-tidy b/.clang-tidy index 1b776e17f52..6d2edd4f721 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -3,15 +3,22 @@ Checks: "-*,\ bugprone-*,\ -bugprone-assignment-in-if-condition,\ -bugprone-easily-swappable-parameters,\ +-bugprone-empty-catch,\ -bugprone-implicit-widening-of-multiplication-result,\ +-bugprone-inc-dec-in-conditions,\ -bugprone-macro-parentheses,\ -bugprone-misplaced-widening-cast,\ +-bugprone-multi-level-implicit-pointer-conversion,\ -bugprone-narrowing-conversions,\ +-bugprone-switch-missing-default-case,\ -bugprone-too-small-loop-variable,\ -bugprone-unchecked-optional-access,\ +-bugprone-unused-local-non-trivial-variable,\ +-bugprone-unused-return-value,\ misc-*,\ -misc-confusable-identifiers,\ -misc-const-correctness,\ +-misc-include-cleaner,\ -misc-no-recursion,\ -misc-non-private-member-variables-in-classes,\ -misc-static-assert,\ @@ -20,14 +27,21 @@ modernize-*,\ -modernize-avoid-c-arrays,\ -modernize-macro-to-enum,\ -modernize-return-braced-init-list,\ +-modernize-type-traits,\ -modernize-use-emplace,\ -modernize-use-nodiscard,\ -modernize-use-noexcept,\ -modernize-use-trailing-return-type,\ -modernize-use-transparent-functors,\ performance-*,\ +-performance-avoid-endl,\ +-performance-enum-size,\ -performance-inefficient-vector-operation,\ +-performance-noexcept-swap,\ readability-*,\ +-readability-avoid-nested-conditional-operator,\ +-readability-avoid-return-with-void-value,\ +-readability-avoid-unconditional-preprocessor-if,\ -readability-convert-member-functions-to-static,\ -readability-function-cognitive-complexity,\ -readability-function-size,\ @@ -38,9 +52,13 @@ readability-*,\ -readability-magic-numbers,\ -readability-make-member-function-const,\ -readability-named-parameter,\ +-readability-redundant-casting,\ -readability-redundant-declaration,\ +-readability-redundant-inline-specifier,\ -readability-redundant-member-init,\ +-readability-reference-to-constructed-temporary,\ -readability-simplify-boolean-expr,\ +-readability-static-accessed-through-instance,\ -readability-suspicious-call-argument,\ -readability-uppercase-literal-suffix,\ cmake-*,\ diff --git a/.gitignore b/.gitignore index 816dcedc8c0..1780a41c030 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,6 @@ /.vs/ # Visual Studio build directory /out/ + +# clang-tidy output +/clang-tidy-fixes.patch diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 032a6fc4d36..e2e09594254 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -59,7 +59,7 @@ p:source-package: p:doc-package: extends: - - .fedora38_sphinx_package + - .fedora40_sphinx_package - .cmake_prep_doc_linux - .linux_x86_64_tags - .cmake_doc_artifacts @@ -108,17 +108,18 @@ l:iwyu-debian12: - .cmake_cdash_artifacts - .run_automatically -l:tidy-fedora38: +l:tidy-fedora40: extends: - - .fedora38_tidy + - .fedora40_tidy - .cmake_build_linux + - .cmake_tidy_artifacts - .linux_x86_64_tags - .cmake_cdash_artifacts - .run_automatically -l:sphinx-fedora38: +l:sphinx-fedora40: extends: - - .fedora38_sphinx + - .fedora40_sphinx - .cmake_build_linux - .cmake_sphinx_artifacts - .linux_x86_64_tags @@ -127,9 +128,9 @@ l:sphinx-fedora38: CMAKE_CI_JOB_CONTINUOUS: "true" CMAKE_CI_JOB_HELP: "true" -l:clang-analyzer-fedora38: +l:clang-analyzer-fedora40: extends: - - .fedora38_clang_analyzer + - .fedora40_clang_analyzer - .cmake_build_linux - .linux_x86_64_tags - .run_automatically @@ -221,21 +222,21 @@ t:debian12-hip-radeon: - .run_dependent - .needs_centos7_x86_64 variables: - CMAKE_CI_NO_MR: "true" + CMAKE_CI_JOB_NIGHTLY: "true" -t:fedora38-hip-radeon: +t:fedora39-hip-radeon: extends: - - .fedora38_hip_radeon + - .fedora39_hip_radeon - .cmake_test_linux_release - .linux_x86_64_tags_radeon - .run_dependent - .needs_centos7_x86_64 variables: - CMAKE_CI_NO_MR: "true" + CMAKE_CI_JOB_NIGHTLY: "true" -t:fedora38-ninja-clang: +t:fedora40-ninja-clang: extends: - - .fedora38_ninja_clang + - .fedora40_ninja_clang - .cmake_test_linux_release - .linux_x86_64_tags - .run_dependent @@ -243,9 +244,9 @@ t:fedora38-ninja-clang: variables: CMAKE_CI_JOB_NIGHTLY: "true" -t:fedora38-ninja-multi-clang: +t:fedora40-ninja-multi-clang: extends: - - .fedora38_ninja_multi_clang + - .fedora40_ninja_multi_clang - .cmake_test_linux_release - .linux_x86_64_tags - .run_dependent @@ -253,9 +254,9 @@ t:fedora38-ninja-multi-clang: variables: CMAKE_CI_JOB_NIGHTLY: "true" -t:fedora38-makefiles-clang: +t:fedora40-makefiles-clang: extends: - - .fedora38_makefiles_clang + - .fedora40_makefiles_clang - .cmake_test_linux_release - .linux_x86_64_tags - .run_dependent @@ -263,17 +264,17 @@ t:fedora38-makefiles-clang: variables: CMAKE_CI_JOB_NIGHTLY: "true" -t:fedora38-makefiles: +t:fedora40-makefiles: extends: - - .fedora38_makefiles + - .fedora40_makefiles - .cmake_test_linux_release - .linux_x86_64_tags - .run_dependent - .needs_centos7_x86_64 -t:fedora38-makefiles-nospace: +t:fedora40-makefiles-nospace: extends: - - .fedora38_makefiles + - .fedora40_makefiles - .cmake_test_linux_release - .linux_x86_64_tags - .cmake_junit_artifacts @@ -281,7 +282,7 @@ t:fedora38-makefiles-nospace: - .needs_centos7_x86_64 variables: GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake-ci" - CMAKE_CI_BUILD_NAME: fedora38_makefiles_nospace + CMAKE_CI_BUILD_NAME: fedora40_makefiles_nospace CMAKE_CI_JOB_NIGHTLY: "true" t:nvhpc22.11-ninja: @@ -302,7 +303,7 @@ t:cuda9.2-nvidia: - .run_dependent - .needs_centos7_x86_64 variables: - CMAKE_CI_NO_MR: "true" + CMAKE_CI_JOB_NIGHTLY: "true" t:cuda10.2-nvidia: extends: @@ -312,6 +313,8 @@ t:cuda10.2-nvidia: - .cmake_junit_artifacts - .run_dependent - .needs_centos7_x86_64 + variables: + CMAKE_CI_JOB_NIGHTLY: "true" t:cuda10.2-clang: extends: @@ -321,7 +324,7 @@ t:cuda10.2-clang: - .run_dependent - .needs_centos7_x86_64 variables: - CMAKE_CI_NO_MR: "true" + CMAKE_CI_JOB_NIGHTLY: "true" t:cuda11.6-nvidia: extends: @@ -331,6 +334,8 @@ t:cuda11.6-nvidia: - .cmake_junit_artifacts - .run_dependent - .needs_centos7_x86_64 + variables: + CMAKE_CI_JOB_NIGHTLY: "true" t:cuda11.6-clang: extends: @@ -340,7 +345,7 @@ t:cuda11.6-clang: - .run_dependent - .needs_centos7_x86_64 variables: - CMAKE_CI_NO_MR: "true" + CMAKE_CI_JOB_NIGHTLY: "true" t:cuda11.8-minimal-ninja: extends: @@ -350,7 +355,7 @@ t:cuda11.8-minimal-ninja: - .run_dependent - .needs_centos7_x86_64 variables: - CMAKE_CI_NO_MR: "true" + CMAKE_CI_JOB_NIGHTLY: "true" t:cuda11.8-minimal-splayed-ninja: extends: @@ -360,43 +365,42 @@ t:cuda11.8-minimal-splayed-ninja: - .run_dependent - .needs_centos7_x86_64 variables: - CMAKE_CI_NO_MR: "true" + CMAKE_CI_JOB_NIGHTLY: "true" -t:hip5.5-nvidia: +t:cuda12.2-nvidia: extends: - - .hip5.5_nvidia + - .cuda12.2_nvidia - .cmake_test_linux_release - .linux_x86_64_tags_cuda + - .cmake_junit_artifacts - .run_dependent - .needs_centos7_x86_64 - variables: - CMAKE_CI_NO_MR: "true" -t:hip5.5-radeon: +t:cuda12.2-clang: extends: - - .hip5.5_radeon + - .cuda12.2_clang - .cmake_test_linux_release - - .linux_x86_64_tags_radeon + - .linux_x86_64_tags_cuda - .run_dependent - .needs_centos7_x86_64 variables: - CMAKE_CI_NO_MR: "true" + CMAKE_CI_JOB_NIGHTLY: "true" -t:linux-gcc-cxx-modules-ninja: +t:hip5.5-nvidia: extends: - - .gcc_cxx_modules_ninja + - .hip5.5_nvidia - .cmake_test_linux_release - - .linux_x86_64_tags + - .linux_x86_64_tags_cuda - .run_dependent - .needs_centos7_x86_64 variables: CMAKE_CI_JOB_NIGHTLY: "true" -t:linux-gcc-cxx-modules-ninja-multi: +t:hip5.5-radeon: extends: - - .gcc_cxx_modules_ninja_multi + - .hip5.5_radeon - .cmake_test_linux_release - - .linux_x86_64_tags + - .linux_x86_64_tags_radeon - .run_dependent - .needs_centos7_x86_64 variables: @@ -413,9 +417,9 @@ t:debian10-legacy: variables: CMAKE_CI_JOB_NIGHTLY: "true" -b:fedora38-ninja: +b:fedora40-ninja: extends: - - .fedora38_ninja + - .fedora40_ninja - .cmake_build_linux - .cmake_build_artifacts - .linux_x86_64_tags @@ -423,9 +427,9 @@ b:fedora38-ninja: variables: CMAKE_CI_JOB_CONTINUOUS: "true" -b:fedora38-makefiles-symlinked: +b:fedora40-makefiles-symlinked: extends: - - .fedora38_makefiles_symlinked + - .fedora40_makefiles_symlinked - .cmake_build_linux - .cmake_build_artifacts - .linux_x86_64_tags @@ -460,68 +464,54 @@ b:debian12-aarch64-extdeps: variables: CMAKE_CI_JOB_NIGHTLY: "true" -b:fedora38-extdeps: +b:fedora40-extdeps: extends: - - .fedora38_extdeps + - .fedora40_extdeps - .cmake_build_linux_standalone - .linux_x86_64_tags - .run_manually variables: CMAKE_CI_JOB_NIGHTLY: "true" -t:fedora38-ninja: +t:fedora40-ninja: extends: - - .fedora38_ninja + - .fedora40_ninja - .cmake_test_linux - .linux_x86_64_tags_x11 - .cmake_test_artifacts - .run_dependent dependencies: - - b:fedora38-ninja + - b:fedora40-ninja needs: - - b:fedora38-ninja + - b:fedora40-ninja variables: CMAKE_CI_JOB_CONTINUOUS: "true" -t:fedora38-makefiles-symlinked: +t:fedora40-makefiles-symlinked: extends: - - .fedora38_makefiles_symlinked + - .fedora40_makefiles_symlinked - .cmake_test_linux - .linux_x86_64_tags_x11 - .cmake_test_artifacts - .run_dependent dependencies: - - b:fedora38-makefiles-symlinked + - b:fedora40-makefiles-symlinked needs: - - b:fedora38-makefiles-symlinked + - b:fedora40-makefiles-symlinked variables: CMAKE_CI_JOB_NIGHTLY: "true" -t:fedora38-ninja-multi: +t:fedora40-ninja-multi: extends: - - .fedora38_ninja_multi + - .fedora40_ninja_multi - .cmake_test_linux_external - .linux_x86_64_tags - .cmake_junit_artifacts - .run_dependent dependencies: - - t:fedora38-ninja + - t:fedora40-ninja needs: - - t:fedora38-ninja - -t:intel2016-makefiles: - extends: - - .cmake_test_linux_intelclassic_makefiles - variables: - CMAKE_CI_BUILD_NAME: intel2016_makefiles - CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2016-el7 - -t:intel2016u1-makefiles: - extends: - - .cmake_test_linux_intelclassic_makefiles - variables: - CMAKE_CI_BUILD_NAME: intel2016u1_makefiles - CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2016u1-el7 + - t:fedora40-ninja t:intel2016u2-makefiles: extends: @@ -530,62 +520,6 @@ t:intel2016u2-makefiles: CMAKE_CI_BUILD_NAME: intel2016u2_makefiles CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2016u2-el7 -t:intel2017-makefiles: - extends: - - .cmake_test_linux_intelclassic_makefiles - variables: - CMAKE_CI_BUILD_NAME: intel2017_makefiles - CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2017-el7 - -t:intel2017u1-makefiles: - extends: - - .cmake_test_linux_intelclassic_makefiles - variables: - CMAKE_CI_BUILD_NAME: intel2017u1_makefiles - CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2017u1-el7 - -t:intel2017u2-makefiles: - extends: - - .cmake_test_linux_intelclassic_makefiles - variables: - CMAKE_CI_BUILD_NAME: intel2017u2_makefiles - CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2017u2-el7 - -t:intel2017u3-makefiles: - extends: - - .cmake_test_linux_intelclassic_makefiles - variables: - CMAKE_CI_BUILD_NAME: intel2017u3_makefiles - CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2017u3-el7 - -t:intel2017u4-makefiles: - extends: - - .cmake_test_linux_intelclassic_makefiles - variables: - CMAKE_CI_BUILD_NAME: intel2017u4_makefiles - CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2017u4-el7 - -t:intel2017u5-makefiles: - extends: - - .cmake_test_linux_intelclassic_makefiles - variables: - CMAKE_CI_BUILD_NAME: intel2017u5_makefiles - CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2017u5-el7 - -t:intel2017u6-makefiles: - extends: - - .cmake_test_linux_intelclassic_makefiles - variables: - CMAKE_CI_BUILD_NAME: intel2017u6_makefiles - CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2017u6-el7 - -t:intel2017u7-makefiles: - extends: - - .cmake_test_linux_intelclassic_makefiles - variables: - CMAKE_CI_BUILD_NAME: intel2017u7_makefiles - CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2017u7-el7 - t:intel2017u8-makefiles: extends: - .cmake_test_linux_intelclassic_makefiles @@ -593,34 +527,6 @@ t:intel2017u8-makefiles: CMAKE_CI_BUILD_NAME: intel2017u8_makefiles CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2017u8-el7 -t:intel2018-makefiles: - extends: - - .cmake_test_linux_intelclassic_makefiles - variables: - CMAKE_CI_BUILD_NAME: intel2018_makefiles - CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2018-el7 - -t:intel2018u1-makefiles: - extends: - - .cmake_test_linux_intelclassic_makefiles - variables: - CMAKE_CI_BUILD_NAME: intel2018u1_makefiles - CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2018u1-el7 - -t:intel2018u2-makefiles: - extends: - - .cmake_test_linux_intelclassic_makefiles - variables: - CMAKE_CI_BUILD_NAME: intel2018u2_makefiles - CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2018u2-el7 - -t:intel2018u3-makefiles: - extends: - - .cmake_test_linux_intelclassic_makefiles - variables: - CMAKE_CI_BUILD_NAME: intel2018u3_makefiles - CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2018u3-el7 - t:intel2018u4-makefiles: extends: - .cmake_test_linux_intelclassic_makefiles @@ -628,34 +534,6 @@ t:intel2018u4-makefiles: CMAKE_CI_BUILD_NAME: intel2018u4_makefiles CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2018u4-el7 -t:intel2019-makefiles: - extends: - - .cmake_test_linux_intelclassic_makefiles - variables: - CMAKE_CI_BUILD_NAME: intel2019_makefiles - CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2019-el7 - -t:intel2019u1-makefiles: - extends: - - .cmake_test_linux_intelclassic_makefiles - variables: - CMAKE_CI_BUILD_NAME: intel2019u1_makefiles - CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2019u1-el7 - -t:intel2019u2-makefiles: - extends: - - .cmake_test_linux_intelclassic_makefiles - variables: - CMAKE_CI_BUILD_NAME: intel2019u2_makefiles - CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2019u2-el7 - -t:intel2019u3-makefiles: - extends: - - .cmake_test_linux_intelclassic_makefiles - variables: - CMAKE_CI_BUILD_NAME: intel2019u3_makefiles - CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2019u3-el7 - t:intel2019u4-makefiles: extends: - .cmake_test_linux_intelclassic_makefiles @@ -663,20 +541,6 @@ t:intel2019u4-makefiles: CMAKE_CI_BUILD_NAME: intel2019u4_makefiles CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2019u4-el7 -t:intel2020-makefiles: - extends: - - .cmake_test_linux_intelclassic_makefiles - variables: - CMAKE_CI_BUILD_NAME: intel2020_makefiles - CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2020-el8 - -t:intel2020u2-makefiles: - extends: - - .cmake_test_linux_intelclassic_makefiles - variables: - CMAKE_CI_BUILD_NAME: intel2020u2_makefiles - CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2020u2-el8 - t:intel2020u4-makefiles: extends: - .cmake_test_linux_intelclassic_makefiles @@ -754,6 +618,13 @@ t:intel2021.9.0-makefiles: CMAKE_CI_BUILD_NAME: intel2021.9.0_makefiles CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2023.1.0-el8 +t:intel2021.10.0-makefiles: + extends: + - .cmake_test_linux_intelclassic_makefiles + variables: + CMAKE_CI_BUILD_NAME: intel2021.10.0_makefiles + CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2023.2.1-el8 + t:oneapi2021.1.1-makefiles: extends: - .cmake_test_linux_inteloneapi_makefiles @@ -824,6 +695,27 @@ t:oneapi2023.1.0-makefiles: CMAKE_CI_BUILD_NAME: oneapi2023.1.0_makefiles CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2023.1.0-el8 +t:oneapi2023.2.0-makefiles: + extends: + - .cmake_test_linux_inteloneapi_makefiles + variables: + CMAKE_CI_BUILD_NAME: oneapi2023.2.1_makefiles + CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2023.2.1-el8 + +t:oneapi2024.0.0-makefiles: + extends: + - .cmake_test_linux_inteloneapi_makefiles + variables: + CMAKE_CI_BUILD_NAME: oneapi2024.0.0_makefiles + CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2024.0.0-el8 + +t:oneapi2024.1.0-makefiles: + extends: + - .cmake_test_linux_inteloneapi_makefiles + variables: + CMAKE_CI_BUILD_NAME: oneapi2024.1.0_makefiles + CMAKE_CI_INTELCOMPILER_IMAGE_TAG: 2024.1.0-el8 + b:linux-x86_64-package: extends: - .linux_package @@ -874,9 +766,9 @@ u:linux-aarch64-package: ## Sanitizer builds -b:fedora38-asan: +b:fedora40-asan: extends: - - .fedora38_asan + - .fedora40_asan - .cmake_build_linux - .cmake_build_artifacts - .linux_x86_64_tags @@ -884,16 +776,16 @@ b:fedora38-asan: variables: CMAKE_CI_JOB_NIGHTLY: "true" -t:fedora38-asan: +t:fedora40-asan: extends: - - .fedora38_asan + - .fedora40_asan - .cmake_memcheck_linux - .linux_x86_64_tags - .run_dependent dependencies: - - b:fedora38-asan + - b:fedora40-asan needs: - - b:fedora38-asan + - b:fedora40-asan variables: CMAKE_CI_JOB_NIGHTLY: "true" @@ -929,6 +821,16 @@ b:macos-arm64-ninja-symlinked: variables: CMAKE_CI_JOB_NIGHTLY: "true" +b:macos-arm64-curl: + extends: + - .macos_arm64_curl + - .cmake_build_macos + - .cmake_build_artifacts + - .macos_arm64_tags + - .run_manually + variables: + CMAKE_CI_JOB_NIGHTLY: "true" + b:macos-arm64-pch: extends: - .macos_arm64_pch @@ -982,6 +884,19 @@ t:macos-arm64-ninja-symlinked: CMAKE_CI_JOB_NIGHTLY: "true" CMAKE_CI_JOB_NIGHTLY_NINJA: "true" +t:macos-arm64-curl: + extends: + - .macos_arm64_curl + - .cmake_test_macos + - .macos_arm64_tags + - .run_dependent + dependencies: + - b:macos-arm64-curl + needs: + - b:macos-arm64-curl + variables: + CMAKE_CI_JOB_NIGHTLY: "true" + b:macos-x86_64-makefiles: extends: - .macos_x86_64_makefiles @@ -1138,6 +1053,8 @@ b:windows-vs2022-x64-ninja: - .cmake_build_artifacts - .windows_x86_64_tags_nonconcurrent_vs2022 - .run_manually + variables: + CMAKE_CI_JOB_CONTINUOUS: "true" b:windows-vs2022-x64-pch: extends: @@ -1160,6 +1077,7 @@ t:windows-vs2022-x64-ninja: needs: - b:windows-vs2022-x64-ninja variables: + CMAKE_CI_JOB_CONTINUOUS: "true" CMAKE_CI_JOB_NIGHTLY_NINJA: "true" t:windows-vs2022-x64-ninja-multi: @@ -1176,11 +1094,10 @@ t:windows-vs2022-x64-ninja-multi: variables: CMAKE_CI_JOB_NIGHTLY: "true" -t:windows-vs2022-x64: +.t:windows-vs2022-x64: extends: - .windows_vs2022_x64 - .cmake_test_windows_external - - .windows_x86_64_tags_concurrent_vs2022 - .cmake_junit_artifacts - .run_dependent dependencies: @@ -1188,11 +1105,25 @@ t:windows-vs2022-x64: needs: - t:windows-vs2022-x64-ninja +t:windows-vs2022-x64: + extends: + - .t:windows-vs2022-x64 + - .windows_x86_64_tags_concurrent_vs2022 + variables: + CMAKE_CI_JOB_NIGHTLY: "false" + +t:windows-vs2022-x64-nightly: + extends: + - .t:windows-vs2022-x64 + - .windows_x86_64_tags_concurrent_vs2022_android + variables: + CMAKE_CI_JOB_NIGHTLY: "true" + t:windows-vs2019-x64: extends: - .windows_vs2019_x64 - .cmake_test_windows_external - - .windows_x86_64_tags_concurrent_vs2019 + - .windows_x86_64_tags_concurrent_vs2019_android - .cmake_junit_artifacts - .run_dependent dependencies: diff --git a/.gitlab/.gitignore b/.gitlab/.gitignore index 19796effd2c..0558700a61d 100644 --- a/.gitlab/.gitignore +++ b/.gitlab/.gitignore @@ -10,12 +10,19 @@ /mingw /msvc* /ninja* +/nuget /openmp /open-watcom* /orangec /python* /qt* /sccache* +/swift +/ticlang +/tmp /unstable-jom* /watcom -/wix* +/wix3 +/wix4 +/clang-tidy-fixes +/num_warnings.txt diff --git a/.gitlab/artifacts.yml b/.gitlab/artifacts.yml index f4d413b3707..b2315be8843 100644 --- a/.gitlab/artifacts.yml +++ b/.gitlab/artifacts.yml @@ -86,7 +86,6 @@ - ${CMAKE_CI_BUILD_DIR}/cmake-*.zip # Any unsigned packages made. - ${CMAKE_CI_BUILD_DIR}/unsigned/cmake-* - - ${CMAKE_CI_BUILD_DIR}/cdash-build-id reports: annotations: - ${CMAKE_CI_BUILD_DIR}/annotations.json @@ -120,6 +119,8 @@ # Take the sphinx logs. - ${CMAKE_CI_BUILD_DIR}/build-*.log - ${CMAKE_CI_BUILD_DIR}/linkcheck/output.* + # Take the HTML output. + - ${CMAKE_CI_BUILD_DIR}/html/ .cmake_test_artifacts: artifacts: @@ -152,3 +153,10 @@ - ${CMAKE_CI_BUILD_DIR}/html exclude: - ${CMAKE_CI_BUILD_DIR}/html/.buildinfo + +.cmake_tidy_artifacts: + artifacts: + expire_in: 1d + when: always + paths: + - clang-tidy-fixes.patch diff --git a/.gitlab/ci/borland-env.ps1 b/.gitlab/ci/borland-env.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/borland.ps1 b/.gitlab/ci/borland.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/clang-env.ps1 b/.gitlab/ci/clang-env.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/clang.ps1 b/.gitlab/ci/clang.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/cmake-env.ps1 b/.gitlab/ci/cmake-env.ps1 new file mode 100644 index 00000000000..505fa446310 --- /dev/null +++ b/.gitlab/ci/cmake-env.ps1 @@ -0,0 +1,5 @@ +$pwdpath = $pwd.Path +& "$pwsh" -File ".gitlab/ci/cmake.ps1" +Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\cmake\bin;$env:PATH" +cmake --version +$cmake = "cmake" diff --git a/.gitlab/ci/cmake-env.sh b/.gitlab/ci/cmake-env.sh new file mode 100644 index 00000000000..686a78f379f --- /dev/null +++ b/.gitlab/ci/cmake-env.sh @@ -0,0 +1,3 @@ +.gitlab/ci/cmake.sh +export PATH="$PWD/.gitlab/cmake/bin:$PATH" +cmake --version diff --git a/.gitlab/ci/cmake.ps1 b/.gitlab/ci/cmake.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/configure_cuda10.2_clang.cmake b/.gitlab/ci/configure_cuda10.2_clang.cmake index e13ca881d6c..e2d5a9c9f20 100644 --- a/.gitlab/ci/configure_cuda10.2_clang.cmake +++ b/.gitlab/ci/configure_cuda10.2_clang.cmake @@ -1,3 +1,4 @@ set(CMake_TEST_CUDA "Clang" CACHE STRING "") +set(CMake_TEST_CUDA_CUPTI "ON" CACHE STRING "") include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_cuda10.2_nvidia.cmake b/.gitlab/ci/configure_cuda10.2_nvidia.cmake index 519699b0ccf..2cb2950457c 100644 --- a/.gitlab/ci/configure_cuda10.2_nvidia.cmake +++ b/.gitlab/ci/configure_cuda10.2_nvidia.cmake @@ -1,3 +1,4 @@ set(CMake_TEST_CUDA "NVIDIA" CACHE STRING "") +set(CMake_TEST_CUDA_CUPTI "ON" CACHE STRING "") include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_cuda11.6_nvidia.cmake b/.gitlab/ci/configure_cuda11.6_nvidia.cmake index 519699b0ccf..2cb2950457c 100644 --- a/.gitlab/ci/configure_cuda11.6_nvidia.cmake +++ b/.gitlab/ci/configure_cuda11.6_nvidia.cmake @@ -1,3 +1,4 @@ set(CMake_TEST_CUDA "NVIDIA" CACHE STRING "") +set(CMake_TEST_CUDA_CUPTI "ON" CACHE STRING "") include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_cuda12.2_clang.cmake b/.gitlab/ci/configure_cuda12.2_clang.cmake new file mode 100644 index 00000000000..8f10f862d18 --- /dev/null +++ b/.gitlab/ci/configure_cuda12.2_clang.cmake @@ -0,0 +1,4 @@ +set(CMake_TEST_CUDA "Clang" CACHE STRING "") +set(CMake_TEST_CUDA_STANDARDS "03;11;14;17;20;23" CACHE STRING "") + +include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_cuda12.2_nvidia.cmake b/.gitlab/ci/configure_cuda12.2_nvidia.cmake new file mode 100644 index 00000000000..51a2511e085 --- /dev/null +++ b/.gitlab/ci/configure_cuda12.2_nvidia.cmake @@ -0,0 +1,5 @@ +set(CMake_TEST_CUDA "NVIDIA" CACHE STRING "") +set(CMake_TEST_CUDA_CUPTI "ON" CACHE STRING "") +set(CMake_TEST_CUDA_STANDARDS "03;11;14;17;20" CACHE STRING "") + +include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_debian12_aarch64_ninja.cmake b/.gitlab/ci/configure_debian12_aarch64_ninja.cmake index 5b97e4f4ee5..0ebf604ab8a 100644 --- a/.gitlab/ci/configure_debian12_aarch64_ninja.cmake +++ b/.gitlab/ci/configure_debian12_aarch64_ninja.cmake @@ -1,3 +1,6 @@ +set(CMake_TEST_C_STANDARDS "90;99;11;17;23" CACHE STRING "") +set(CMake_TEST_CXX_STANDARDS "98;11;14;17;20;23" CACHE STRING "") + set(CMake_TEST_CTestUpdate_BZR "ON" CACHE BOOL "") set(CMake_TEST_CTestUpdate_CVS "ON" CACHE BOOL "") set(CMake_TEST_CTestUpdate_GIT "ON" CACHE BOOL "") @@ -61,6 +64,9 @@ set(CMake_TEST_FindMPI_Fortran "ON" CACHE BOOL "") set(CMake_TEST_FindMPI "ON" CACHE BOOL "") set(CMake_TEST_FindODBC "ON" CACHE BOOL "") set(CMake_TEST_FindOpenACC "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenACC_C "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenACC_CXX "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenACC_Fortran "ON" CACHE BOOL "") set(CMake_TEST_FindOpenAL "ON" CACHE BOOL "") set(CMake_TEST_FindOpenGL "ON" CACHE BOOL "") set(CMake_TEST_FindOpenMP_C "ON" CACHE BOOL "") @@ -92,6 +98,8 @@ set(CMake_TEST_IPO_WORKS_Fortran "ON" CACHE BOOL "") set(CMake_TEST_JQ "/usr/bin/jq" CACHE PATH "") set(CMake_TEST_Qt5 "ON" CACHE BOOL "") set(CMake_TEST_TLS_VERIFY_URL "https://gitlab.kitware.com" CACHE STRING "") +set(CMake_TEST_TLS_VERIFY_URL_BAD "https://badtls-expired.kitware.com" CACHE STRING "") +set(CMake_TEST_TLS_VERSION "1.3" CACHE STRING "") set(CMake_TEST_UseSWIG "ON" CACHE BOOL "") include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_debian12_makefiles_clang.cmake b/.gitlab/ci/configure_debian12_makefiles_clang.cmake index 20863a2fb08..7cba6f3375f 100644 --- a/.gitlab/ci/configure_debian12_makefiles_clang.cmake +++ b/.gitlab/ci/configure_debian12_makefiles_clang.cmake @@ -1 +1,8 @@ +set(CMake_TEST_C_STANDARDS "90;99;11;17;23" CACHE STRING "") +set(CMake_TEST_CXX_STANDARDS "98;11;14;17;20;23" CACHE STRING "") + +if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") + set(CMake_TEST_TICLANG_TOOLCHAINS "$ENV{CI_PROJECT_DIR}/.gitlab/ticlang" CACHE PATH "") +endif() + include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_debian12_ninja.cmake b/.gitlab/ci/configure_debian12_ninja.cmake index 89c11086b4e..efca7a1d192 100644 --- a/.gitlab/ci/configure_debian12_ninja.cmake +++ b/.gitlab/ci/configure_debian12_ninja.cmake @@ -1,2 +1,4 @@ +set(CMake_TEST_ASM_NASM "ON" CACHE BOOL "") + include("${CMAKE_CURRENT_LIST_DIR}/configure_debian12_ninja_common.cmake") set(CMake_TEST_UseSWIG "ON" CACHE BOOL "") diff --git a/.gitlab/ci/configure_debian12_ninja_clang.cmake b/.gitlab/ci/configure_debian12_ninja_clang.cmake index 20863a2fb08..69f1e7c794d 100644 --- a/.gitlab/ci/configure_debian12_ninja_clang.cmake +++ b/.gitlab/ci/configure_debian12_ninja_clang.cmake @@ -1 +1,5 @@ +if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") + set(CMake_TEST_TICLANG_TOOLCHAINS "$ENV{CI_PROJECT_DIR}/.gitlab/ticlang" CACHE PATH "") +endif() + include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_debian12_ninja_common.cmake b/.gitlab/ci/configure_debian12_ninja_common.cmake index d4d117bf899..0e2ecce160e 100644 --- a/.gitlab/ci/configure_debian12_ninja_common.cmake +++ b/.gitlab/ci/configure_debian12_ninja_common.cmake @@ -1,3 +1,6 @@ +set(CMake_TEST_C_STANDARDS "90;99;11;17;23" CACHE STRING "") +set(CMake_TEST_CXX_STANDARDS "98;11;14;17;20;23" CACHE STRING "") + set(CMake_TEST_CTestUpdate_BZR "ON" CACHE BOOL "") set(CMake_TEST_CTestUpdate_CVS "ON" CACHE BOOL "") set(CMake_TEST_CTestUpdate_GIT "ON" CACHE BOOL "") @@ -8,6 +11,7 @@ if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") endif() set(CMake_TEST_FindALSA "ON" CACHE BOOL "") +set(CMake_TEST_FindBacktrace "ON" CACHE BOOL "") set(CMake_TEST_FindBLAS "All;static=1;Generic" CACHE STRING "") set(CMake_TEST_FindBoost "ON" CACHE BOOL "") set(CMake_TEST_FindBoost_Python "ON" CACHE BOOL "") @@ -65,6 +69,9 @@ set(CMake_TEST_FindMPI_Fortran "ON" CACHE BOOL "") set(CMake_TEST_FindMPI "ON" CACHE BOOL "") set(CMake_TEST_FindODBC "ON" CACHE BOOL "") set(CMake_TEST_FindOpenACC "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenACC_C "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenACC_CXX "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenACC_Fortran "ON" CACHE BOOL "") set(CMake_TEST_FindOpenAL "ON" CACHE BOOL "") set(CMake_TEST_FindOpenGL "ON" CACHE BOOL "") set(CMake_TEST_FindOpenMP_C "ON" CACHE BOOL "") @@ -90,6 +97,8 @@ set(CMake_TEST_FindwxWidgets "ON" CACHE BOOL "") set(CMake_TEST_FindX11 "ON" CACHE BOOL "") set(CMake_TEST_FindXalanC "ON" CACHE BOOL "") set(CMake_TEST_FindXercesC "ON" CACHE BOOL "") + +set(CMake_TEST_ELF_LARGE "ON" CACHE BOOL "") set(CMake_TEST_Fortran_SUBMODULES "ON" CACHE BOOL "") set(CMake_TEST_IPO_WORKS_C "ON" CACHE BOOL "") set(CMake_TEST_IPO_WORKS_CXX "ON" CACHE BOOL "") @@ -97,6 +106,8 @@ set(CMake_TEST_IPO_WORKS_Fortran "ON" CACHE BOOL "") set(CMake_TEST_JQ "/usr/bin/jq" CACHE PATH "") set(CMake_TEST_Qt5 "ON" CACHE BOOL "") set(CMake_TEST_TLS_VERIFY_URL "https://gitlab.kitware.com" CACHE STRING "") +set(CMake_TEST_TLS_VERIFY_URL_BAD "https://badtls-expired.kitware.com" CACHE STRING "") +set(CMake_TEST_TLS_VERSION "1.3" CACHE STRING "") if (NOT "$ENV{SWIFTC}" STREQUAL "") set(CMAKE_Swift_COMPILER "$ENV{SWIFTC}" CACHE FILEPATH "") diff --git a/.gitlab/ci/configure_fedora38_clang_analyzer.cmake b/.gitlab/ci/configure_fedora38_clang_analyzer.cmake deleted file mode 100644 index c11eef14d48..00000000000 --- a/.gitlab/ci/configure_fedora38_clang_analyzer.cmake +++ /dev/null @@ -1,3 +0,0 @@ -set(configure_no_sccache 1) - -include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora38_common.cmake") diff --git a/.gitlab/ci/configure_fedora38_common_clang.cmake b/.gitlab/ci/configure_fedora38_common_clang.cmake deleted file mode 100644 index 70c9df9dcf4..00000000000 --- a/.gitlab/ci/configure_fedora38_common_clang.cmake +++ /dev/null @@ -1,6 +0,0 @@ -set(CMAKE_Fortran_COMPILER "/usr/bin/flang-new" CACHE FILEPATH "") -set(CMAKE_Fortran_COMPILER_ID "LLVMFlang" CACHE STRING "") -set(CMAKE_Fortran_COMPILER_SUPPORTS_F90 "1" CACHE BOOL "") -set(CMAKE_Fortran_FLAGS "-flang-experimental-exec" CACHE STRING "") - -include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_fedora38_ninja_clang.cmake b/.gitlab/ci/configure_fedora38_ninja_clang.cmake deleted file mode 100644 index 848c5b67394..00000000000 --- a/.gitlab/ci/configure_fedora38_ninja_clang.cmake +++ /dev/null @@ -1,4 +0,0 @@ -set(CMake_TEST_MODULE_COMPILATION "named,compile_commands,collation,partitions,internal_partitions,export_bmi,install_bmi,shared,bmionly" CACHE STRING "") -set(CMake_TEST_MODULE_COMPILATION_RULES "${CMAKE_CURRENT_LIST_DIR}/cxx_modules_rules_clang.cmake" CACHE STRING "") - -include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora38_common_clang.cmake") diff --git a/.gitlab/ci/configure_fedora38_ninja_multi_clang.cmake b/.gitlab/ci/configure_fedora38_ninja_multi_clang.cmake deleted file mode 100644 index 848c5b67394..00000000000 --- a/.gitlab/ci/configure_fedora38_ninja_multi_clang.cmake +++ /dev/null @@ -1,4 +0,0 @@ -set(CMake_TEST_MODULE_COMPILATION "named,compile_commands,collation,partitions,internal_partitions,export_bmi,install_bmi,shared,bmionly" CACHE STRING "") -set(CMake_TEST_MODULE_COMPILATION_RULES "${CMAKE_CURRENT_LIST_DIR}/cxx_modules_rules_clang.cmake" CACHE STRING "") - -include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora38_common_clang.cmake") diff --git a/.gitlab/ci/configure_fedora38_hip_radeon.cmake b/.gitlab/ci/configure_fedora39_hip_radeon.cmake similarity index 100% rename from .gitlab/ci/configure_fedora38_hip_radeon.cmake rename to .gitlab/ci/configure_fedora39_hip_radeon.cmake diff --git a/.gitlab/ci/configure_fedora38_asan.cmake b/.gitlab/ci/configure_fedora40_asan.cmake similarity index 65% rename from .gitlab/ci/configure_fedora38_asan.cmake rename to .gitlab/ci/configure_fedora40_asan.cmake index 8eae500363a..ccdba4e2b5b 100644 --- a/.gitlab/ci/configure_fedora38_asan.cmake +++ b/.gitlab/ci/configure_fedora40_asan.cmake @@ -1,4 +1,4 @@ set(CMAKE_C_FLAGS "-fsanitize=address" CACHE STRING "") set(CMAKE_CXX_FLAGS "-fsanitize=address" CACHE STRING "") -include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora38_common.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora40_common.cmake") diff --git a/.gitlab/ci/configure_fedora40_clang_analyzer.cmake b/.gitlab/ci/configure_fedora40_clang_analyzer.cmake new file mode 100644 index 00000000000..c21012680ad --- /dev/null +++ b/.gitlab/ci/configure_fedora40_clang_analyzer.cmake @@ -0,0 +1,3 @@ +set(configure_no_sccache 1) + +include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora40_common.cmake") diff --git a/.gitlab/ci/configure_fedora38_common.cmake b/.gitlab/ci/configure_fedora40_common.cmake similarity index 100% rename from .gitlab/ci/configure_fedora38_common.cmake rename to .gitlab/ci/configure_fedora40_common.cmake diff --git a/.gitlab/ci/configure_fedora40_common_clang.cmake b/.gitlab/ci/configure_fedora40_common_clang.cmake new file mode 100644 index 00000000000..a4ae3f3f308 --- /dev/null +++ b/.gitlab/ci/configure_fedora40_common_clang.cmake @@ -0,0 +1,17 @@ +set(CMAKE_Fortran_COMPILER "/usr/bin/flang-new" CACHE FILEPATH "") +set(CMAKE_Fortran_COMPILER_ID "LLVMFlang" CACHE STRING "") +set(CMAKE_Fortran_COMPILER_SUPPORTS_F90 "1" CACHE BOOL "") + +set(CMake_TEST_C_STANDARDS "90;99;11;17;23" CACHE STRING "") +set(CMake_TEST_CXX_STANDARDS "98;11;14;17;20;23;26" CACHE STRING "") + +set(CMake_TEST_FindOpenACC "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenACC_C "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenACC_CXX "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenACC_Fortran "OFF" CACHE BOOL "") # flang-new fails producing LLVM IR +set(CMake_TEST_FindOpenMP_C "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenMP_CXX "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenMP_Fortran "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenMP "ON" CACHE BOOL "") + +include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_fedora38_extdeps.cmake b/.gitlab/ci/configure_fedora40_extdeps.cmake similarity index 100% rename from .gitlab/ci/configure_fedora38_extdeps.cmake rename to .gitlab/ci/configure_fedora40_extdeps.cmake diff --git a/.gitlab/ci/configure_fedora38_makefiles.cmake b/.gitlab/ci/configure_fedora40_makefiles.cmake similarity index 89% rename from .gitlab/ci/configure_fedora38_makefiles.cmake rename to .gitlab/ci/configure_fedora40_makefiles.cmake index a3881cf8175..21a5be5e821 100644 --- a/.gitlab/ci/configure_fedora38_makefiles.cmake +++ b/.gitlab/ci/configure_fedora40_makefiles.cmake @@ -1,3 +1,6 @@ +set(CMake_TEST_C_STANDARDS "90;99;11;17;23" CACHE STRING "") +set(CMake_TEST_CXX_STANDARDS "98;11;14;17;20;23;26" CACHE STRING "") + set(CMake_TEST_CTestUpdate_BZR "ON" CACHE BOOL "") set(CMake_TEST_CTestUpdate_GIT "ON" CACHE BOOL "") set(CMake_TEST_CTestUpdate_HG "ON" CACHE BOOL "") @@ -6,7 +9,9 @@ if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") set(CMake_TEST_CTestUpdate_P4 "ON" CACHE BOOL "") endif() +set(CMake_TEST_ASM_NASM "ON" CACHE BOOL "") set(CMake_TEST_FindALSA "ON" CACHE BOOL "") +set(CMake_TEST_FindBacktrace "ON" CACHE BOOL "") set(CMake_TEST_FindBLAS "All;static=1;Generic" CACHE STRING "") set(CMake_TEST_FindBoost "ON" CACHE BOOL "") set(CMake_TEST_FindBoost_Python "ON" CACHE BOOL "") @@ -44,6 +49,7 @@ set(CMake_TEST_FindIconv "ON" CACHE BOOL "") set(CMake_TEST_FindICU "ON" CACHE BOOL "") set(CMake_TEST_FindImageMagick "ON" CACHE BOOL "") set(CMake_TEST_FindIntl "ON" CACHE BOOL "") +set(CMake_TEST_FindJasper "ON" CACHE BOOL "") set(CMake_TEST_FindJNI "ON" CACHE BOOL "") set(CMake_TEST_FindJPEG "ON" CACHE BOOL "") set(CMake_TEST_FindJsonCpp "ON" CACHE BOOL "") @@ -57,10 +63,13 @@ set(CMake_TEST_FindLibXslt "ON" CACHE BOOL "") set(CMake_TEST_FindMPI_C "ON" CACHE BOOL "") set(CMake_TEST_FindMPI_CXX "ON" CACHE BOOL "") set(CMake_TEST_FindMPI_Fortran "ON" CACHE BOOL "") -set(CMake_TEST_FindMPI_ENVMOD "PATH=path_list_prepend:/usr/lib64/mpich/bin;LD_LIBRARY_PATH=path_list_prepend:/usr/lib64/mpich/lib" CACHE STRING "") +set(CMake_TEST_FindMPI_ENVMOD "PATH=path_list_prepend:/usr/lib64/mpich/bin;LD_LIBRARY_PATH=path_list_prepend:/usr/lib64/mpich/lib;FI_PROVIDER=set:tcp" CACHE STRING "") set(CMake_TEST_FindMPI "ON" CACHE BOOL "") set(CMake_TEST_FindODBC "ON" CACHE BOOL "") set(CMake_TEST_FindOpenACC "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenACC_C "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenACC_CXX "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenACC_Fortran "ON" CACHE BOOL "") set(CMake_TEST_FindOpenAL "ON" CACHE BOOL "") set(CMake_TEST_FindOpenGL "ON" CACHE BOOL "") set(CMake_TEST_FindOpenMP_C "ON" CACHE BOOL "") @@ -89,6 +98,8 @@ set(CMake_TEST_FindwxWidgets "ON" CACHE BOOL "") set(CMake_TEST_FindX11 "ON" CACHE BOOL "") set(CMake_TEST_FindXalanC "ON" CACHE BOOL "") set(CMake_TEST_FindXercesC "ON" CACHE BOOL "") + +set(CMake_TEST_ELF_LARGE "ON" CACHE BOOL "") set(CMake_TEST_Fortran_SUBMODULES "ON" CACHE BOOL "") set(CMake_TEST_IPO_WORKS_C "ON" CACHE BOOL "") set(CMake_TEST_IPO_WORKS_CXX "ON" CACHE BOOL "") @@ -98,6 +109,8 @@ if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") endif() set(CMake_TEST_Qt5 "ON" CACHE BOOL "") set(CMake_TEST_TLS_VERIFY_URL "https://gitlab.kitware.com" CACHE STRING "") +set(CMake_TEST_TLS_VERIFY_URL_BAD "https://badtls-expired.kitware.com" CACHE STRING "") +set(CMake_TEST_TLS_VERSION "1.3" CACHE STRING "") set(CMake_TEST_UseSWIG "ON" CACHE BOOL "") include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_fedora38_makefiles_clang.cmake b/.gitlab/ci/configure_fedora40_makefiles_clang.cmake similarity index 68% rename from .gitlab/ci/configure_fedora38_makefiles_clang.cmake rename to .gitlab/ci/configure_fedora40_makefiles_clang.cmake index 3ac23bebb9a..d5739c3b699 100644 --- a/.gitlab/ci/configure_fedora38_makefiles_clang.cmake +++ b/.gitlab/ci/configure_fedora40_makefiles_clang.cmake @@ -2,4 +2,4 @@ if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") set(CMAKE_TESTS_CDASH_SERVER "https://open.cdash.org" CACHE STRING "") endif() -include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora38_common_clang.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora40_common_clang.cmake") diff --git a/.gitlab/ci/configure_fedora38_makefiles_symlinked.cmake b/.gitlab/ci/configure_fedora40_makefiles_symlinked.cmake similarity index 53% rename from .gitlab/ci/configure_fedora38_makefiles_symlinked.cmake rename to .gitlab/ci/configure_fedora40_makefiles_symlinked.cmake index 177bbcf59d8..6a677fd1367 100644 --- a/.gitlab/ci/configure_fedora38_makefiles_symlinked.cmake +++ b/.gitlab/ci/configure_fedora40_makefiles_symlinked.cmake @@ -1,2 +1,2 @@ include("${CMAKE_CURRENT_LIST_DIR}/configure_symlinked_common.cmake") -include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora38_common.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora40_common.cmake") diff --git a/.gitlab/ci/configure_fedora38_ninja.cmake b/.gitlab/ci/configure_fedora40_ninja.cmake similarity index 57% rename from .gitlab/ci/configure_fedora38_ninja.cmake rename to .gitlab/ci/configure_fedora40_ninja.cmake index ac6b9f692b2..ae968a3b4eb 100644 --- a/.gitlab/ci/configure_fedora38_ninja.cmake +++ b/.gitlab/ci/configure_fedora40_ninja.cmake @@ -2,7 +2,10 @@ set(CMake_TEST_GUI "ON" CACHE BOOL "") if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") set(CMake_TEST_ISPC "ON" CACHE STRING "") endif() +set(CMake_TEST_MODULE_COMPILATION "named,compile_commands,collation,partitions,internal_partitions,export_bmi,install_bmi,shared,bmionly" CACHE STRING "") set(CMake_TEST_TLS_VERIFY_URL "https://gitlab.kitware.com" CACHE STRING "") +set(CMake_TEST_TLS_VERIFY_URL_BAD "https://badtls-expired.kitware.com" CACHE STRING "") +set(CMake_TEST_TLS_VERSION "1.3" CACHE STRING "") # "Release" flags without "-DNDEBUG" so we get assertions. set(CMAKE_C_FLAGS_RELEASE "-O3" CACHE STRING "") @@ -11,4 +14,4 @@ set(CMAKE_CXX_FLAGS_RELEASE "-O3" CACHE STRING "") # Cover compilation with C++11 only and not higher standards. set(CMAKE_CXX_STANDARD "11" CACHE STRING "") -include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora38_common.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora40_common.cmake") diff --git a/.gitlab/ci/configure_fedora40_ninja_clang.cmake b/.gitlab/ci/configure_fedora40_ninja_clang.cmake new file mode 100644 index 00000000000..c760603b98e --- /dev/null +++ b/.gitlab/ci/configure_fedora40_ninja_clang.cmake @@ -0,0 +1,3 @@ +set(CMake_TEST_MODULE_COMPILATION "named,compile_commands,collation,partitions,internal_partitions,export_bmi,install_bmi,shared,bmionly" CACHE STRING "") + +include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora40_common_clang.cmake") diff --git a/.gitlab/ci/configure_fedora38_ninja_multi.cmake b/.gitlab/ci/configure_fedora40_ninja_multi.cmake similarity index 51% rename from .gitlab/ci/configure_fedora38_ninja_multi.cmake rename to .gitlab/ci/configure_fedora40_ninja_multi.cmake index 94af721f239..f77606efe7c 100644 --- a/.gitlab/ci/configure_fedora38_ninja_multi.cmake +++ b/.gitlab/ci/configure_fedora40_ninja_multi.cmake @@ -1,5 +1,6 @@ if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") set(CMake_TEST_ISPC "ON" CACHE STRING "") endif() +set(CMake_TEST_MODULE_COMPILATION "named,compile_commands,collation,partitions,internal_partitions,export_bmi,install_bmi,shared,bmionly" CACHE STRING "") include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_fedora40_ninja_multi_clang.cmake b/.gitlab/ci/configure_fedora40_ninja_multi_clang.cmake new file mode 100644 index 00000000000..c760603b98e --- /dev/null +++ b/.gitlab/ci/configure_fedora40_ninja_multi_clang.cmake @@ -0,0 +1,3 @@ +set(CMake_TEST_MODULE_COMPILATION "named,compile_commands,collation,partitions,internal_partitions,export_bmi,install_bmi,shared,bmionly" CACHE STRING "") + +include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora40_common_clang.cmake") diff --git a/.gitlab/ci/configure_fedora38_sphinx.cmake b/.gitlab/ci/configure_fedora40_sphinx.cmake similarity index 100% rename from .gitlab/ci/configure_fedora38_sphinx.cmake rename to .gitlab/ci/configure_fedora40_sphinx.cmake diff --git a/.gitlab/ci/configure_fedora38_sphinx_package.cmake b/.gitlab/ci/configure_fedora40_sphinx_package.cmake similarity index 100% rename from .gitlab/ci/configure_fedora38_sphinx_package.cmake rename to .gitlab/ci/configure_fedora40_sphinx_package.cmake diff --git a/.gitlab/ci/configure_fedora38_tidy.cmake b/.gitlab/ci/configure_fedora40_tidy.cmake similarity index 58% rename from .gitlab/ci/configure_fedora38_tidy.cmake rename to .gitlab/ci/configure_fedora40_tidy.cmake index 5b062da3732..037732c1482 100644 --- a/.gitlab/ci/configure_fedora38_tidy.cmake +++ b/.gitlab/ci/configure_fedora40_tidy.cmake @@ -1,5 +1,6 @@ set(CMake_RUN_CLANG_TIDY ON CACHE BOOL "") set(CMake_USE_CLANG_TIDY_MODULE ON CACHE BOOL "") set(CMake_CLANG_TIDY_MODULE "$ENV{CI_PROJECT_DIR}/Utilities/ClangTidyModule/build/libcmake-clang-tidy-module.so" CACHE FILEPATH "") +set(CMake_CLANG_TIDY_EXPORT_FIXES_DIR "$ENV{CI_PROJECT_DIR}/.gitlab/clang-tidy-fixes" CACHE PATH "") -include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora38_common.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora40_common.cmake") diff --git a/.gitlab/ci/configure_linux_gcc_cxx_modules_ninja.cmake b/.gitlab/ci/configure_linux_gcc_cxx_modules_ninja.cmake deleted file mode 100644 index f0ba9ebad44..00000000000 --- a/.gitlab/ci/configure_linux_gcc_cxx_modules_ninja.cmake +++ /dev/null @@ -1,3 +0,0 @@ -set(CMake_TEST_MODULE_COMPILATION "named,compile_commands,collation,partitions,internal_partitions,export_bmi,install_bmi,bmionly" CACHE STRING "") - -include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_linux_gcc_cxx_modules_ninja_multi.cmake b/.gitlab/ci/configure_linux_gcc_cxx_modules_ninja_multi.cmake deleted file mode 100644 index f0ba9ebad44..00000000000 --- a/.gitlab/ci/configure_linux_gcc_cxx_modules_ninja_multi.cmake +++ /dev/null @@ -1,3 +0,0 @@ -set(CMake_TEST_MODULE_COMPILATION "named,compile_commands,collation,partitions,internal_partitions,export_bmi,install_bmi,bmionly" CACHE STRING "") - -include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_macos_arm64_curl.cmake b/.gitlab/ci/configure_macos_arm64_curl.cmake new file mode 100644 index 00000000000..af498736800 --- /dev/null +++ b/.gitlab/ci/configure_macos_arm64_curl.cmake @@ -0,0 +1,12 @@ +# Build with our vendored curl instead of the default system version. +set(CMAKE_USE_SYSTEM_CURL "OFF" CACHE BOOL "") + +set(CMake_TEST_TLS_VERIFY_URL "https://gitlab.kitware.com" CACHE STRING "") +set(CMake_TEST_TLS_VERIFY_URL_BAD "https://badtls-expired.kitware.com" CACHE STRING "") + +# Test that our vendored curl accepts CURL_SSLVERSION_TLSv1_3. It is passed +# through to Secure Transport, but macOS does not actually enforce it. +set(CMake_TEST_TLS_VERSION "1.3" CACHE STRING "") + +include("${CMAKE_CURRENT_LIST_DIR}/configure_macos_common.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake") diff --git a/.gitlab/ci/configure_macos_arm64_ninja.cmake b/.gitlab/ci/configure_macos_arm64_ninja.cmake index f2068a12b8c..de0ffc0aaf1 100644 --- a/.gitlab/ci/configure_macos_arm64_ninja.cmake +++ b/.gitlab/ci/configure_macos_arm64_ninja.cmake @@ -1,8 +1,14 @@ +set(CMake_TEST_C_STANDARDS "90;99;11;17;23" CACHE STRING "") +set(CMake_TEST_CXX_STANDARDS "98;11;14;17;20;23" CACHE STRING "") + set(CMake_TEST_FindOpenAL "ON" CACHE BOOL "") set(CMake_TEST_FindOpenMP "ON" CACHE BOOL "") set(CMake_TEST_FindOpenMP_C "ON" CACHE BOOL "") set(CMake_TEST_FindOpenMP_CXX "ON" CACHE BOOL "") set(CMake_TEST_GUI "ON" CACHE BOOL "") set(CMake_TEST_TLS_VERIFY_URL "https://gitlab.kitware.com" CACHE STRING "") +set(CMake_TEST_TLS_VERIFY_URL_BAD "https://badtls-expired.kitware.com" CACHE STRING "") +set(CMake_TEST_TLS_VERSION "1.2" CACHE STRING "") + include("${CMAKE_CURRENT_LIST_DIR}/configure_macos_common.cmake") include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake") diff --git a/.gitlab/ci/configure_macos_x86_64_makefiles.cmake b/.gitlab/ci/configure_macos_x86_64_makefiles.cmake index 5d1620d85bf..43505dbdc41 100644 --- a/.gitlab/ci/configure_macos_x86_64_makefiles.cmake +++ b/.gitlab/ci/configure_macos_x86_64_makefiles.cmake @@ -7,6 +7,8 @@ if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") set(CMake_TEST_ISPC "ON" CACHE STRING "") endif() set(CMake_TEST_TLS_VERIFY_URL "https://gitlab.kitware.com" CACHE STRING "") +set(CMake_TEST_TLS_VERIFY_URL_BAD "https://badtls-expired.kitware.com" CACHE STRING "") +set(CMake_TEST_TLS_VERSION "1.2" CACHE STRING "") include("${CMAKE_CURRENT_LIST_DIR}/configure_macos_common.cmake") include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake") diff --git a/.gitlab/ci/configure_macos_x86_64_ninja.cmake b/.gitlab/ci/configure_macos_x86_64_ninja.cmake index 5d1620d85bf..83d1e2c3043 100644 --- a/.gitlab/ci/configure_macos_x86_64_ninja.cmake +++ b/.gitlab/ci/configure_macos_x86_64_ninja.cmake @@ -1,3 +1,6 @@ +set(CMake_TEST_C_STANDARDS "90;99;11;17;23" CACHE STRING "") +set(CMake_TEST_CXX_STANDARDS "98;11;14;17;20;23" CACHE STRING "") + set(CMake_TEST_FindOpenAL "ON" CACHE BOOL "") set(CMake_TEST_FindOpenMP "ON" CACHE BOOL "") set(CMake_TEST_FindOpenMP_C "ON" CACHE BOOL "") @@ -7,6 +10,8 @@ if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") set(CMake_TEST_ISPC "ON" CACHE STRING "") endif() set(CMake_TEST_TLS_VERIFY_URL "https://gitlab.kitware.com" CACHE STRING "") +set(CMake_TEST_TLS_VERIFY_URL_BAD "https://badtls-expired.kitware.com" CACHE STRING "") +set(CMake_TEST_TLS_VERSION "1.2" CACHE STRING "") include("${CMAKE_CURRENT_LIST_DIR}/configure_macos_common.cmake") include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake") diff --git a/.gitlab/ci/configure_nvhpc_ninja.cmake b/.gitlab/ci/configure_nvhpc_ninja.cmake index ca8ba932f59..07e47c45a85 100644 --- a/.gitlab/ci/configure_nvhpc_ninja.cmake +++ b/.gitlab/ci/configure_nvhpc_ninja.cmake @@ -1,4 +1,5 @@ set(CMake_TEST_CUDA "NVIDIA" CACHE STRING "") +set(CMake_TEST_CUDA_CUPTI "ON" CACHE STRING "") set(configure_no_sccache 1) diff --git a/.gitlab/ci/configure_windows_arm64_vs2022_ninja.cmake b/.gitlab/ci/configure_windows_arm64_vs2022_ninja.cmake index a12ee6cbb11..64a89139cd5 100644 --- a/.gitlab/ci/configure_windows_arm64_vs2022_ninja.cmake +++ b/.gitlab/ci/configure_windows_arm64_vs2022_ninja.cmake @@ -1,8 +1,12 @@ # Qt host tools are not yet available natively on windows-arm64. set(CMake_TEST_GUI "OFF" CACHE BOOL "") -set(CMake_TEST_TLS_VERIFY_URL "https://gitlab.kitware.com" CACHE STRING "") set(BUILD_QtDialog "OFF" CACHE BOOL "") set(CMAKE_PREFIX_PATH "" CACHE STRING "") +set(CMake_TEST_TLS_VERIFY_URL "https://gitlab.kitware.com" CACHE STRING "") +set(CMake_TEST_TLS_VERIFY_URL_BAD "https://badtls-expired.kitware.com" CACHE STRING "") +set(CMake_TEST_TLS_VERSION "1.2" CACHE STRING "") + include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_msvc_cxx_modules_common.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_wix_common.cmake") include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_vs_common_ninja.cmake") diff --git a/.gitlab/ci/configure_windows_clang_common.cmake b/.gitlab/ci/configure_windows_clang_common.cmake index 55dce1d3ed6..89d0c9ce793 100644 --- a/.gitlab/ci/configure_windows_clang_common.cmake +++ b/.gitlab/ci/configure_windows_clang_common.cmake @@ -1,3 +1,16 @@ +if("$ENV{CMAKE_CI_BUILD_NAME}" MATCHES "(^|_)gnu(_|$)") + set(CMake_TEST_C_STANDARDS "90;99;11;17;23" CACHE STRING "") + set(CMake_TEST_CXX_STANDARDS "98;11;14;17;20;23;26" CACHE STRING "") +else() + # FIXME: Implement C23 and C++23 support for clang-cl. + set(CMake_TEST_C_STANDARDS "90;99;11;17" CACHE STRING "") + set(CMake_TEST_CXX_STANDARDS "98;11;14;17;20" CACHE STRING "") +endif() + +set(CMake_TEST_FindOpenMP "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenMP_C "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenMP_CXX "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenMP_Fortran "OFF" CACHE BOOL "") set(CMake_TEST_Java OFF CACHE BOOL "") set(configure_no_sccache 1) diff --git a/.gitlab/ci/configure_windows_clang_ninja.cmake b/.gitlab/ci/configure_windows_clang_ninja.cmake index 8a65eef1560..fcb2d461b23 100644 --- a/.gitlab/ci/configure_windows_clang_ninja.cmake +++ b/.gitlab/ci/configure_windows_clang_ninja.cmake @@ -1,5 +1,4 @@ if("$ENV{CMAKE_CI_BUILD_NAME}" MATCHES "(^|_)gnu(_|$)") set(CMake_TEST_MODULE_COMPILATION "named,compile_commands,collation,partitions,internal_partitions,export_bmi,install_bmi,shared,bmionly" CACHE STRING "") - set(CMake_TEST_MODULE_COMPILATION_RULES "${CMAKE_CURRENT_LIST_DIR}/cxx_modules_rules_clang.cmake" CACHE STRING "") endif() include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_clang_common.cmake") diff --git a/.gitlab/ci/configure_windows_i386_package.cmake b/.gitlab/ci/configure_windows_i386_package.cmake index 65e1dcb345d..c80ebcce2e9 100644 --- a/.gitlab/ci/configure_windows_i386_package.cmake +++ b/.gitlab/ci/configure_windows_i386_package.cmake @@ -1,6 +1,9 @@ # CPack package file name component for this platform. set(CPACK_SYSTEM_NAME "windows-i386" CACHE STRING "") +# Tell WiX to package for this architecture. +set(CPACK_WIX_ARCHITECTURE "x86" CACHE STRING "") + # Use APIs from at most Windows 7 set(CMAKE_C_FLAGS "-D_WIN32_WINNT=0x601 -DNTDDI_VERSION=0x06010000" CACHE STRING "") set(CMAKE_CXX_FLAGS "-GR -EHsc -D_WIN32_WINNT=0x601 -DNTDDI_VERSION=0x06010000" CACHE STRING "") diff --git a/.gitlab/ci/configure_windows_intelcompiler_common.cmake b/.gitlab/ci/configure_windows_intelcompiler_common.cmake index 55dce1d3ed6..0777eaf8d33 100644 --- a/.gitlab/ci/configure_windows_intelcompiler_common.cmake +++ b/.gitlab/ci/configure_windows_intelcompiler_common.cmake @@ -1,3 +1,7 @@ +set(CMake_TEST_FindOpenMP "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenMP_C "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenMP_CXX "ON" CACHE BOOL "") +set(CMake_TEST_FindOpenMP_Fortran "ON" CACHE BOOL "") set(CMake_TEST_Java OFF CACHE BOOL "") set(configure_no_sccache 1) diff --git a/.gitlab/ci/configure_windows_msvc_common.cmake b/.gitlab/ci/configure_windows_msvc_common.cmake index 6d66a050245..946eca75de0 100644 --- a/.gitlab/ci/configure_windows_msvc_common.cmake +++ b/.gitlab/ci/configure_windows_msvc_common.cmake @@ -1,2 +1,4 @@ +set(CMake_TEST_Java OFF CACHE BOOL "") + set(configure_no_sccache 1) include("${CMAKE_CURRENT_LIST_DIR}/configure_external_test.cmake") diff --git a/.gitlab/ci/configure_windows_msvc_cxx_modules_common.cmake b/.gitlab/ci/configure_windows_msvc_cxx_modules_common.cmake index e378d627295..207f2a577d4 100644 --- a/.gitlab/ci/configure_windows_msvc_cxx_modules_common.cmake +++ b/.gitlab/ci/configure_windows_msvc_cxx_modules_common.cmake @@ -1 +1 @@ -set(CMake_TEST_MODULE_COMPILATION "named,compile_commands,collation,partitions,internal_partitions,shared,export_bmi,install_bmi,bmionly" CACHE STRING "") +set(CMake_TEST_MODULE_COMPILATION "named,compile_commands,collation,partitions,internal_partitions,shared,export_bmi,install_bmi,bmionly,import_std23" CACHE STRING "") diff --git a/.gitlab/ci/configure_windows_package_common.cmake b/.gitlab/ci/configure_windows_package_common.cmake index 541a5414f1d..11bfad5b6fd 100644 --- a/.gitlab/ci/configure_windows_package_common.cmake +++ b/.gitlab/ci/configure_windows_package_common.cmake @@ -19,6 +19,8 @@ set(CMake_TEST_Qt5 OFF CACHE BOOL "") set(CMake_TEST_Qt6 OFF CACHE BOOL "") set(Python_FIND_REGISTRY NEVER CACHE STRING "") +set(CMake_BUILD_WIX_CUSTOM_ACTION ON CACHE BOOL "") + set(CMake_CPACK_CUSTOM_SCRIPT "${CMAKE_CURRENT_LIST_DIR}/CMakeCPack.cmake" CACHE FILEPATH "") include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake") diff --git a/.gitlab/ci/configure_windows_vs2019_x64.cmake b/.gitlab/ci/configure_windows_vs2019_x64.cmake index b859525eb66..e4795b94cae 100644 --- a/.gitlab/ci/configure_windows_vs2019_x64.cmake +++ b/.gitlab/ci/configure_windows_vs2019_x64.cmake @@ -1,4 +1,5 @@ if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") + set(CMake_TEST_ANDROID_VS16 ON CACHE BOOL "") set(CMAKE_TESTS_CDASH_SERVER "https://open.cdash.org" CACHE STRING "") endif() diff --git a/.gitlab/ci/configure_windows_vs2022_x64.cmake b/.gitlab/ci/configure_windows_vs2022_x64.cmake index 51ee514eb25..c29a9ec03e3 100644 --- a/.gitlab/ci/configure_windows_vs2022_x64.cmake +++ b/.gitlab/ci/configure_windows_vs2022_x64.cmake @@ -1,3 +1,7 @@ +if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") + set(CMake_TEST_ANDROID_VS17 ON CACHE BOOL "") +endif() + set(CMake_TEST_MODULE_COMPILATION "named,partitions,internal_partitions,shared" CACHE STRING "") include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_msvc_cxx_modules_common.cmake") diff --git a/.gitlab/ci/configure_windows_vs2022_x64_ninja.cmake b/.gitlab/ci/configure_windows_vs2022_x64_ninja.cmake index 54abf722a4b..d2064e6b8b6 100644 --- a/.gitlab/ci/configure_windows_vs2022_x64_ninja.cmake +++ b/.gitlab/ci/configure_windows_vs2022_x64_ninja.cmake @@ -1,8 +1,17 @@ +set(CMake_TEST_C_STANDARDS "90;99;11;17" CACHE STRING "") +set(CMake_TEST_CXX_STANDARDS "98;11;14;17;20;23" CACHE STRING "") + if (NOT "$ENV{CMAKE_CI_NIGHTLY}" STREQUAL "") set(CMake_TEST_CPACK_INNOSETUP "ON" CACHE STRING "") + set(CMake_TEST_CPACK_NUGET "ON" CACHE STRING "") set(CMake_TEST_ISPC "ON" CACHE STRING "") + set(CMake_TEST_Swift "ON" CACHE STRING "") endif() + set(CMake_TEST_TLS_VERIFY_URL "https://gitlab.kitware.com" CACHE STRING "") +set(CMake_TEST_TLS_VERIFY_URL_BAD "https://badtls-expired.kitware.com" CACHE STRING "") +set(CMake_TEST_TLS_VERSION "1.2" CACHE STRING "") include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_msvc_cxx_modules_common.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_wix_common.cmake") include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_vs_common_ninja.cmake") diff --git a/.gitlab/ci/configure_windows_wix_common.cmake b/.gitlab/ci/configure_windows_wix_common.cmake new file mode 100644 index 00000000000..4219c41a48a --- /dev/null +++ b/.gitlab/ci/configure_windows_wix_common.cmake @@ -0,0 +1,5 @@ +get_filename_component(wix3_dir "${CMAKE_CURRENT_LIST_DIR}/../wix3" ABSOLUTE) +set(CMake_TEST_CPACK_WIX3 "${wix3_dir}" CACHE PATH "") + +get_filename_component(wix4_dir "${CMAKE_CURRENT_LIST_DIR}/../wix4" ABSOLUTE) +set(CMake_TEST_CPACK_WIX4 "${wix4_dir}" CACHE PATH "") diff --git a/.gitlab/ci/configure_windows_x86_64_package.cmake b/.gitlab/ci/configure_windows_x86_64_package.cmake index 3a141a7a7ff..051e3fc6290 100644 --- a/.gitlab/ci/configure_windows_x86_64_package.cmake +++ b/.gitlab/ci/configure_windows_x86_64_package.cmake @@ -1,6 +1,9 @@ # CPack package file name component for this platform. set(CPACK_SYSTEM_NAME "windows-x86_64" CACHE STRING "") +# Tell WiX to package for this architecture. +set(CPACK_WIX_ARCHITECTURE "x64" CACHE STRING "") + # Use APIs from at most Windows 7 set(CMAKE_C_FLAGS "-D_WIN32_WINNT=0x601 -DNTDDI_VERSION=0x06010000" CACHE STRING "") set(CMAKE_CXX_FLAGS "-GR -EHsc -D_WIN32_WINNT=0x601 -DNTDDI_VERSION=0x06010000" CACHE STRING "") diff --git a/.gitlab/ci/ctest_build.cmake b/.gitlab/ci/ctest_build.cmake index b1b98308ba5..4a18cf9ab9b 100644 --- a/.gitlab/ci/ctest_build.cmake +++ b/.gitlab/ci/ctest_build.cmake @@ -65,6 +65,7 @@ if ("$ENV{CTEST_NO_WARNINGS_ALLOWED}" AND num_warnings GREATER 0) message(FATAL_ERROR "Found ${num_warnings} warnings (treating as fatal).") endif () +file(WRITE "$ENV{CI_PROJECT_DIR}/.gitlab/num_warnings.txt" "${num_warnings}\n") if (ctest_build_args) message(FATAL_ERROR diff --git a/.gitlab/ci/ctest_exclusions.cmake b/.gitlab/ci/ctest_exclusions.cmake index a2789c3af8a..ed5e1dd694c 100644 --- a/.gitlab/ci/ctest_exclusions.cmake +++ b/.gitlab/ci/ctest_exclusions.cmake @@ -34,6 +34,13 @@ if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "nvhpc_") ) endif() +if ("$ENV{CMAKE_CONFIGURATION}" STREQUAL "windows_vs2022_x64_ninja") + list(APPEND test_exclusions + # FIXME(#25573): This test failure needs further investigation. + "^SwiftMixLib$" + ) +endif() + string(REPLACE ";" "|" test_exclusions "${test_exclusions}") if (test_exclusions) set(test_exclusions "(${test_exclusions})") diff --git a/.gitlab/ci/ctest_memcheck_fedora38_asan.lsan.supp b/.gitlab/ci/ctest_memcheck_fedora40_asan.lsan.supp similarity index 100% rename from .gitlab/ci/ctest_memcheck_fedora38_asan.lsan.supp rename to .gitlab/ci/ctest_memcheck_fedora40_asan.lsan.supp diff --git a/.gitlab/ci/cxx_modules_rules_clang.cmake b/.gitlab/ci/cxx_modules_rules_clang.cmake deleted file mode 100644 index 12682447b9d..00000000000 --- a/.gitlab/ci/cxx_modules_rules_clang.cmake +++ /dev/null @@ -1,3 +0,0 @@ -# Default to C++ extensions being off. Clang's modules support have trouble -# with extensions right now. -set(CMAKE_CXX_EXTENSIONS OFF) diff --git a/.gitlab/ci/docker/cuda12.2/Dockerfile b/.gitlab/ci/docker/cuda12.2/Dockerfile new file mode 100644 index 00000000000..e46f2287d85 --- /dev/null +++ b/.gitlab/ci/docker/cuda12.2/Dockerfile @@ -0,0 +1,9 @@ +FROM kitware/nvidia-cuda:12.2.2-devel-ubuntu22.04 +MAINTAINER Brad King + +COPY llvm.list /etc/apt/sources.list.d/llvm.list +COPY llvm-snapshot.gpg.key /root/llvm-snapshot.gpg.key +RUN apt-key add /root/llvm-snapshot.gpg.key + +COPY install_deps.sh /root/install_deps.sh +RUN sh /root/install_deps.sh diff --git a/.gitlab/ci/docker/cuda12.2/install_deps.sh b/.gitlab/ci/docker/cuda12.2/install_deps.sh new file mode 100755 index 00000000000..94fbd982625 --- /dev/null +++ b/.gitlab/ci/docker/cuda12.2/install_deps.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +set -e + +apt-get update + +# Install dependency without interaction. +env DEBIAN_FRONTEND=noninteractive \ + TZ=America/New_York \ + apt-get install -y \ + tzdata + +# Install development tools. +apt-get install -y \ + g++ \ + clang-18 \ + curl \ + git + +apt-get clean diff --git a/.gitlab/ci/docker/cuda12.2/llvm-snapshot.gpg.key b/.gitlab/ci/docker/cuda12.2/llvm-snapshot.gpg.key new file mode 100644 index 00000000000..aa6b105aa3d --- /dev/null +++ b/.gitlab/ci/docker/cuda12.2/llvm-snapshot.gpg.key @@ -0,0 +1,52 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- +Version: GnuPG v1.4.12 (GNU/Linux) + +mQINBFE9lCwBEADi0WUAApM/mgHJRU8lVkkw0CHsZNpqaQDNaHefD6Rw3S4LxNmM +EZaOTkhP200XZM8lVdbfUW9xSjA3oPldc1HG26NjbqqCmWpdo2fb+r7VmU2dq3NM +R18ZlKixiLDE6OUfaXWKamZsXb6ITTYmgTO6orQWYrnW6ckYHSeaAkW0wkDAryl2 +B5v8aoFnQ1rFiVEMo4NGzw4UX+MelF7rxaaregmKVTPiqCOSPJ1McC1dHFN533FY +Wh/RVLKWo6npu+owtwYFQW+zyQhKzSIMvNujFRzhIxzxR9Gn87MoLAyfgKEzrbbT +DhqqNXTxS4UMUKCQaO93TzetX/EBrRpJj+vP640yio80h4Dr5pAd7+LnKwgpTDk1 +G88bBXJAcPZnTSKu9I2c6KY4iRNbvRz4i+ZdwwZtdW4nSdl2792L7Sl7Nc44uLL/ +ZqkKDXEBF6lsX5XpABwyK89S/SbHOytXv9o4puv+65Ac5/UShspQTMSKGZgvDauU +cs8kE1U9dPOqVNCYq9Nfwinkf6RxV1k1+gwtclxQuY7UpKXP0hNAXjAiA5KS5Crq +7aaJg9q2F4bub0mNU6n7UI6vXguF2n4SEtzPRk6RP+4TiT3bZUsmr+1ktogyOJCc +Ha8G5VdL+NBIYQthOcieYCBnTeIH7D3Sp6FYQTYtVbKFzmMK+36ERreL/wARAQAB +tD1TeWx2ZXN0cmUgTGVkcnUgLSBEZWJpYW4gTExWTSBwYWNrYWdlcyA8c3lsdmVz +dHJlQGRlYmlhbi5vcmc+iQI4BBMBAgAiBQJRPZQsAhsDBgsJCAcDAgYVCAIJCgsE +FgIDAQIeAQIXgAAKCRAVz00Yr090Ibx+EADArS/hvkDF8juWMXxh17CgR0WZlHCC +9CTBWkg5a0bNN/3bb97cPQt/vIKWjQtkQpav6/5JTVCSx2riL4FHYhH0iuo4iAPR +udC7Cvg8g7bSPrKO6tenQZNvQm+tUmBHgFiMBJi92AjZ/Qn1Shg7p9ITivFxpLyX +wpmnF1OKyI2Kof2rm4BFwfSWuf8Fvh7kDMRLHv+MlnK/7j/BNpKdozXxLcwoFBmn +l0WjpAH3OFF7Pvm1LJdf1DjWKH0Dc3sc6zxtmBR/KHHg6kK4BGQNnFKujcP7TVdv +gMYv84kun14pnwjZcqOtN3UJtcx22880DOQzinoMs3Q4w4o05oIF+sSgHViFpc3W +R0v+RllnH05vKZo+LDzc83DQVrdwliV12eHxrMQ8UYg88zCbF/cHHnlzZWAJgftg +hB08v1BKPgYRUzwJ6VdVqXYcZWEaUJmQAPuAALyZESw94hSo28FAn0/gzEc5uOYx +K+xG/lFwgAGYNb3uGM5m0P6LVTfdg6vDwwOeTNIExVk3KVFXeSQef2ZMkhwA7wya +KJptkb62wBHFE+o9TUdtMCY6qONxMMdwioRE5BYNwAsS1PnRD2+jtlI0DzvKHt7B +MWd8hnoUKhMeZ9TNmo+8CpsAtXZcBho0zPGz/R8NlJhAWpdAZ1CmcPo83EW86Yq7 +BxQUKnNHcwj2ebkCDQRRPZQsARAA4jxYmbTHwmMjqSizlMJYNuGOpIidEdx9zQ5g +zOr431/VfWq4S+VhMDhs15j9lyml0y4ok215VRFwrAREDg6UPMr7ajLmBQGau0Fc +bvZJ90l4NjXp5p0NEE/qOb9UEHT7EGkEhaZ1ekkWFTWCgsy7rRXfZLxB6sk7pzLC +DshyW3zjIakWAnpQ5j5obiDy708pReAuGB94NSyb1HoW/xGsGgvvCw4r0w3xPStw +F1PhmScE6NTBIfLliea3pl8vhKPlCh54Hk7I8QGjo1ETlRP4Qll1ZxHJ8u25f/ta +RES2Aw8Hi7j0EVcZ6MT9JWTI83yUcnUlZPZS2HyeWcUj+8nUC8W4N8An+aNps9l/ +21inIl2TbGo3Yn1JQLnA1YCoGwC34g8QZTJhElEQBN0X29ayWW6OdFx8MDvllbBV +ymmKq2lK1U55mQTfDli7S3vfGz9Gp/oQwZ8bQpOeUkc5hbZszYwP4RX+68xDPfn+ +M9udl+qW9wu+LyePbW6HX90LmkhNkkY2ZzUPRPDHZANU5btaPXc2H7edX4y4maQa +xenqD0lGh9LGz/mps4HEZtCI5CY8o0uCMF3lT0XfXhuLksr7Pxv57yue8LLTItOJ +d9Hmzp9G97SRYYeqU+8lyNXtU2PdrLLq7QHkzrsloG78lCpQcalHGACJzrlUWVP/ +fN3Ht3kAEQEAAYkCHwQYAQIACQUCUT2ULAIbDAAKCRAVz00Yr090IbhWEADbr50X +OEXMIMGRLe+YMjeMX9NG4jxs0jZaWHc/WrGR+CCSUb9r6aPXeLo+45949uEfdSsB +pbaEdNWxF5Vr1CSjuO5siIlgDjmT655voXo67xVpEN4HhMrxugDJfCa6z97P0+ML +PdDxim57uNqkam9XIq9hKQaurxMAECDPmlEXI4QT3eu5qw5/knMzDMZj4Vi6hovL +wvvAeLHO/jsyfIdNmhBGU2RWCEZ9uo/MeerPHtRPfg74g+9PPfP6nyHD2Wes6yGd +oVQwtPNAQD6Cj7EaA2xdZYLJ7/jW6yiPu98FFWP74FN2dlyEA2uVziLsfBrgpS4l +tVOlrO2YzkkqUGrybzbLpj6eeHx+Cd7wcjI8CalsqtL6cG8cUEjtWQUHyTbQWAgG +5VPEgIAVhJ6RTZ26i/G+4J8neKyRs4vz+57UGwY6zI4AB1ZcWGEE3Bf+CDEDgmnP +LSwbnHefK9IljT9XU98PelSryUO/5UPw7leE0akXKB4DtekToO226px1VnGp3Bov +1GBGvpHvL2WizEwdk+nfk8LtrLzej+9FtIcq3uIrYnsac47Pf7p0otcFeTJTjSq3 +krCaoG4Hx0zGQG2ZFpHrSrZTVy6lxvIdfi0beMgY6h78p6M9eYZHQHc02DjFkQXN +bXb5c6gCHESH5PXwPU4jQEE7Ib9J6sbk7ZT2Mw== +=j+4q +-----END PGP PUBLIC KEY BLOCK----- diff --git a/.gitlab/ci/docker/cuda12.2/llvm.list b/.gitlab/ci/docker/cuda12.2/llvm.list new file mode 100644 index 00000000000..350a712c3f8 --- /dev/null +++ b/.gitlab/ci/docker/cuda12.2/llvm.list @@ -0,0 +1,2 @@ +deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main +deb-src http://apt.llvm.org/jammy/ llvm-toolchain-jammy-18 main diff --git a/.gitlab/ci/docker/debian12-x86_64/deps_packages.lst b/.gitlab/ci/docker/debian12-x86_64/deps_packages.lst index a59f2c91b59..014c7eae9d5 100644 --- a/.gitlab/ci/docker/debian12-x86_64/deps_packages.lst +++ b/.gitlab/ci/docker/debian12-x86_64/deps_packages.lst @@ -32,6 +32,9 @@ cvs subversion mercurial +# Install ASM_NASM language toolchain. +nasm + # Install HIP language toolchain. hipcc diff --git a/.gitlab/ci/docker/fedora39-hip/Dockerfile b/.gitlab/ci/docker/fedora39-hip/Dockerfile new file mode 100644 index 00000000000..0347cc4bae7 --- /dev/null +++ b/.gitlab/ci/docker/fedora39-hip/Dockerfile @@ -0,0 +1,27 @@ +# syntax=docker/dockerfile:1 + +ARG BASE_IMAGE=fedora:39 + +FROM ${BASE_IMAGE} AS dnf-cache +# Populate DNF cache w/ the fresh metadata and prefetch packages. +RUN --mount=type=bind,source=deps_packages.lst,target=/root/deps_packages.lst \ + --mount=type=tmpfs,target=/var/log \ + --mount=type=tmpfs,target=/tmp \ + dnf install \ + --setopt=install_weak_deps=False \ + --setopt=fastestmirror=True \ + --setopt=max_parallel_downloads=10 \ + --downloadonly \ + -y \ + $(grep -h '^[^#]\+$' /root/*.lst) + +FROM ${BASE_IMAGE} +LABEL maintainer="Brad King " + +RUN --mount=type=bind,source=install_deps.sh,target=/root/install_deps.sh \ + --mount=type=bind,source=deps_packages.lst,target=/root/deps_packages.lst \ + --mount=type=cache,from=dnf-cache,source=/var/cache/dnf,target=/var/cache/dnf,sharing=private \ + --mount=type=cache,target=/var/cache/pip \ + --mount=type=tmpfs,target=/var/log \ + --mount=type=tmpfs,target=/tmp \ + sh /root/install_deps.sh diff --git a/.gitlab/ci/docker/fedora39-hip/deps_packages.lst b/.gitlab/ci/docker/fedora39-hip/deps_packages.lst new file mode 100644 index 00000000000..70b114c403b --- /dev/null +++ b/.gitlab/ci/docker/fedora39-hip/deps_packages.lst @@ -0,0 +1,15 @@ +# Install development tools. +clang +clang-tools-extra +compiler-rt +gcc-c++ +git-core +make + +# Install HIP language toolchain. +hsakmt-devel +lld +llvm +rocm-comgr-devel +rocm-hip-devel +rocm-runtime-devel diff --git a/.gitlab/ci/docker/fedora39-hip/install_deps.sh b/.gitlab/ci/docker/fedora39-hip/install_deps.sh new file mode 100755 index 00000000000..eedff9c3a60 --- /dev/null +++ b/.gitlab/ci/docker/fedora39-hip/install_deps.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +dnf install \ + --setopt=install_weak_deps=False \ + --setopt=fastestmirror=True \ + --setopt=max_parallel_downloads=10 \ + -y \ + $(grep '^[^#]\+$' /root/deps_packages.lst) diff --git a/.gitlab/ci/docker/fedora38/Dockerfile b/.gitlab/ci/docker/fedora40/Dockerfile similarity index 98% rename from .gitlab/ci/docker/fedora38/Dockerfile rename to .gitlab/ci/docker/fedora40/Dockerfile index 4918693531a..896456c84b7 100644 --- a/.gitlab/ci/docker/fedora38/Dockerfile +++ b/.gitlab/ci/docker/fedora40/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 -ARG BASE_IMAGE=fedora:38 +ARG BASE_IMAGE=fedora:40 FROM ${BASE_IMAGE} AS dnf-cache # Populate DNF cache w/ the fresh metadata and prefetch packages. diff --git a/.gitlab/ci/docker/fedora38/deps_packages.lst b/.gitlab/ci/docker/fedora40/deps_packages.lst similarity index 89% rename from .gitlab/ci/docker/fedora38/deps_packages.lst rename to .gitlab/ci/docker/fedora40/deps_packages.lst index da050d90b38..c7bad7cf207 100644 --- a/.gitlab/ci/docker/fedora38/deps_packages.lst +++ b/.gitlab/ci/docker/fedora40/deps_packages.lst @@ -6,13 +6,14 @@ qt6-qtbase-devel # Install development tools. clang +clang-devel clang-tools-extra clang-tools-extra-devel compiler-rt flang -flang-devel gcc-c++ git-core +llvm-devel make # Install optional external build dependencies. @@ -30,6 +31,7 @@ zlib-devel # Install documentation tools. python3-sphinx +python3-sphinxcontrib-qthelp texinfo qt5-qttools-devel qt6-qttools-devel @@ -44,12 +46,8 @@ file jq which -# Install HIP language toolchain. -hsakmt-devel -lld -rocm-comgr-devel -rocm-hip-devel -rocm-runtime-devel +# Install ASM_NASM language toolchain. +nasm # Packages needed to test CTest. breezy @@ -85,6 +83,7 @@ hdf5-devel hdf5-mpich-devel hdf5-openmpi-devel ImageMagick-c++-devel +jasper-devel java-11-openjdk-devel jsoncpp-devel lapack-devel @@ -93,6 +92,7 @@ libcurl-devel libicu-devel libinput-devel systemd-devel libjpeg-turbo-devel +libomp-devel libpng-devel opensp-devel postgresql-server-devel @@ -120,3 +120,6 @@ wxGTK-devel xalan-c-devel xerces-c-devel xz-devel + +# Packages needed to test third-party binaries. +ncurses-compat-libs diff --git a/.gitlab/ci/docker/fedora38/install_deps.sh b/.gitlab/ci/docker/fedora40/install_deps.sh similarity index 90% rename from .gitlab/ci/docker/fedora38/install_deps.sh rename to .gitlab/ci/docker/fedora40/install_deps.sh index cd2701ebee5..70e229319ae 100755 --- a/.gitlab/ci/docker/fedora38/install_deps.sh +++ b/.gitlab/ci/docker/fedora40/install_deps.sh @@ -19,12 +19,12 @@ for p in Demo test; do done # Remove tests for numpy -for v in 2.7 3.11; do +for v in 2.7 3.12; do find /usr/lib64/python${v}/site-packages/numpy -type d -a -name tests -exec rm -rf {} + done # Remove some other packages tests -find /usr/lib64/python3.11/site-packages/breezy -type d -a -name tests -exec rm -rf {} + +find /usr/lib64/python3.12/site-packages/breezy -type d -a -name tests -exec rm -rf {} + # Perforce curl -L https://www.perforce.com/downloads/perforce/r21.2/bin.linux26x86_64/helix-core-server.tgz -o - \ diff --git a/.gitlab/ci/docker/fedora38/install_iwyu.sh b/.gitlab/ci/docker/fedora40/install_iwyu.sh similarity index 77% rename from .gitlab/ci/docker/fedora38/install_iwyu.sh rename to .gitlab/ci/docker/fedora40/install_iwyu.sh index 684e3550584..50ed6127890 100755 --- a/.gitlab/ci/docker/fedora38/install_iwyu.sh +++ b/.gitlab/ci/docker/fedora40/install_iwyu.sh @@ -18,13 +18,13 @@ readonly llvm_version="$( echo "$llvm_full_version" | cut -d. -f-1 )" git checkout "clang_$llvm_version" git apply < - -# Install build dependencies for packages. -COPY install_deps.sh /root/install_deps.sh -RUN sh /root/install_deps.sh - -COPY install_gcc.sh /root/install_gcc.sh -RUN sh /root/install_gcc.sh diff --git a/.gitlab/ci/docker/gcc_cxx_modules/install_deps.sh b/.gitlab/ci/docker/gcc_cxx_modules/install_deps.sh deleted file mode 100755 index b8b706b6f51..00000000000 --- a/.gitlab/ci/docker/gcc_cxx_modules/install_deps.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -set -e - -dnf install -y --setopt=install_weak_deps=False \ - gcc-c++ mpfr-devel libmpc-devel isl-devel flex bison file findutils diffutils git-core -dnf clean all diff --git a/.gitlab/ci/docker/gcc_cxx_modules/install_gcc.sh b/.gitlab/ci/docker/gcc_cxx_modules/install_gcc.sh deleted file mode 100755 index 15cfe390701..00000000000 --- a/.gitlab/ci/docker/gcc_cxx_modules/install_gcc.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -set -e - -readonly revision="29862e21f6d656eca59284c927d0c4c0698eb99c" # master as of 21 Sep 2023 -readonly tarball="git://gcc.gnu.org/git/gcc.git" - -readonly workdir="$HOME/gcc" -readonly srcdir="$workdir/gcc" -readonly builddir="$workdir/build" -readonly njobs="$( nproc )" - -mkdir -p "$workdir" -cd "$workdir" -git clone "$tarball" "$srcdir" -git -C "$srcdir" checkout "$revision" -mkdir -p "$builddir" -cd "$builddir" -"$srcdir/configure" \ - --disable-multilib \ - --enable-languages=c,c++ \ - --prefix="/opt/gcc-p1689" -make "-j$njobs" -make "-j$njobs" install-strip -rm -rf "$workdir" diff --git a/.gitlab/ci/env.ps1 b/.gitlab/ci/env.ps1 old mode 100755 new mode 100644 index 72a8cb85e97..754521bb887 --- a/.gitlab/ci/env.ps1 +++ b/.gitlab/ci/env.ps1 @@ -1,4 +1,12 @@ $pwsh = [System.Diagnostics.Process]::GetCurrentProcess().MainModule.FileName + +# Place temporary files inside job directory. +$tmp = New-Item -Force -ItemType Directory -Path "$pwd\.gitlab\tmp" +$tmp = (New-Object -ComObject Scripting.FileSystemObject).GetFolder("$tmp").ShortPath +Set-Item -Force -Path "env:TEMP" -Value "$tmp" +Set-Item -Force -Path "env:TMP" -Value "$tmp" +$tmp = $null + if (Test-Path -Path ".gitlab/ci/env_$env:CMAKE_CONFIGURATION.ps1" -PathType Leaf) { . ".gitlab/ci/env_$env:CMAKE_CONFIGURATION.ps1" } diff --git a/.gitlab/ci/env_cuda12.2_clang.sh b/.gitlab/ci/env_cuda12.2_clang.sh new file mode 100644 index 00000000000..4b71b421540 --- /dev/null +++ b/.gitlab/ci/env_cuda12.2_clang.sh @@ -0,0 +1,3 @@ +export CC=/usr/bin/clang-18 +export CXX=/usr/bin/clang++-18 +export CUDACXX=/usr/bin/clang++-18 diff --git a/.gitlab/ci/env_debian12_makefiles_clang.sh b/.gitlab/ci/env_debian12_makefiles_clang.sh index eda7c1fa818..e46aa29a2a3 100644 --- a/.gitlab/ci/env_debian12_makefiles_clang.sh +++ b/.gitlab/ci/env_debian12_makefiles_clang.sh @@ -1,2 +1,6 @@ +if test "$CMAKE_CI_NIGHTLY" = "true"; then + source .gitlab/ci/ticlang-env.sh +fi + export CC=/usr/bin/clang-15 export CXX=/usr/bin/clang++-15 diff --git a/.gitlab/ci/env_debian12_ninja_clang.sh b/.gitlab/ci/env_debian12_ninja_clang.sh index eda7c1fa818..e46aa29a2a3 100644 --- a/.gitlab/ci/env_debian12_ninja_clang.sh +++ b/.gitlab/ci/env_debian12_ninja_clang.sh @@ -1,2 +1,6 @@ +if test "$CMAKE_CI_NIGHTLY" = "true"; then + source .gitlab/ci/ticlang-env.sh +fi + export CC=/usr/bin/clang-15 export CXX=/usr/bin/clang++-15 diff --git a/.gitlab/ci/env_fedora38_common_clang.sh b/.gitlab/ci/env_fedora38_common_clang.sh deleted file mode 100644 index fc9c04134b2..00000000000 --- a/.gitlab/ci/env_fedora38_common_clang.sh +++ /dev/null @@ -1,4 +0,0 @@ -export CC=/usr/bin/clang-16 -export CXX=/usr/bin/clang++-16 -export FC=/usr/bin/flang-new -export FFLAGS=-flang-experimental-exec diff --git a/.gitlab/ci/env_fedora38_hip_radeon.sh b/.gitlab/ci/env_fedora38_hip_radeon.sh deleted file mode 100644 index 812ef5a1c73..00000000000 --- a/.gitlab/ci/env_fedora38_hip_radeon.sh +++ /dev/null @@ -1 +0,0 @@ -export HIPCXX=/usr/bin/clang++-16 diff --git a/.gitlab/ci/env_fedora38_makefiles_clang.sh b/.gitlab/ci/env_fedora38_makefiles_clang.sh deleted file mode 100644 index 9f3edde7d72..00000000000 --- a/.gitlab/ci/env_fedora38_makefiles_clang.sh +++ /dev/null @@ -1 +0,0 @@ -. .gitlab/ci/env_fedora38_common_clang.sh diff --git a/.gitlab/ci/env_fedora38_makefiles_symlinked.cmake b/.gitlab/ci/env_fedora38_makefiles_symlinked.cmake deleted file mode 100644 index 2accabf54b4..00000000000 --- a/.gitlab/ci/env_fedora38_makefiles_symlinked.cmake +++ /dev/null @@ -1 +0,0 @@ -include("${CMAKE_CURRENT_LIST_DIR}/env_fedora38_makefiles.cmake") diff --git a/.gitlab/ci/env_fedora38_makefiles_symlinked.sh b/.gitlab/ci/env_fedora38_makefiles_symlinked.sh deleted file mode 100644 index 452d3785737..00000000000 --- a/.gitlab/ci/env_fedora38_makefiles_symlinked.sh +++ /dev/null @@ -1 +0,0 @@ -. .gitlab/ci/env_fedora38_makefiles.sh diff --git a/.gitlab/ci/env_fedora38_ninja_clang.sh b/.gitlab/ci/env_fedora38_ninja_clang.sh deleted file mode 100644 index 9f3edde7d72..00000000000 --- a/.gitlab/ci/env_fedora38_ninja_clang.sh +++ /dev/null @@ -1 +0,0 @@ -. .gitlab/ci/env_fedora38_common_clang.sh diff --git a/.gitlab/ci/env_fedora38_ninja_multi_clang.sh b/.gitlab/ci/env_fedora38_ninja_multi_clang.sh deleted file mode 100644 index 9f3edde7d72..00000000000 --- a/.gitlab/ci/env_fedora38_ninja_multi_clang.sh +++ /dev/null @@ -1 +0,0 @@ -. .gitlab/ci/env_fedora38_common_clang.sh diff --git a/.gitlab/ci/env_fedora39_hip_radeon.sh b/.gitlab/ci/env_fedora39_hip_radeon.sh new file mode 100644 index 00000000000..0f7df8d954f --- /dev/null +++ b/.gitlab/ci/env_fedora39_hip_radeon.sh @@ -0,0 +1 @@ +export HIPCXX=/usr/bin/clang++-17 diff --git a/.gitlab/ci/env_fedora38_asan.sh b/.gitlab/ci/env_fedora40_asan.sh similarity index 100% rename from .gitlab/ci/env_fedora38_asan.sh rename to .gitlab/ci/env_fedora40_asan.sh diff --git a/.gitlab/ci/env_fedora38_clang_analyzer.sh b/.gitlab/ci/env_fedora40_clang_analyzer.sh similarity index 100% rename from .gitlab/ci/env_fedora38_clang_analyzer.sh rename to .gitlab/ci/env_fedora40_clang_analyzer.sh diff --git a/.gitlab/ci/env_fedora40_common_clang.sh b/.gitlab/ci/env_fedora40_common_clang.sh new file mode 100644 index 00000000000..a3861d0ec4e --- /dev/null +++ b/.gitlab/ci/env_fedora40_common_clang.sh @@ -0,0 +1,3 @@ +export CC=/usr/bin/clang-18 +export CXX=/usr/bin/clang++-18 +export FC=/usr/bin/flang-new diff --git a/.gitlab/ci/env_fedora38_extdeps.sh b/.gitlab/ci/env_fedora40_extdeps.sh similarity index 100% rename from .gitlab/ci/env_fedora38_extdeps.sh rename to .gitlab/ci/env_fedora40_extdeps.sh diff --git a/.gitlab/ci/env_fedora38_makefiles.cmake b/.gitlab/ci/env_fedora40_makefiles.cmake similarity index 100% rename from .gitlab/ci/env_fedora38_makefiles.cmake rename to .gitlab/ci/env_fedora40_makefiles.cmake diff --git a/.gitlab/ci/env_fedora38_makefiles.sh b/.gitlab/ci/env_fedora40_makefiles.sh similarity index 100% rename from .gitlab/ci/env_fedora38_makefiles.sh rename to .gitlab/ci/env_fedora40_makefiles.sh diff --git a/.gitlab/ci/env_fedora40_makefiles_clang.sh b/.gitlab/ci/env_fedora40_makefiles_clang.sh new file mode 100644 index 00000000000..20210861482 --- /dev/null +++ b/.gitlab/ci/env_fedora40_makefiles_clang.sh @@ -0,0 +1 @@ +. .gitlab/ci/env_fedora40_common_clang.sh diff --git a/.gitlab/ci/env_fedora40_makefiles_symlinked.cmake b/.gitlab/ci/env_fedora40_makefiles_symlinked.cmake new file mode 100644 index 00000000000..d3818075a5b --- /dev/null +++ b/.gitlab/ci/env_fedora40_makefiles_symlinked.cmake @@ -0,0 +1 @@ +include("${CMAKE_CURRENT_LIST_DIR}/env_fedora40_makefiles.cmake") diff --git a/.gitlab/ci/env_fedora40_makefiles_symlinked.sh b/.gitlab/ci/env_fedora40_makefiles_symlinked.sh new file mode 100644 index 00000000000..5a7584a436f --- /dev/null +++ b/.gitlab/ci/env_fedora40_makefiles_symlinked.sh @@ -0,0 +1 @@ +. .gitlab/ci/env_fedora40_makefiles.sh diff --git a/.gitlab/ci/env_fedora38_ninja.sh b/.gitlab/ci/env_fedora40_ninja.sh similarity index 100% rename from .gitlab/ci/env_fedora38_ninja.sh rename to .gitlab/ci/env_fedora40_ninja.sh diff --git a/.gitlab/ci/env_fedora40_ninja_clang.sh b/.gitlab/ci/env_fedora40_ninja_clang.sh new file mode 100644 index 00000000000..20210861482 --- /dev/null +++ b/.gitlab/ci/env_fedora40_ninja_clang.sh @@ -0,0 +1 @@ +. .gitlab/ci/env_fedora40_common_clang.sh diff --git a/.gitlab/ci/env_fedora38_ninja_multi.sh b/.gitlab/ci/env_fedora40_ninja_multi.sh similarity index 100% rename from .gitlab/ci/env_fedora38_ninja_multi.sh rename to .gitlab/ci/env_fedora40_ninja_multi.sh diff --git a/.gitlab/ci/env_fedora40_ninja_multi_clang.sh b/.gitlab/ci/env_fedora40_ninja_multi_clang.sh new file mode 100644 index 00000000000..20210861482 --- /dev/null +++ b/.gitlab/ci/env_fedora40_ninja_multi_clang.sh @@ -0,0 +1 @@ +. .gitlab/ci/env_fedora40_common_clang.sh diff --git a/.gitlab/ci/env_mingw_osdn_io_mingw_makefiles.ps1 b/.gitlab/ci/env_mingw_osdn_io_mingw_makefiles.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/env_mingw_osdn_io_msys_makefiles.ps1 b/.gitlab/ci/env_mingw_osdn_io_msys_makefiles.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/env_windows_arm64_package.ps1 b/.gitlab/ci/env_windows_arm64_package.ps1 new file mode 100644 index 00000000000..a8980072951 --- /dev/null +++ b/.gitlab/ci/env_windows_arm64_package.ps1 @@ -0,0 +1 @@ +. .gitlab/ci/wix3-env.ps1 diff --git a/.gitlab/ci/env_windows_arm64_vs2022_ninja.ps1 b/.gitlab/ci/env_windows_arm64_vs2022_ninja.ps1 new file mode 100644 index 00000000000..eb7bf6e8737 --- /dev/null +++ b/.gitlab/ci/env_windows_arm64_vs2022_ninja.ps1 @@ -0,0 +1,2 @@ +& "$pwsh" -File .gitlab/ci/wix3.ps1 +& "$pwsh" -File .gitlab/ci/wix4.ps1 diff --git a/.gitlab/ci/env_windows_borland5.5.ps1 b/.gitlab/ci/env_windows_borland5.5.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/env_windows_borland5.8.ps1 b/.gitlab/ci/env_windows_borland5.8.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/env_windows_clang_ninja.ps1 b/.gitlab/ci/env_windows_clang_ninja.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/env_windows_clang_nmake.ps1 b/.gitlab/ci/env_windows_clang_nmake.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/env_windows_i386_package.ps1 b/.gitlab/ci/env_windows_i386_package.ps1 new file mode 100644 index 00000000000..a8980072951 --- /dev/null +++ b/.gitlab/ci/env_windows_i386_package.ps1 @@ -0,0 +1 @@ +. .gitlab/ci/wix3-env.ps1 diff --git a/.gitlab/ci/env_windows_intelclassic_ninja.ps1 b/.gitlab/ci/env_windows_intelclassic_ninja.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/env_windows_inteloneapi_ninja.ps1 b/.gitlab/ci/env_windows_inteloneapi_ninja.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/env_windows_msvc_v71_nmake.ps1 b/.gitlab/ci/env_windows_msvc_v71_nmake.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/env_windows_openwatcom1.9.ps1 b/.gitlab/ci/env_windows_openwatcom1.9.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/env_windows_orangec6.73.1.ps1 b/.gitlab/ci/env_windows_orangec6.73.1.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/env_windows_vs2022_x64.ps1 b/.gitlab/ci/env_windows_vs2022_x64.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/env_windows_vs2022_x64_jom.ps1 b/.gitlab/ci/env_windows_vs2022_x64_jom.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/env_windows_vs2022_x64_ninja.ps1 b/.gitlab/ci/env_windows_vs2022_x64_ninja.ps1 old mode 100755 new mode 100644 index 50a03ca8284..fe010eb78c8 --- a/.gitlab/ci/env_windows_vs2022_x64_ninja.ps1 +++ b/.gitlab/ci/env_windows_vs2022_x64_ninja.ps1 @@ -1,4 +1,9 @@ if ("$env:CMAKE_CI_NIGHTLY" -eq "true") { . ".gitlab/ci/innosetup-env.ps1" . ".gitlab/ci/ispc-env.ps1" + . ".gitlab/ci/nuget-env.ps1" + . ".gitlab/ci/swift-env.ps1" } + +& "$pwsh" -File .gitlab/ci/wix3.ps1 +& "$pwsh" -File .gitlab/ci/wix4.ps1 diff --git a/.gitlab/ci/env_windows_vs2022_x64_ninja_multi.ps1 b/.gitlab/ci/env_windows_vs2022_x64_ninja_multi.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/env_windows_vs2022_x64_nmake.ps1 b/.gitlab/ci/env_windows_vs2022_x64_nmake.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/env_windows_x86_64_package.ps1 b/.gitlab/ci/env_windows_x86_64_package.ps1 new file mode 100644 index 00000000000..a8980072951 --- /dev/null +++ b/.gitlab/ci/env_windows_x86_64_package.ps1 @@ -0,0 +1 @@ +. .gitlab/ci/wix3-env.ps1 diff --git a/.gitlab/ci/innosetup-env.ps1 b/.gitlab/ci/innosetup-env.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/innosetup.ps1 b/.gitlab/ci/innosetup.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/intel-env.ps1 b/.gitlab/ci/intel-env.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/intel-vars.ps1 b/.gitlab/ci/intel-vars.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/intel.ps1 b/.gitlab/ci/intel.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/ispc-env.ps1 b/.gitlab/ci/ispc-env.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/ispc.ps1 b/.gitlab/ci/ispc.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/jom.ps1 b/.gitlab/ci/jom.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/mingw-env.ps1 b/.gitlab/ci/mingw-env.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/mingw.ps1 b/.gitlab/ci/mingw.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/msvc.ps1 b/.gitlab/ci/msvc.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/ninja-env.ps1 b/.gitlab/ci/ninja-env.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/ninja-env.sh b/.gitlab/ci/ninja-env.sh new file mode 100644 index 00000000000..744b9f3271f --- /dev/null +++ b/.gitlab/ci/ninja-env.sh @@ -0,0 +1,3 @@ +.gitlab/ci/ninja.sh +export PATH=$PWD/.gitlab:$PATH +ninja --version diff --git a/.gitlab/ci/ninja-nightly.ps1 b/.gitlab/ci/ninja-nightly.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/ninja.ps1 b/.gitlab/ci/ninja.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/nuget-env.ps1 b/.gitlab/ci/nuget-env.ps1 new file mode 100644 index 00000000000..7dee5a02382 --- /dev/null +++ b/.gitlab/ci/nuget-env.ps1 @@ -0,0 +1,4 @@ +$pwdpath = $pwd.Path +& "$pwsh" -File ".gitlab/ci/nuget.ps1" +Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\nuget;$env:PATH" +nuget | Select -First 1 diff --git a/.gitlab/ci/nuget.ps1 b/.gitlab/ci/nuget.ps1 new file mode 100644 index 00000000000..1decb019d5f --- /dev/null +++ b/.gitlab/ci/nuget.ps1 @@ -0,0 +1,21 @@ +$erroractionpreference = "stop" + +$version = "6.9.1.3" +$sha256sum = "562A2CE2D570D68DB4472CB82CDF1FC4245D5C73B84BC8361880CBE389702F65" +$filename = "nuget-$version-win-i386-1" +$tarball = "$filename.zip" + +$outdir = $pwd.Path +$outdir = "$outdir\.gitlab" +$ProgressPreference = 'SilentlyContinue' +# This URL is only visible inside of Kitware's network. +Invoke-WebRequest -Uri "https://cmake.org/files/dependencies/internal/$tarball" -OutFile "$outdir\$tarball" +$hash = Get-FileHash "$outdir\$tarball" -Algorithm SHA256 +if ($hash.Hash -ne $sha256sum) { + exit 1 +} + +Add-Type -AssemblyName System.IO.Compression.FileSystem +[System.IO.Compression.ZipFile]::ExtractToDirectory("$outdir\$tarball", "$outdir") +Move-Item -Path "$outdir\$filename" -Destination "$outdir\nuget" +Remove-Item "$outdir\$tarball" diff --git a/.gitlab/ci/openwatcom-env.ps1 b/.gitlab/ci/openwatcom-env.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/openwatcom.ps1 b/.gitlab/ci/openwatcom.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/orangec-env.ps1 b/.gitlab/ci/orangec-env.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/orangec.ps1 b/.gitlab/ci/orangec.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/package_windows.ps1 b/.gitlab/ci/package_windows.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/post_build.ps1 b/.gitlab/ci/post_build.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/post_build_fedora40_tidy.sh b/.gitlab/ci/post_build_fedora40_tidy.sh new file mode 100644 index 00000000000..a36663a9246 --- /dev/null +++ b/.gitlab/ci/post_build_fedora40_tidy.sh @@ -0,0 +1,21 @@ +git config user.name "Kitware Robot" +git config user.email "kwrobot@kitware.com" + +clang-apply-replacements --style=file .gitlab/clang-tidy-fixes +git add . + +if [ -n "$(git status --porcelain)" ]; then + quietly git commit --file=- < + + +EOF + git format-patch --output=clang-tidy-fixes.patch -1 -N + echo "Patch from clang-tidy available, check artifacts of this CI job." >&2 +fi + +readonly num_warnings="$(cat .gitlab/num_warnings.txt)" +if [ "$num_warnings" -ne 0 ]; then + echo "Found $num_warnings warnings (treating as fatal)." >&2 + exit 1 +fi diff --git a/.gitlab/ci/post_build_windows_arm64_package.ps1 b/.gitlab/ci/post_build_windows_arm64_package.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/post_build_windows_i386_package.ps1 b/.gitlab/ci/post_build_windows_i386_package.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/post_build_windows_x86_64_package.ps1 b/.gitlab/ci/post_build_windows_x86_64_package.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/pre_build.ps1 b/.gitlab/ci/pre_build.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/pre_build_fedora38_tidy.sh b/.gitlab/ci/pre_build_fedora40_tidy.sh similarity index 100% rename from .gitlab/ci/pre_build_fedora38_tidy.sh rename to .gitlab/ci/pre_build_fedora40_tidy.sh diff --git a/.gitlab/ci/python-env.ps1 b/.gitlab/ci/python-env.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/python.ps1 b/.gitlab/ci/python.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/qt-env.ps1 b/.gitlab/ci/qt-env.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/repackage/wix.ps1 b/.gitlab/ci/repackage/wix.ps1 new file mode 100644 index 00000000000..6dbd46667a0 --- /dev/null +++ b/.gitlab/ci/repackage/wix.ps1 @@ -0,0 +1,55 @@ +# WiX Toolset 4+ is provided only via nuget packages. +# Download the package artifacts, extract the parts we need, and repackage them. + +param ( + [Parameter(Mandatory=$true)] + [string]$version + ) + +$erroractionpreference = "stop" + +$version_major = $version.Substring(0, $version.IndexOf('.')) + +$release = "v" + $version +$pkg_wix = "wix.$version.nupkg" +$pkg_wixui = "WixToolset.UI.wixext.$version.nupkg" +$packages = $pkg_wix, $pkg_wixui + +$wix_artifacts = "wix-artifacts.zip" + +$ProgressPreference = 'SilentlyContinue' +Invoke-WebRequest -Uri "https://github.com/wixtoolset/wix/releases/download/$release/artifacts.zip" -OutFile "$wix_artifacts" + +Add-Type -AssemblyName System.IO.Compression.FileSystem + +$zip = [System.IO.Compression.ZipFile]::Open("$wix_artifacts", "read") +$zip.Entries | Where-Object FullName -in $packages | ForEach-Object { + [System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, "$($_.Name)", $true) +} +$zip.Dispose() +Remove-Item "$wix_artifacts" + +$wix_dir = "wix-$version-win-any-1" +[System.IO.Compression.ZipFile]::ExtractToDirectory($pkg_wix, "wix-tmp") +Move-Item -Path "wix-tmp/tools/net6.0/any" -Destination "$wix_dir" +Remove-Item "wix-tmp" -Recurse -Force +Remove-Item "$pkg_wix" + +$ext_dir = New-Item -Force -ItemType Directory -Path "$wix_dir/.wix/extensions/WixToolset.UI.wixext/$version/wixext$version_major" +$zip = [System.IO.Compression.ZipFile]::Open($pkg_wixui, "read") +$zip.Entries | Where-Object Name -eq "WixToolset.UI.wixext.dll" | ForEach-Object { + [System.IO.Compression.ZipFileExtensions]::ExtractToFile($_, (Join-Path $ext_dir $_.Name), $true) +} +$zip.Dispose() +Remove-Item "$pkg_wixui" + +@" +This was extracted from WiX Toolset nuget packages and repackaged. +Point both PATH and WIX_EXTENSIONS environment variables at this directory. + +"@ | Add-Content -NoNewline "$wix_dir/README.txt" + +$compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal +$includeBaseDirectory = $true +[System.IO.Compression.ZipFile]::CreateFromDirectory("$wix_dir", "$wix_dir.zip", $compressionLevel, $includeBaseDirectory) +Remove-Item "$wix_dir" -Recurse -Force diff --git a/.gitlab/ci/sccache-env.ps1 b/.gitlab/ci/sccache-env.ps1 new file mode 100644 index 00000000000..66dc6ebb315 --- /dev/null +++ b/.gitlab/ci/sccache-env.ps1 @@ -0,0 +1 @@ +Set-Item -Force -Path "env:PATH" -Value "$env:PATH;$env:SCCACHE_PATH" diff --git a/.gitlab/ci/sccache-env.sh b/.gitlab/ci/sccache-env.sh new file mode 100644 index 00000000000..4b170a47d91 --- /dev/null +++ b/.gitlab/ci/sccache-env.sh @@ -0,0 +1,2 @@ +.gitlab/ci/sccache.sh +export PATH="$PWD/.gitlab:$PATH" diff --git a/.gitlab/ci/swift-env.ps1 b/.gitlab/ci/swift-env.ps1 new file mode 100644 index 00000000000..871b31c3b8a --- /dev/null +++ b/.gitlab/ci/swift-env.ps1 @@ -0,0 +1,6 @@ +$pwdpath = $pwd.Path +& "$pwsh" -File ".gitlab/ci/swift.ps1" +Set-Item -Force -Path "env:DEVELOPER_DIR" -Value "$pwdpath\.gitlab\swift" +Set-Item -Force -Path "env:SDKROOT" -Value "$pwdpath\.gitlab\swift\Platforms\Windows.platform\Developer\SDKs\Windows.sdk" +Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\swift\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin;$env:PATH" +swiftc --version diff --git a/.gitlab/ci/swift.ps1 b/.gitlab/ci/swift.ps1 new file mode 100644 index 00000000000..b970dcec0b1 --- /dev/null +++ b/.gitlab/ci/swift.ps1 @@ -0,0 +1,38 @@ +$erroractionpreference = "stop" + +$version = "5.9.2" +$sha256sum = "8C053108528EB2DAD84C33D6F0834A3A1444D21BA1A89D591AB149304A62F6B5" +$filename = "swift-$version-win-x86_64-1" +$tarball = "$filename.zip" + +$outdir = $pwd.Path +$outdir = "$outdir\.gitlab" +$ProgressPreference = 'SilentlyContinue' +# This URL is only visible inside of Kitware's network. See above filename table. +Invoke-WebRequest -Uri "https://cmake.org/files/dependencies/internal/$tarball" -OutFile "$outdir\$tarball" +$hash = Get-FileHash "$outdir\$tarball" -Algorithm SHA256 +if ($hash.Hash -ne $sha256sum) { + exit 1 +} + +Add-Type -AssemblyName System.IO.Compression.FileSystem +[System.IO.Compression.ZipFile]::ExtractToDirectory("$outdir\$tarball", "$outdir") +Move-Item -Path "$outdir\$filename" -Destination "$outdir\swift" +Remove-Item "$outdir\$tarball" + +$bin = "$outdir\swift\Toolchains\unknown-Asserts-development.xctoolchain\usr\bin" +$null = New-Item -ItemType HardLink -Path "$bin\clang++.exe" -Target "$bin\clang.exe" +$null = New-Item -ItemType HardLink -Path "$bin\clang-cl.exe" -Target "$bin\clang.exe" +$null = New-Item -ItemType HardLink -Path "$bin\clang-cpp.exe" -Target "$bin\clang.exe" +$null = New-Item -ItemType HardLink -Path "$bin\ld.lld.exe" -Target "$bin\lld.exe" +$null = New-Item -ItemType HardLink -Path "$bin\ld64.lld.exe" -Target "$bin\lld.exe" +$null = New-Item -ItemType HardLink -Path "$bin\lld-link.exe" -Target "$bin\lld.exe" +$null = New-Item -ItemType HardLink -Path "$bin\llvm-dlltool.exe" -Target "$bin\llvm-ar.exe" +$null = New-Item -ItemType HardLink -Path "$bin\llvm-lib.exe" -Target "$bin\llvm-ar.exe" +$null = New-Item -ItemType HardLink -Path "$bin\llvm-ranlib.exe" -Target "$bin\llvm-ar.exe" +$null = New-Item -ItemType HardLink -Path "$bin\llvm-objcopy.exe" -Target "$bin\llvm-strip.exe" +$null = New-Item -ItemType HardLink -Path "$bin\swiftc.exe" -Target "$bin\swift.exe" +$null = New-Item -ItemType HardLink -Path "$bin\swift-api-digester.exe" -Target "$bin\swift-frontend.exe" +$null = New-Item -ItemType HardLink -Path "$bin\swift-autolink-extract.exe" -Target "$bin\swift-frontend.exe" +$null = New-Item -ItemType HardLink -Path "$bin\swift-symbolgraph-extract.exe" -Target "$bin\swift-frontend.exe" +Clear-Variable -Name bin diff --git a/.gitlab/ci/ticlang-env.sh b/.gitlab/ci/ticlang-env.sh new file mode 100644 index 00000000000..448c0d76718 --- /dev/null +++ b/.gitlab/ci/ticlang-env.sh @@ -0,0 +1,2 @@ +.gitlab/ci/ticlang.sh +.gitlab/ticlang/bin/tiarmclang --version diff --git a/.gitlab/ci/ticlang.sh b/.gitlab/ci/ticlang.sh new file mode 100755 index 00000000000..66fa863a302 --- /dev/null +++ b/.gitlab/ci/ticlang.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +set -e + +case "$(uname -s)-$(uname -m)" in + Linux-x86_64) + shatool="sha256sum" + sha256sum="c69ac58e403b82eac1c407cc67b35fab5d95c5d8db75b019095f9412aacff27d" + filename="ti_cgt_armllvm_3.2.1.LTS_linux-x64_installer.bin" + dirname="ti-cgt-armllvm_3.2.1.LTS" + ;; + *) + echo "Unrecognized platform $(uname -s)-$(uname -m)" + exit 1 + ;; +esac +readonly shatool +readonly sha256sum + +cd .gitlab + +echo "$sha256sum $filename" > ticlang.sha256sum +curl -OL "https://cmake.org/files/dependencies/internal/$filename" +$shatool --check ticlang.sha256sum +chmod +x "$filename" +"./$filename" --mode unattended --prefix . +mv "$dirname" ticlang +rm -f "$filename" ticlang.sha256sum diff --git a/.gitlab/ci/vcvarsall.ps1 b/.gitlab/ci/vcvarsall.ps1 old mode 100755 new mode 100644 diff --git a/.gitlab/ci/wix3-env.ps1 b/.gitlab/ci/wix3-env.ps1 new file mode 100644 index 00000000000..a872b743e9d --- /dev/null +++ b/.gitlab/ci/wix3-env.ps1 @@ -0,0 +1,6 @@ +& "$pwsh" -File .gitlab/ci/wix3.ps1 + +$pwdpath = $pwd.Path +Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\wix3;$env:PATH" + +light -help | Select -First 1 diff --git a/.gitlab/ci/wix3.ps1 b/.gitlab/ci/wix3.ps1 new file mode 100644 index 00000000000..8f5ae4bc696 --- /dev/null +++ b/.gitlab/ci/wix3.ps1 @@ -0,0 +1,21 @@ +$erroractionpreference = "stop" + +$release = "wix314rtm" +$sha256sum = "13F067F38969FAF163D93A804B48EA0576790A202C8F10291F2000F0E356E934" +#$filename = "wix314-binaries" +$filename = "wix-3.14.0.8606-win-i386" +$tarball = "$filename.zip" + +$outdir = $pwd.Path +$outdir = "$outdir\.gitlab" +$ProgressPreference = 'SilentlyContinue' +#Invoke-WebRequest -Uri "https://github.com/wixtoolset/wix3/releases/download/$release/$tarball" -OutFile "$outdir\$tarball" +Invoke-WebRequest -Uri "https://cmake.org/files/dependencies/$tarball" -OutFile "$outdir\$tarball" +$hash = Get-FileHash "$outdir\$tarball" -Algorithm SHA256 +if ($hash.Hash -ne $sha256sum) { + exit 1 +} + +Add-Type -AssemblyName System.IO.Compression.FileSystem +[System.IO.Compression.ZipFile]::ExtractToDirectory("$outdir\$tarball", "$outdir\wix3") +Remove-Item "$outdir\$tarball" diff --git a/.gitlab/ci/wix.ps1 b/.gitlab/ci/wix4.ps1 old mode 100755 new mode 100644 similarity index 63% rename from .gitlab/ci/wix.ps1 rename to .gitlab/ci/wix4.ps1 index b7cb3f3402b..6209f2bf3fb --- a/.gitlab/ci/wix.ps1 +++ b/.gitlab/ci/wix4.ps1 @@ -1,14 +1,13 @@ $erroractionpreference = "stop" -$release = "v3.14.0.6526" -$sha256sum = "4C89898DF3BCAB13E12F7CA54399C35AD273475AD2CB6284611D00AE2D063C2C" -$filename = "wix-3.14.0.6526-win-i386" +$version = "4.0.4" +$sha256sum = "FB6E94C89B12FB65D3AA0CF9E9C630DAFCC7D57F1E66C7D6035CAD37A38CC284" +$filename = "wix-$version-win-any-1" $tarball = "$filename.zip" $outdir = $pwd.Path $outdir = "$outdir\.gitlab" $ProgressPreference = 'SilentlyContinue' -#Invoke-WebRequest -Uri "https://wixtoolset.org/downloads/$release/$tarball" -OutFile "$outdir\$tarball" Invoke-WebRequest -Uri "https://cmake.org/files/dependencies/$tarball" -OutFile "$outdir\$tarball" $hash = Get-FileHash "$outdir\$tarball" -Algorithm SHA256 if ($hash.Hash -ne $sha256sum) { @@ -16,4 +15,6 @@ if ($hash.Hash -ne $sha256sum) { } Add-Type -AssemblyName System.IO.Compression.FileSystem -[System.IO.Compression.ZipFile]::ExtractToDirectory("$outdir\$tarball", "$outdir\wix\bin") +[System.IO.Compression.ZipFile]::ExtractToDirectory("$outdir\$tarball", "$outdir") +Move-Item -Path "$outdir\$filename" -Destination "$outdir\wix4" +Remove-Item "$outdir\$tarball" diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml index 88940579b1f..f9fd6c26bd9 100644 --- a/.gitlab/os-linux.yml +++ b/.gitlab/os-linux.yml @@ -5,7 +5,7 @@ ### Release .linux_prep_source: - image: "fedora:38" + image: "fedora:40" variables: GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci" @@ -45,7 +45,7 @@ ### Debian .debian12: - image: "kitware/cmake:ci-debian12-x86_64-2023-07-27" + image: "kitware/cmake:ci-debian12-x86_64-2024-03-04" variables: GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci" @@ -68,46 +68,53 @@ ### Fedora -.fedora38: - image: "kitware/cmake:ci-fedora38-x86_64-2023-08-07" +.fedora40: + image: "kitware/cmake:ci-fedora40-x86_64-2024-04-24" variables: GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci/long file name for testing purposes" CMAKE_ARCH: x86_64 +# FIXME(#25932): Our HIP tests do not fully work in CI with Fedora 40. +.fedora39_hip: + image: "kitware/cmake:ci-fedora39-hip-x86_64-2024-04-24" + + variables: + GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci" + CMAKE_ARCH: x86_64 + #### Lint builds -.fedora38_tidy: - extends: .fedora38 +.fedora40_tidy: + extends: .fedora40 variables: - CMAKE_CONFIGURATION: fedora38_tidy - CTEST_NO_WARNINGS_ALLOWED: 1 + CMAKE_CONFIGURATION: fedora40_tidy CMAKE_CI_NO_INSTALL: 1 -.fedora38_clang_analyzer: - extends: .fedora38 +.fedora40_clang_analyzer: + extends: .fedora40 variables: - CMAKE_CONFIGURATION: fedora38_clang_analyzer + CMAKE_CONFIGURATION: fedora40_clang_analyzer CMAKE_CI_BUILD_TYPE: Debug CTEST_NO_WARNINGS_ALLOWED: 1 CMAKE_CI_NO_INSTALL: 1 -.fedora38_sphinx: - extends: .fedora38 +.fedora40_sphinx: + extends: .fedora40 variables: - CMAKE_CONFIGURATION: fedora38_sphinx + CMAKE_CONFIGURATION: fedora40_sphinx CTEST_NO_WARNINGS_ALLOWED: 1 CTEST_SOURCE_SUBDIRECTORY: "Utilities/Sphinx" CMAKE_CI_NO_INSTALL: 1 -.fedora38_sphinx_package: - extends: .fedora38 +.fedora40_sphinx_package: + extends: .fedora40 variables: - CMAKE_CONFIGURATION: fedora38_sphinx_package + CMAKE_CONFIGURATION: fedora40_sphinx_package CTEST_SOURCE_SUBDIRECTORY: "Utilities/Sphinx" #### Build and test @@ -163,43 +170,43 @@ CMAKE_CI_BUILD_TYPE: Release CTEST_NO_WARNINGS_ALLOWED: 1 -.fedora38_extdeps: - extends: .fedora38 +.fedora40_extdeps: + extends: .fedora40 variables: - CMAKE_CONFIGURATION: fedora38_extdeps + CMAKE_CONFIGURATION: fedora40_extdeps CMAKE_CI_BUILD_TYPE: Release CTEST_NO_WARNINGS_ALLOWED: 1 -.fedora38_ninja: - extends: .fedora38 +.fedora40_ninja: + extends: .fedora40 variables: - CMAKE_CONFIGURATION: fedora38_ninja + CMAKE_CONFIGURATION: fedora40_ninja CMAKE_CI_BUILD_TYPE: Release CTEST_NO_WARNINGS_ALLOWED: 1 -.fedora38_ninja_multi: - extends: .fedora38 +.fedora40_ninja_multi: + extends: .fedora40 variables: - CMAKE_CONFIGURATION: fedora38_ninja_multi + CMAKE_CONFIGURATION: fedora40_ninja_multi CTEST_NO_WARNINGS_ALLOWED: 1 CMAKE_GENERATOR: "Ninja Multi-Config" -.fedora38_makefiles: - extends: .fedora38 +.fedora40_makefiles: + extends: .fedora40 variables: - CMAKE_CONFIGURATION: fedora38_makefiles + CMAKE_CONFIGURATION: fedora40_makefiles CTEST_NO_WARNINGS_ALLOWED: 1 CMAKE_GENERATOR: "Unix Makefiles" -.fedora38_makefiles_symlinked: - extends: .fedora38 +.fedora40_makefiles_symlinked: + extends: .fedora40 variables: - CMAKE_CONFIGURATION: fedora38_makefiles_symlinked + CMAKE_CONFIGURATION: fedora40_makefiles_symlinked CTEST_NO_WARNINGS_ALLOWED: 1 CMAKE_GENERATOR: "Unix Makefiles" CMAKE_CI_IN_SYMLINK_TREE: 1 @@ -220,24 +227,24 @@ variables: CMAKE_CONFIGURATION: debian12_ninja_clang -.fedora38_makefiles_clang: - extends: .fedora38 +.fedora40_makefiles_clang: + extends: .fedora40 variables: - CMAKE_CONFIGURATION: fedora38_makefiles_clang + CMAKE_CONFIGURATION: fedora40_makefiles_clang CMAKE_GENERATOR: "Unix Makefiles" -.fedora38_ninja_clang: - extends: .fedora38 +.fedora40_ninja_clang: + extends: .fedora40 variables: - CMAKE_CONFIGURATION: fedora38_ninja_clang + CMAKE_CONFIGURATION: fedora40_ninja_clang -.fedora38_ninja_multi_clang: - extends: .fedora38 +.fedora40_ninja_multi_clang: + extends: .fedora40 variables: - CMAKE_CONFIGURATION: fedora38_ninja_multi_clang + CMAKE_CONFIGURATION: fedora40_ninja_multi_clang CMAKE_GENERATOR: "Ninja Multi-Config" ### Sanitizers @@ -253,13 +260,13 @@ CTEST_MEMORYCHECK_TYPE: AddressSanitizer CTEST_MEMORYCHECK_SANITIZER_OPTIONS: "" -.fedora38_asan: +.fedora40_asan: extends: - - .fedora38 + - .fedora40 - .fedora_asan_addon variables: - CMAKE_CONFIGURATION: fedora38_asan + CMAKE_CONFIGURATION: fedora40_asan ### Intel Compiler @@ -368,6 +375,24 @@ CMAKE_CONFIGURATION: cuda11.8_splayed_nvidia CTEST_NO_WARNINGS_ALLOWED: 1 +.cuda12.2: + extends: .cuda + image: "kitware/cmake:ci-cuda12.2-x86_64-2024-04-05" + variables: + CMAKE_ARCH: x86_64 + +.cuda12.2_nvidia: + extends: .cuda12.2 + variables: + CMAKE_CONFIGURATION: cuda12.2_nvidia + CTEST_NO_WARNINGS_ALLOWED: 1 + +.cuda12.2_clang: + extends: .cuda12.2 + variables: + CMAKE_CONFIGURATION: cuda12.2_clang + CTEST_NO_WARNINGS_ALLOWED: 1 + ### HIP builds .hip5.5: @@ -392,11 +417,11 @@ CMAKE_CONFIGURATION: debian12_hip_radeon CTEST_LABELS: "HIP" -.fedora38_hip_radeon: - extends: .fedora38 +.fedora39_hip_radeon: + extends: .fedora39_hip variables: - CMAKE_CONFIGURATION: fedora38_hip_radeon + CMAKE_CONFIGURATION: fedora39_hip_radeon CTEST_LABELS: "HIP" .hip5.5_nvidia: @@ -406,30 +431,6 @@ CMAKE_CONFIGURATION: hip5.5_nvidia CTEST_LABELS: "HIP" -### C++ modules - -.gcc_cxx_modules_x86_64: - image: "kitware/cmake:ci-gcc_cxx_modules-x86_64-2023-09-21" - - variables: - GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci" - CMAKE_ARCH: x86_64 - CC: "/opt/gcc-p1689/bin/gcc" - CXX: "/opt/gcc-p1689/bin/g++" - -.gcc_cxx_modules_ninja: - extends: .gcc_cxx_modules_x86_64 - - variables: - CMAKE_CONFIGURATION: linux_gcc_cxx_modules_ninja - -.gcc_cxx_modules_ninja_multi: - extends: .gcc_cxx_modules_x86_64 - - variables: - CMAKE_CONFIGURATION: linux_gcc_cxx_modules_ninja_multi - CMAKE_GENERATOR: "Ninja Multi-Config" - ### Debian 10 legacy packages .debian10: @@ -494,12 +495,8 @@ .before_script_linux: &before_script_linux - source .gitlab/ci/env.sh - - .gitlab/ci/cmake.sh - - export PATH=$PWD/.gitlab/cmake/bin:$PATH - - .gitlab/ci/ninja.sh - - export PATH=$PWD/.gitlab:$PATH - - cmake --version - - ninja --version + - source .gitlab/ci/cmake-env.sh + - source .gitlab/ci/ninja-env.sh .cmake_prep_source_linux: stage: prep @@ -509,8 +506,8 @@ - dnf install --setopt=install_weak_deps=False -y git-core - v="$(.gitlab/ci/cmake_version.sh)" - mkdir -p build/ - - git archive --format=tgz "--prefix=cmake-$v/" -o "build/cmake-$v.tar.gz" HEAD - - git -c core.autocrlf=true -c core.eol=crlf archive --format=zip --prefix="cmake-$v/" -o "build/cmake-$v.zip" HEAD + - git archive --format=tgz --prefix="cmake-$v/" -o "build/cmake-$v.tar.gz" HEAD + - git archive --format=zip --prefix="cmake-$v/" -o "build/cmake-$v.zip" HEAD interruptible: true @@ -526,7 +523,7 @@ .cmake_codespell_linux: stage: build - extends: .fedora38 + extends: .fedora40 script: - .gitlab/ci/codespell.sh interruptible: true @@ -574,8 +571,7 @@ - mkdir -p build/ - cp Utilities/Release/linux/$CMAKE_ARCH/cache.txt build/CMakeCache.txt # Make sccache available. - - .gitlab/ci/sccache.sh - - export PATH=$PWD/.gitlab:$PATH + - source .gitlab/ci/sccache-env.sh # Append sccache settings to the cache. - echo "CMAKE_C_COMPILER_LAUNCHER:STRING=sccache" >> build/CMakeCache.txt - echo "CMAKE_CXX_COMPILER_LAUNCHER:STRING=sccache" >> build/CMakeCache.txt @@ -670,7 +666,7 @@ .cmake_org_help: stage: build extends: - - .fedora38 + - .fedora40 - .linux_x86_64_tags - .cmake_org_help_artifacts script: diff --git a/.gitlab/os-macos.yml b/.gitlab/os-macos.yml index b3165fa0b70..2b265ea4908 100644 --- a/.gitlab/os-macos.yml +++ b/.gitlab/os-macos.yml @@ -7,7 +7,7 @@ GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci ext/$CI_CONCURRENT_ID" # TODO: Factor this out so that each job selects the Xcode version to # use so that different versions can be tested in a single pipeline. - DEVELOPER_DIR: "/Applications/Xcode-15.0.app/Contents/Developer" + DEVELOPER_DIR: "/Applications/Xcode-15.3.app/Contents/Developer" # Avoid conflicting with other projects running on the same machine. SCCACHE_SERVER_PORT: 4227 @@ -47,6 +47,13 @@ CMAKE_CI_IN_SYMLINK_TREE: 1 CMAKE_CI_BUILD_DIR: "real_work/work/build" +.macos_arm64_curl: + extends: .macos_build + + variables: + CMAKE_CONFIGURATION: macos_arm64_curl + CTEST_NO_WARNINGS_ALLOWED: 1 + .macos_arm64_pch: extends: .macos_arm64_ninja @@ -135,7 +142,7 @@ - cmake # Since this is a bare runner, pin to a project. - macos-x86_64 - shell - - xcode-15.0 + - xcode-15.3 - nonconcurrent .macos_x86_64_tags_ext: @@ -143,7 +150,7 @@ - cmake # Since this is a bare runner, pin to a project. - macos-x86_64 - shell - - xcode-15.0 + - xcode-15.3 - concurrent .macos_arm64_tags: @@ -151,7 +158,7 @@ - cmake # Since this is a bare runner, pin to a project. - macos-arm64 - shell - - xcode-15.0 + - xcode-15.3 - nonconcurrent .macos_arm64_tags_ext: @@ -159,7 +166,7 @@ - cmake # Since this is a bare runner, pin to a project. - macos-arm64 - shell - - xcode-15.0 + - xcode-15.3 - concurrent .macos_arm64_tags_package: @@ -167,7 +174,7 @@ - cmake # Since this is a bare runner, pin to a project. - macos-arm64 - shell - - xcode-15.0 + - xcode-15.3 - nonconcurrent - finder @@ -175,12 +182,8 @@ .before_script_macos: &before_script_macos - source .gitlab/ci/env.sh - - .gitlab/ci/cmake.sh - - export PATH=$PWD/.gitlab/cmake/bin:$PATH - - .gitlab/ci/ninja.sh - - export PATH=$PWD/.gitlab:$PATH - - cmake --version - - ninja --version + - source .gitlab/ci/cmake-env.sh + - source .gitlab/ci/ninja-env.sh # Download Qt - cmake -P .gitlab/ci/download_qt.cmake - export CMAKE_PREFIX_PATH=$PWD/.gitlab/qt${CMAKE_PREFIX_PATH:+:$CMAKE_PREFIX_PATH} diff --git a/.gitlab/os-windows.yml b/.gitlab/os-windows.yml index c449ab82531..1372136f94a 100644 --- a/.gitlab/os-windows.yml +++ b/.gitlab/os-windows.yml @@ -337,12 +337,23 @@ - msvc-19.36 - concurrent -.windows_x86_64_tags_concurrent_vs2019: +.windows_x86_64_tags_concurrent_vs2022_android: + tags: + - cmake # Since this is a bare runner, pin to a project. + - windows-x86_64 + - shell + - vs2022 + - vs17-android + - msvc-19.36 + - concurrent + +.windows_x86_64_tags_concurrent_vs2019_android: tags: - cmake # Since this is a bare runner, pin to a project. - windows-x86_64 - shell - vs2019 + - vs16-android - msvc-19.29-16.11 - concurrent @@ -375,15 +386,8 @@ .before_script_windows: &before_script_windows - . .gitlab/ci/env.ps1 - - $pwdpath = $pwd.Path - - (& "$pwsh" -File ".gitlab/ci/wix.ps1") - - Set-Item -Force -Path "env:WIX" -Value "$pwdpath\.gitlab\wix" - - (& "$pwsh" -File ".gitlab/ci/cmake.ps1") - - Set-Item -Force -Path "env:PATH" -Value "$pwdpath\.gitlab\cmake\bin;$env:PATH" - - $cmake = "cmake" + - . .gitlab/ci/cmake-env.ps1 - . .gitlab/ci/ninja-env.ps1 - - (& "$env:WIX\bin\light.exe" -help) | Select -First 1 - - cmake --version - . .gitlab/ci/qt-env.ps1 - . .gitlab/ci/python-env.ps1 @@ -396,7 +400,7 @@ script: - *before_script_windows - - Set-Item -Force -Path "env:PATH" -Value "$env:PATH;$env:SCCACHE_PATH" + - . .gitlab/ci/sccache-env.ps1 - Invoke-Expression -Command .gitlab/ci/vcvarsall.ps1 - sccache --start-server - sccache --show-stats diff --git a/.gitlab/rules.yml b/.gitlab/rules.yml index b85b7280e55..0402d33558b 100644 --- a/.gitlab/rules.yml +++ b/.gitlab/rules.yml @@ -4,6 +4,8 @@ rules: - if: '$CMAKE_CI_PACKAGE != null' when: never + - if: '($CMAKE_CI_NIGHTLY == "true" && $CMAKE_CI_JOB_NIGHTLY == "false")' + when: never - if: '$CMAKE_CI_NIGHTLY == "true"' when: on_success - if: '$CMAKE_CI_JOB_NIGHTLY == "true"' @@ -25,6 +27,8 @@ rules: - if: '$CMAKE_CI_PACKAGE != null' when: never + - if: '($CMAKE_CI_NIGHTLY == "true" && $CMAKE_CI_JOB_NIGHTLY == "false")' + when: never - if: '$CMAKE_CI_NIGHTLY == "true"' when: on_success - if: '$CMAKE_CI_JOB_NIGHTLY == "true"' @@ -46,6 +50,8 @@ rules: - if: '$CMAKE_CI_PACKAGE != null' when: never + - if: '($CMAKE_CI_NIGHTLY == "true" && $CMAKE_CI_JOB_NIGHTLY == "false")' + when: never - if: '($CMAKE_CI_NIGHTLY == "true" && $CMAKE_CI_NIGHTLY_IGNORE_DEPS == "true")' when: always - if: '$CMAKE_CI_NIGHTLY == "true"' diff --git a/.gitlab/upload.yml b/.gitlab/upload.yml index caa2119c314..6b463139381 100644 --- a/.gitlab/upload.yml +++ b/.gitlab/upload.yml @@ -1,7 +1,7 @@ # Steps for uploading artifacts .rsync_upload_package: - image: "fedora:38" + image: "fedora:40" stage: upload tags: - cmake @@ -21,7 +21,7 @@ .rsync_upload_help: stage: upload - image: "fedora:38" + image: "fedora:40" tags: - cmake - docker diff --git a/Auxiliary/cmake-mode.el b/Auxiliary/cmake-mode.el index 6bd23bf3886..cfa017362d5 100644 --- a/Auxiliary/cmake-mode.el +++ b/Auxiliary/cmake-mode.el @@ -1,4 +1,4 @@ -;;; cmake-mode.el --- major-mode for editing CMake sources +;;; cmake-mode.el --- major-mode for editing CMake sources -*- lexical-binding: t; -*- ;; Package-Requires: ((emacs "24.1")) @@ -258,15 +258,6 @@ Return t unless search stops due to end of buffer." (forward-line) t))) -(defun cmake-mark-defun () - "Mark the current CMake function or macro. - -This puts the mark at the end, and point at the beginning." - (interactive) - (cmake-end-of-defun) - (push-mark nil :nomsg :activate) - (cmake-beginning-of-defun)) - ;------------------------------------------------------------------------------ @@ -346,6 +337,10 @@ This puts the mark at the end, and point at the beginning." (define-derived-mode cmake-mode prog-mode "CMake" "Major mode for editing CMake source files." + ;; Setup jumping to beginning/end of a CMake function/macro. + (set (make-local-variable 'beginning-of-defun-function) #'cmake-beginning-of-defun) + (set (make-local-variable 'end-of-defun-function) #'cmake-end-of-defun) + ; Setup font-lock mode. (set (make-local-variable 'font-lock-defaults) '(cmake-font-lock-keywords)) ; Setup indentation function. @@ -356,11 +351,6 @@ This puts the mark at the end, and point at the beginning." (set (make-local-variable 'syntax-propertize-function) cmake--syntax-propertize-function) (add-hook 'syntax-propertize-extend-region-functions #'syntax-propertize-multiline nil t)) -;; Default cmake-mode key bindings -(define-key cmake-mode-map "\e\C-a" #'cmake-beginning-of-defun) -(define-key cmake-mode-map "\e\C-e" #'cmake-end-of-defun) -(define-key cmake-mode-map "\e\C-h" #'cmake-mark-defun) - ; Help mode starts here @@ -490,7 +480,8 @@ and store the result as a list in LISTVAR." ;;;###autoload (defun cmake-help () - "Queries for any of the four available help topics and prints out the appropriate page." + "Queries for any of the four available help topics and prints out the +appropriate page." (interactive) (let* ((default-entry (cmake-symbol-at-point)) (command-list (cmake-get-list "command")) diff --git a/Auxiliary/vim/indent/cmake.vim b/Auxiliary/vim/indent/cmake.vim index 0c662faa016..28ecf8443f3 100644 --- a/Auxiliary/vim/indent/cmake.vim +++ b/Auxiliary/vim/indent/cmake.vim @@ -17,6 +17,8 @@ let b:did_indent = 1 setlocal indentexpr=CMakeGetIndent(v:lnum) setlocal indentkeys+==ENDIF(,ENDFOREACH(,ENDMACRO(,ELSE(,ELSEIF(,ENDWHILE( +let b:undo_indent = "setl inde< indk<" + " Only define the function once. if exists("*CMakeGetIndent") finish diff --git a/Auxiliary/vim/syntax/cmake.vim b/Auxiliary/vim/syntax/cmake.vim index 4bbdc65a491..5d412c29f56 100644 --- a/Auxiliary/vim/syntax/cmake.vim +++ b/Auxiliary/vim/syntax/cmake.vim @@ -19,10 +19,10 @@ endif let s:keepcpo= &cpo set cpo&vim -syn region cmakeBracketArgument start="\[\z(=\?\|=[0-9]*\)\[" end="\]\z1\]" contains=cmakeTodo,@Spell +syn region cmakeBracketArgument start="\[\z(=*\)\[" end="\]\z1\]" contains=cmakeTodo,@Spell -syn region cmakeComment start="#" end="$" contains=cmakeTodo,@Spell -syn region cmakeBracketComment start="\[\z(=*\)\[" end="\]\z1\]" contains=cmakeTodo,@Spell +syn region cmakeComment start="#\(\[=*\[\)\@!" end="$" contains=cmakeTodo,@Spell +syn region cmakeBracketComment start="#\[\z(=*\)\[" end="\]\z1\]" contains=cmakeTodo,@Spell syn match cmakeEscaped /\(\\\\\|\\"\|\\n\|\\t\)/ contained syn region cmakeRegistry start="\[" end="]" contained oneline contains=cmakeTodo,cmakeEscaped @@ -70,6 +70,7 @@ syn keyword cmakeProperty contained \ ATTACHED_FILES \ ATTACHED_FILES_ON_FAIL \ AUTOGEN_BUILD_DIR + \ AUTOGEN_COMMAND_LINE_LENGTH_MAX \ AUTOGEN_ORIGIN_DEPENDS \ AUTOGEN_PARALLEL \ AUTOGEN_SOURCE_GROUP @@ -77,6 +78,7 @@ syn keyword cmakeProperty contained \ AUTOGEN_TARGETS_FOLDER \ AUTOGEN_TARGET_DEPENDS \ AUTOGEN_USE_SYSTEM_INCLUDE + \ AUTOGEN_BETTER_GRAPH_MULTI_CONFIG \ AUTOMOC \ AUTOMOC_COMPILER_PREDEFINES \ AUTOMOC_DEPEND_FILTERS @@ -374,6 +376,7 @@ syn keyword cmakeProperty contained \ Swift_LANGUAGE_VERSION \ Swift_MODULE_DIRECTORY \ Swift_MODULE_NAME + \ Swift_COMPILATION_MODE \ TARGET_ARCHIVES_MAY_BE_SHARED_LIBS \ TARGET_MESSAGES \ TARGET_SUPPORTS_SHARED_LIBS @@ -447,6 +450,7 @@ syn keyword cmakeProperty contained \ VS_STARTUP_PROJECT \ VS_TOOL_OVERRIDE \ VS_USER_PROPS + \ VS_FILTER_PROPS \ VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION \ VS_WINRT_COMPONENT \ VS_WINRT_EXTENSIONS @@ -764,6 +768,8 @@ syn keyword cmakeVariable contained \ CMAKE_ASM_STANDARD_REQUIRED \ CMAKE_ASM_SUPPORTED \ CMAKE_ASM_VISIBILITY_PRESET + \ CMAKE_AUTOGEN_BETTER_GRAPH_MULTI_CONFIG + \ CMAKE_AUTOGEN_COMMAND_LINE_LENGTH_MAX \ CMAKE_AUTOGEN_ORIGIN_DEPENDS \ CMAKE_AUTOGEN_PARALLEL \ CMAKE_AUTOGEN_USE_SYSTEM_INCLUDE @@ -1656,6 +1662,7 @@ syn keyword cmakeVariable contained \ CMAKE_SKIP_INSTALL_RPATH \ CMAKE_SKIP_INSTALL_RULES \ CMAKE_SKIP_RPATH + \ CMAKE_SKIP_TEST_ALL_DEPENDENCY \ CMAKE_SOURCE_DIR \ CMAKE_STAGING_PREFIX \ CMAKE_STATIC_LIBRARY_PREFIX @@ -2760,7 +2767,6 @@ syn keyword cmakeKWcmake_language contained \ DIRECTORY \ EVAL \ FALSE - \ FETCHCONTENT_MAKEAVAILABE_SERIAL \ FETCHCONTENT_MAKEAVAILABLE_SERIAL \ FETCHCONTENT_SOURCE_DIR_ \ FETCHCONTENT_TRY_FIND_PACKAGE_MODE diff --git a/CMakeCPack.cmake b/CMakeCPack.cmake index 798affd2f20..a0c0e54ffa3 100644 --- a/CMakeCPack.cmake +++ b/CMakeCPack.cmake @@ -229,15 +229,12 @@ endif() set(CPACK_WIX_UPGRADE_GUID "8ffd1d72-b7f1-11e2-8ee5-00238bca4991") -if(MSVC AND NOT "$ENV{WIX}" STREQUAL "") - set(WIX_CUSTOM_ACTION_ENABLED TRUE) +if(CMake_BUILD_WIX_CUSTOM_ACTION) if(CMAKE_CONFIGURATION_TYPES) - set(WIX_CUSTOM_ACTION_MULTI_CONFIG TRUE) + set(CMake_BUILD_WIX_CUSTOM_ACTION_MULTI_CONFIG TRUE) else() - set(WIX_CUSTOM_ACTION_MULTI_CONFIG FALSE) + set(CMake_BUILD_WIX_CUSTOM_ACTION_MULTI_CONFIG FALSE) endif() -else() - set(WIX_CUSTOM_ACTION_ENABLED FALSE) endif() # Set the options file that needs to be included inside CMakeCPackOptions.cmake diff --git a/CMakeCPackOptions.cmake.in b/CMakeCPackOptions.cmake.in index f354362b063..cbe73e760bb 100644 --- a/CMakeCPackOptions.cmake.in +++ b/CMakeCPackOptions.cmake.in @@ -5,7 +5,7 @@ if(CPACK_GENERATOR MATCHES "NSIS") set(CPACK_NSIS_INSTALL_ROOT "@CPACK_NSIS_INSTALL_ROOT@") - # set the install/unistall icon used for the installer itself + # set the install/uninstall icon used for the installer itself # There is a bug in NSI that does not handle full unix paths properly. set(CPACK_NSIS_MUI_ICON "@CMake_SOURCE_DIR@/Utilities/Release\\CMakeLogo.ico") set(CPACK_NSIS_MUI_UNIICON "@CMake_SOURCE_DIR@/Utilities/Release\\CMakeLogo.ico") @@ -265,17 +265,18 @@ if("${CPACK_GENERATOR}" STREQUAL "WIX") set(CPACK_WIX_EXTRA_SOURCES "@CMake_SOURCE_DIR@/Utilities/Release/WiX/install_dir.wxs" - "@CMake_SOURCE_DIR@/Utilities/Release/WiX/cmake_extra_dialog.wxs" + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/options.wxs" + "@CMake_SOURCE_DIR@/Utilities/Release/WiX/options_dlg.wxs" ) - set(_WIX_CUSTOM_ACTION_ENABLED "@WIX_CUSTOM_ACTION_ENABLED@") + set(_WIX_CUSTOM_ACTION_ENABLED "@CMake_BUILD_WIX_CUSTOM_ACTION@") if(_WIX_CUSTOM_ACTION_ENABLED) list(APPEND CPACK_WIX_EXTRA_SOURCES "@CMake_SOURCE_DIR@/Utilities/Release/WiX/cmake_nsis_overwrite_dialog.wxs" ) list(APPEND CPACK_WIX_CANDLE_EXTRA_FLAGS -dCHECK_NSIS=1) - set(_WIX_CUSTOM_ACTION_MULTI_CONFIG "@WIX_CUSTOM_ACTION_MULTI_CONFIG@") + set(_WIX_CUSTOM_ACTION_MULTI_CONFIG "@CMake_BUILD_WIX_CUSTOM_ACTION_MULTI_CONFIG@") if(_WIX_CUSTOM_ACTION_MULTI_CONFIG) if(CPACK_BUILD_CONFIG) set(_WIX_CUSTOM_ACTION_CONFIG "${CPACK_BUILD_CONFIG}") diff --git a/CMakeLists.txt b/CMakeLists.txt index a99cf50cad6..081bd7d1d89 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ # Distributed under the OSI-approved BSD 3-Clause License. See accompanying # file Copyright.txt or https://cmake.org/licensing for details. -cmake_minimum_required(VERSION 3.13...3.27 FATAL_ERROR) +cmake_minimum_required(VERSION 3.13...3.28 FATAL_ERROR) set(CMAKE_USER_MAKE_RULES_OVERRIDE_C ${CMAKE_CURRENT_SOURCE_DIR}/Source/Modules/OverrideC.cmake) set(CMAKE_USER_MAKE_RULES_OVERRIDE_CXX ${CMAKE_CURRENT_SOURCE_DIR}/Source/Modules/OverrideCXX.cmake) @@ -140,6 +140,7 @@ if(NOT CMake_TEST_EXTERNAL_CMAKE) if(CMAKE_SYSTEM_NAME MATCHES "Windows|Darwin|Linux|BSD|DragonFly|CYGWIN|MSYS" AND NOT (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.16) AND NOT (CMAKE_CXX_COMPILER_ID STREQUAL "XLClang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16.1) + AND NOT (CMAKE_CXX_COMPILER_ID STREQUAL "LCC" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 1.23) ) set(CMake_ENABLE_DEBUGGER 1) else() @@ -177,6 +178,9 @@ macro(CMAKE_HANDLE_SYSTEM_LIBRARIES) string(TOLOWER "${util}" lutil) set(CMAKE_USE_SYSTEM_${util} "${CMAKE_USE_SYSTEM_LIBRARY_${util}}" CACHE BOOL "Use system-installed ${lutil}" FORCE) + elseif(util STREQUAL "CURL" AND APPLE) + # macOS provides a curl with backends configured by Apple. + set(CMAKE_USE_SYSTEM_LIBRARY_${util} ON) else() set(CMAKE_USE_SYSTEM_LIBRARY_${util} OFF) endif() @@ -214,6 +218,10 @@ macro(CMAKE_HANDLE_SYSTEM_LIBRARIES) mark_as_advanced(CMAKE_USE_SYSTEM_KWIML) # Mention to the user what system libraries are being used. + if(CMAKE_USE_SYSTEM_CURL) + # Avoid messaging about curl-only dependencies. + list(REMOVE_ITEM UTILITIES NGHTTP2) + endif() foreach(util IN LISTS UTILITIES ITEMS KWIML) if(CMAKE_USE_SYSTEM_${util}) message(STATUS "Using system-installed ${util}") diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index a6a20827dcf..81f26f59f11 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -14,7 +14,7 @@ collaboration with a productive community of contributors. Please post to the ``Development`` category of the `CMake Forum`_ to raise discussion of development topics. -.. _`Kitware`: http://www.kitware.com/cmake +.. _`Kitware`: https://www.kitware.com/cmake .. _`CMake Forum`: https://discourse.cmake.org Patches diff --git a/CTestCustom.cmake.in b/CTestCustom.cmake.in index 85af8eda803..ae55715424a 100644 --- a/CTestCustom.cmake.in +++ b/CTestCustom.cmake.in @@ -12,11 +12,12 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION "warning: \\(Long double usage is reported only once for each file" "warning: To disable this warning use" "could not be inlined" - "libcmexpat.*has no symbols" - "libcmcurl.*has no symbols" + "libcm(curl|expat).*has no symbols" + "cm(curl|expat).build/[^ ]*.o has no symbols" "not sorted slower link editing will result" "stl_deque.h:479" "Utilities.cmzlib." + "Utilities.cmzstd." "Utilities.cmbzip2." "Source.CTest.Curl" "Source.CursesDialog.form" @@ -85,6 +86,7 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION "[0-9]+ Warning\\(s\\) detected" # SunPro # Ignore false positive on `cm::optional` usage from GCC + "cmFileCommand.cxx:[0-9]*:[0-9]*: warning: '\\*\\(\\(void\\*\\)& tls_verify \\+2\\)' may be used uninitialized in this function \\[-Wmaybe-uninitialized\\]" "cmGlobalNinjaGenerator.cxx:[0-9]*:[0-9]*: warning: '.*cm::optional::_mem\\)\\)' may be used uninitialized \\[-Wmaybe-uninitialized\\]" "cmGlobalNinjaGenerator.cxx:[0-9]*:[0-9]*: note: '.*cm::optional::_mem\\)\\)' was declared here" "cmGlobalNinjaGenerator.cxx:[0-9]*:[0-9]*: warning: '\\*\\(\\(void\\*\\)& modmap_fmt \\+4\\)' may be used uninitialized in this function \\[-Wmaybe-uninitialized\\]" diff --git a/Copyright.txt b/Copyright.txt index 515e403a2d4..2074109b019 100644 --- a/Copyright.txt +++ b/Copyright.txt @@ -1,5 +1,5 @@ CMake - Cross Platform Makefile Generator -Copyright 2000-2023 Kitware, Inc. and Contributors +Copyright 2000-2024 Kitware, Inc. and Contributors All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst index 5fe4326a3f3..c184a96d6c1 100644 --- a/Help/command/add_custom_command.rst +++ b/Help/command/add_custom_command.rst @@ -84,8 +84,8 @@ The options are: .. versionadded:: 3.20 Arguments to ``BYPRODUCTS`` may use a restricted set of :manual:`generator expressions `. - :ref:`Target-dependent expressions ` are not - permitted. + :ref:`Target-dependent expressions ` + are not permitted. .. versionchanged:: 3.28 In targets using :ref:`file sets`, custom command byproducts are now @@ -272,8 +272,8 @@ The options are: .. versionadded:: 3.20 Arguments to ``OUTPUT`` may use a restricted set of :manual:`generator expressions `. - :ref:`Target-dependent expressions ` are not - permitted. + :ref:`Target-dependent expressions ` + are not permitted. .. versionchanged:: 3.28 In targets using :ref:`file sets`, custom command outputs are now @@ -373,6 +373,11 @@ The options are: :manual:`generator expressions ` was also added. + .. versionadded:: 3.29 + The :ref:`Ninja Generators` will now incorporate the dependencies into its + "deps log" database if the file is not listed in ``OUTPUTS`` or + ``BYPRODUCTS``. + Using ``DEPFILE`` with generators other than those listed above is an error. If the ``DEPFILE`` argument is relative, it should be relative to @@ -544,11 +549,14 @@ one of the keywords to make clear the behavior they expect. lines or custom commands will be omitted for the specific configuration and no "empty-string-command" will be added. - This allows to add individual build events for every configuration. + This allows adding individual build events for every configuration. .. versionadded:: 3.21 Support for target-dependent generator expressions. +.. versionadded:: 3.29 + The ```` may be an :ref:`ALIAS target `. + Examples: Build Events ^^^^^^^^^^^^^^^^^^^^^^ diff --git a/Help/command/add_custom_target.rst b/Help/command/add_custom_target.rst index 0385a935352..d88e0f0d835 100644 --- a/Help/command/add_custom_target.rst +++ b/Help/command/add_custom_target.rst @@ -60,8 +60,8 @@ The options are: .. versionadded:: 3.20 Arguments to ``BYPRODUCTS`` may use a restricted set of :manual:`generator expressions `. - :ref:`Target-dependent expressions ` are not - permitted. + :ref:`Target-dependent expressions ` + are not permitted. .. versionchanged:: 3.28 In custom targets using :ref:`file sets`, byproducts are now diff --git a/Help/command/add_dependencies.rst b/Help/command/add_dependencies.rst index 23cb4058f9d..3a51a30b07a 100644 --- a/Help/command/add_dependencies.rst +++ b/Help/command/add_dependencies.rst @@ -20,6 +20,17 @@ transitively in its place since the target itself does not build. .. versionadded:: 3.3 Allow adding dependencies to interface libraries. +.. versionadded:: 3.8 + Dependencies will populate the :prop_tgt:`MANUALLY_ADDED_DEPENDENCIES` + property of ````. + +.. versionchanged:: 3.9 + The :ref:`Ninja Generators` use weaker ordering than + other generators in order to improve available concurrency. + They only guarantee that the dependencies' custom commands are + finished before sources in ```` start compiling; this + ensures generated sources are available. + See Also ^^^^^^^^ diff --git a/Help/command/add_executable.rst b/Help/command/add_executable.rst index d9ea0da1a14..b6833b4106b 100644 --- a/Help/command/add_executable.rst +++ b/Help/command/add_executable.rst @@ -10,15 +10,28 @@ Add an executable to the project using the specified source files. Normal Executables ^^^^^^^^^^^^^^^^^^ -.. code-block:: cmake +.. signature:: + add_executable( ... ...) + :target: normal - add_executable( [WIN32] [MACOSX_BUNDLE] - [EXCLUDE_FROM_ALL] - [source1] [source2 ...]) + Add an executable target called ```` to be built from the source + files listed in the command invocation. -Adds an executable target called ```` to be built from the source -files listed in the command invocation. The -```` corresponds to the logical target name and must be globally + The options are: + + ``WIN32`` + Set the :prop_tgt:`WIN32_EXECUTABLE` target property automatically. + See documentation of that target property for details. + + ``MACOSX_BUNDLE`` + Set the :prop_tgt:`MACOSX_BUNDLE` target property automatically. + See documentation of that target property for details. + + ``EXCLUDE_FROM_ALL`` + Set the :prop_tgt:`EXCLUDE_FROM_ALL` target property automatically. + See documentation of that target property for details. + +The ```` corresponds to the logical target name and must be globally unique within a project. The actual file name of the executable built is constructed based on conventions of the native platform (such as ``.exe`` or just ````). @@ -39,18 +52,6 @@ command was invoked. See documentation of the location. See documentation of the :prop_tgt:`OUTPUT_NAME` target property to change the ```` part of the final file name. -If ``WIN32`` is given the property :prop_tgt:`WIN32_EXECUTABLE` will be -set on the target created. See documentation of that target property for -details. - -If ``MACOSX_BUNDLE`` is given the corresponding property will be set on -the created target. See documentation of the :prop_tgt:`MACOSX_BUNDLE` -target property for details. - -If ``EXCLUDE_FROM_ALL`` is given the corresponding property will be set on -the created target. See documentation of the :prop_tgt:`EXCLUDE_FROM_ALL` -target property for details. - See the :manual:`cmake-buildsystem(7)` manual for more on defining buildsystem properties. @@ -61,17 +62,25 @@ within IDE. Imported Executables ^^^^^^^^^^^^^^^^^^^^ -.. code-block:: cmake - +.. signature:: add_executable( IMPORTED [GLOBAL]) + :target: IMPORTED + + Add an :ref:`IMPORTED executable target ` to reference + an executable file located outside the project. The target name may be + referenced like any target built within the project, except that by + default it is visible only in the directory in which it is created, + and below. + + The options are: + + ``GLOBAL`` + Make the target name globally visible. + +No rules are generated to build imported targets, and the :prop_tgt:`IMPORTED` +target property is ``True``. Imported executables are useful for convenient +reference from commands like :command:`add_custom_command`. -An :ref:`IMPORTED executable target ` references an -executable file located outside the project. No rules are generated to -build it, and the :prop_tgt:`IMPORTED` target property is ``True``. The -target name has scope in the directory in which it is created and below, but -the ``GLOBAL`` option extends visibility. It may be referenced like any -target built within the project. ``IMPORTED`` executables are useful -for convenient reference from commands like :command:`add_custom_command`. Details about the imported executable are specified by setting properties whose names begin in ``IMPORTED_``. The most important such property is :prop_tgt:`IMPORTED_LOCATION` (and its per-configuration version @@ -82,14 +91,14 @@ properties for more information. Alias Executables ^^^^^^^^^^^^^^^^^ -.. code-block:: cmake - +.. signature:: add_executable( ALIAS ) + :target: ALIAS -Creates an :ref:`Alias Target `, such that ```` can -be used to refer to ```` in subsequent commands. The ```` -does not appear in the generated buildsystem as a make target. The -```` may not be an ``ALIAS``. + Creates an :ref:`Alias Target `, such that ```` can + be used to refer to ```` in subsequent commands. The ```` + does not appear in the generated buildsystem as a make target. The + ```` may not be an ``ALIAS``. .. versionadded:: 3.11 An ``ALIAS`` can target a ``GLOBAL`` :ref:`Imported Target ` diff --git a/Help/command/add_library.rst b/Help/command/add_library.rst index 07c8babd29f..cab380e6d12 100644 --- a/Help/command/add_library.rst +++ b/Help/command/add_library.rst @@ -10,18 +10,39 @@ Add a library to the project using the specified source files. Normal Libraries ^^^^^^^^^^^^^^^^ -.. code-block:: cmake +.. signature:: + add_library( [] [EXCLUDE_FROM_ALL] ...) + :target: normal + + Add a library target called ```` to be built from the source files + listed in the command invocation. + + The optional ```` specifies the type of library to be created: + + ``STATIC`` + An archive of object files for use when linking other targets. + + ``SHARED`` + A dynamic library that may be linked by other targets and loaded + at runtime. + + ``MODULE`` + A plugin that may not be linked by other targets, but may be + dynamically loaded at runtime using dlopen-like functionality. + + If no ```` is given the default is ``STATIC`` or ``SHARED`` + based on the value of the :variable:`BUILD_SHARED_LIBS` variable. + + The options are: - add_library( [STATIC | SHARED | MODULE] - [EXCLUDE_FROM_ALL] - [...]) + ``EXCLUDE_FROM_ALL`` + Set the :prop_tgt:`EXCLUDE_FROM_ALL` target property automatically. + See documentation of that target property for details. -Adds a library target called ```` to be built from the source files -listed in the command invocation. The ```` -corresponds to the logical target name and must be globally unique within -a project. The actual file name of the library built is constructed based -on conventions of the native platform (such as ``lib.a`` or -``.lib``). +The ```` corresponds to the logical target name and must be globally +unique within a project. The actual file name of the library built is +constructed based on conventions of the native platform (such as +``lib.a`` or ``.lib``). .. versionadded:: 3.1 Source arguments to ``add_library`` may use "generator expressions" with @@ -32,15 +53,8 @@ on conventions of the native platform (such as ``lib.a`` or The source files can be omitted if they are added later using :command:`target_sources`. -``STATIC``, ``SHARED``, or ``MODULE`` may be given to specify the type of -library to be created. ``STATIC`` libraries are archives of object files -for use when linking other targets. ``SHARED`` libraries are linked -dynamically and loaded at runtime. ``MODULE`` libraries are plugins that -are not linked into other targets but may be loaded dynamically at runtime -using dlopen-like functionality. If no type is given explicitly the -type is ``STATIC`` or ``SHARED`` based on whether the current value of the -variable :variable:`BUILD_SHARED_LIBS` is ``ON``. For ``SHARED`` and -``MODULE`` libraries the :prop_tgt:`POSITION_INDEPENDENT_CODE` target +For ``SHARED`` and ``MODULE`` libraries the +:prop_tgt:`POSITION_INDEPENDENT_CODE` target property is set to ``ON`` automatically. A ``SHARED`` library may be marked with the :prop_tgt:`FRAMEWORK` target property to create an macOS Framework. @@ -63,10 +77,6 @@ invoked. See documentation of the :prop_tgt:`ARCHIVE_OUTPUT_DIRECTORY`, location. See documentation of the :prop_tgt:`OUTPUT_NAME` target property to change the ```` part of the final file name. -If ``EXCLUDE_FROM_ALL`` is given the corresponding property will be set on -the created target. See documentation of the :prop_tgt:`EXCLUDE_FROM_ALL` -target property for details. - See the :manual:`cmake-buildsystem(7)` manual for more on defining buildsystem properties. @@ -74,17 +84,25 @@ See also :prop_sf:`HEADER_FILE_ONLY` on what to do if some sources are pre-processed, and you want to have the original sources reachable from within IDE. +.. versionchanged:: 3.30 + + On platforms that do not support shared libraries, ``add_library`` + now fails on calls creating ``SHARED`` libraries instead of + automatically converting them to ``STATIC`` libraries as before. + See policy :policy:`CMP0164`. + Object Libraries ^^^^^^^^^^^^^^^^ -.. code-block:: cmake +.. signature:: + add_library( OBJECT ...) + :target: OBJECT - add_library( OBJECT [...]) + Add an :ref:`Object Library ` to compile source files + without archiving or linking their object files into a library. -Creates an :ref:`Object Library `. An object library -compiles source files but does not archive or link their object files into a -library. Instead other targets created by ``add_library`` or -:command:`add_executable` may reference the objects using an expression of the +Other targets created by ``add_library`` or :command:`add_executable` +may reference the objects using an expression of the form :genex:`$\ ` as a source, where ``objlib`` is the object library name. For example: @@ -109,46 +127,48 @@ consider adding at least one real source file to any target that references Interface Libraries ^^^^^^^^^^^^^^^^^^^ -.. code-block:: cmake - +.. signature:: add_library( INTERFACE) - -Creates an :ref:`Interface Library `. -An ``INTERFACE`` library target does not compile sources and does -not produce a library artifact on disk. However, it may have -properties set on it and it may be installed and exported. -Typically, ``INTERFACE_*`` properties are populated on an interface -target using the commands: - -* :command:`set_property`, -* :command:`target_link_libraries(INTERFACE)`, -* :command:`target_link_options(INTERFACE)`, -* :command:`target_include_directories(INTERFACE)`, -* :command:`target_compile_options(INTERFACE)`, -* :command:`target_compile_definitions(INTERFACE)`, and -* :command:`target_sources(INTERFACE)`, - -and then it is used as an argument to :command:`target_link_libraries` -like any other target. - -An interface library created with the above signature has no source files -itself and is not included as a target in the generated buildsystem. - -.. versionadded:: 3.15 - An interface library can have :prop_tgt:`PUBLIC_HEADER` and - :prop_tgt:`PRIVATE_HEADER` properties. The headers specified by those - properties can be installed using the :command:`install(TARGETS)` command. - -.. versionadded:: 3.19 - An interface library target may be created with source files: - - .. code-block:: cmake - - add_library( INTERFACE [...] [EXCLUDE_FROM_ALL]) - - Source files may be listed directly in the ``add_library`` call or added - later by calls to :command:`target_sources` with the ``PRIVATE`` or - ``PUBLIC`` keywords. + :target: INTERFACE + + Add an :ref:`Interface Library ` target that may + specify usage requirements for dependents but does not compile sources + and does not produce a library artifact on disk. + + An interface library with no source files is not included as a target + in the generated buildsystem. However, it may have + properties set on it and it may be installed and exported. + Typically, ``INTERFACE_*`` properties are populated on an interface + target using the commands: + + * :command:`set_property`, + * :command:`target_link_libraries(INTERFACE)`, + * :command:`target_link_options(INTERFACE)`, + * :command:`target_include_directories(INTERFACE)`, + * :command:`target_compile_options(INTERFACE)`, + * :command:`target_compile_definitions(INTERFACE)`, and + * :command:`target_sources(INTERFACE)`, + + and then it is used as an argument to :command:`target_link_libraries` + like any other target. + + .. versionadded:: 3.15 + An interface library can have :prop_tgt:`PUBLIC_HEADER` and + :prop_tgt:`PRIVATE_HEADER` properties. The headers specified by those + properties can be installed using the :command:`install(TARGETS)` command. + +.. signature:: + add_library( INTERFACE [EXCLUDE_FROM_ALL] ...) + :target: INTERFACE-with-sources + + .. versionadded:: 3.19 + + Add an :ref:`Interface Library ` target with + source files (in addition to usage requirements and properties as + documented by the :command:`above signature `). + Source files may be listed directly in the ``add_library`` call + or added later by calls to :command:`target_sources` with the + ``PRIVATE`` or ``PUBLIC`` keywords. If an interface library has source files (i.e. the :prop_tgt:`SOURCES` target property is set), or header sets (i.e. the :prop_tgt:`HEADER_SETS` @@ -158,92 +178,106 @@ itself and is not included as a target in the generated buildsystem. but does contain build rules for custom commands created by the :command:`add_custom_command` command. -.. note:: - In most command signatures where the ``INTERFACE`` keyword appears, - the items listed after it only become part of that target's usage - requirements and are not part of the target's own settings. However, - in this signature of ``add_library``, the ``INTERFACE`` keyword refers - to the library type only. Sources listed after it in the ``add_library`` - call are ``PRIVATE`` to the interface library and do not appear in its - :prop_tgt:`INTERFACE_SOURCES` target property. + The options are: + + ``EXCLUDE_FROM_ALL`` + Set the :prop_tgt:`EXCLUDE_FROM_ALL` target property automatically. + See documentation of that target property for details. + + .. note:: + In most command signatures where the ``INTERFACE`` keyword appears, + the items listed after it only become part of that target's usage + requirements and are not part of the target's own settings. However, + in this signature of ``add_library``, the ``INTERFACE`` keyword refers + to the library type only. Sources listed after it in the ``add_library`` + call are ``PRIVATE`` to the interface library and do not appear in its + :prop_tgt:`INTERFACE_SOURCES` target property. .. _`add_library imported libraries`: Imported Libraries ^^^^^^^^^^^^^^^^^^ -.. code-block:: cmake - +.. signature:: add_library( IMPORTED [GLOBAL]) - -Creates an :ref:`IMPORTED library target ` called ````. -No rules are generated to build it, and the :prop_tgt:`IMPORTED` target -property is ``True``. The target name has scope in the directory in which -it is created and below, but the ``GLOBAL`` option extends visibility. -It may be referenced like any target built within the project. -``IMPORTED`` libraries are useful for convenient reference from commands -like :command:`target_link_libraries`. Details about the imported library -are specified by setting properties whose names begin in ``IMPORTED_`` and -``INTERFACE_``. - -The ```` must be one of: - -``STATIC``, ``SHARED``, ``MODULE``, ``UNKNOWN`` - References a library file located outside the project. The - :prop_tgt:`IMPORTED_LOCATION` target property (or its per-configuration - variant :prop_tgt:`IMPORTED_LOCATION_`) specifies the - location of the main library file on disk: - - * For a ``SHARED`` library on most non-Windows platforms, the main library - file is the ``.so`` or ``.dylib`` file used by both linkers and dynamic - loaders. If the referenced library file has a ``SONAME`` (or on macOS, - has a ``LC_ID_DYLIB`` starting in ``@rpath/``), the value of that field - should be set in the :prop_tgt:`IMPORTED_SONAME` target property. - If the referenced library file does not have a ``SONAME``, but the - platform supports it, then the :prop_tgt:`IMPORTED_NO_SONAME` target - property should be set. - - * For a ``SHARED`` library on Windows, the :prop_tgt:`IMPORTED_IMPLIB` - target property (or its per-configuration variant - :prop_tgt:`IMPORTED_IMPLIB_`) specifies the location of the - DLL import library file (``.lib`` or ``.dll.a``) on disk, and the - ``IMPORTED_LOCATION`` is the location of the ``.dll`` runtime - library (and is optional, but needed by the :genex:`TARGET_RUNTIME_DLLS` - generator expression). - - Additional usage requirements may be specified in ``INTERFACE_*`` properties. - - An ``UNKNOWN`` library type is typically only used in the implementation of - :ref:`Find Modules`. It allows the path to an imported library (often found - using the :command:`find_library` command) to be used without having to know - what type of library it is. This is especially useful on Windows where a - static library and a DLL's import library both have the same file extension. - -``OBJECT`` - References a set of object files located outside the project. - The :prop_tgt:`IMPORTED_OBJECTS` target property (or its per-configuration - variant :prop_tgt:`IMPORTED_OBJECTS_`) specifies the locations of - object files on disk. - Additional usage requirements may be specified in ``INTERFACE_*`` properties. - -``INTERFACE`` - Does not reference any library or object files on disk, but may - specify usage requirements in ``INTERFACE_*`` properties. - -See documentation of the ``IMPORTED_*`` and ``INTERFACE_*`` properties -for more information. + :target: IMPORTED + + Add an :ref:`IMPORTED library target ` called ````. + The target name may be referenced like any target built within the project, + except that by default it is visible only in the directory in which it is + created, and below. + + The ```` must be one of: + + ``STATIC``, ``SHARED``, ``MODULE``, ``UNKNOWN`` + References a library file located outside the project. The + :prop_tgt:`IMPORTED_LOCATION` target property (or its per-configuration + variant :prop_tgt:`IMPORTED_LOCATION_`) specifies the + location of the main library file on disk: + + * For a ``SHARED`` library on most non-Windows platforms, the main library + file is the ``.so`` or ``.dylib`` file used by both linkers and dynamic + loaders. If the referenced library file has a ``SONAME`` (or on macOS, + has a ``LC_ID_DYLIB`` starting in ``@rpath/``), the value of that field + should be set in the :prop_tgt:`IMPORTED_SONAME` target property. + If the referenced library file does not have a ``SONAME``, but the + platform supports it, then the :prop_tgt:`IMPORTED_NO_SONAME` target + property should be set. + + * For a ``SHARED`` library on Windows, the :prop_tgt:`IMPORTED_IMPLIB` + target property (or its per-configuration variant + :prop_tgt:`IMPORTED_IMPLIB_`) specifies the location of the + DLL import library file (``.lib`` or ``.dll.a``) on disk, and the + ``IMPORTED_LOCATION`` is the location of the ``.dll`` runtime + library (and is optional, but needed by the :genex:`TARGET_RUNTIME_DLLS` + generator expression). + + Additional usage requirements may be specified in ``INTERFACE_*`` + properties. + + An ``UNKNOWN`` library type is typically only used in the implementation + of :ref:`Find Modules`. It allows the path to an imported library + (often found using the :command:`find_library` command) to be used + without having to know what type of library it is. This is especially + useful on Windows where a static library and a DLL's import library + both have the same file extension. + + ``OBJECT`` + References a set of object files located outside the project. + The :prop_tgt:`IMPORTED_OBJECTS` target property (or its per-configuration + variant :prop_tgt:`IMPORTED_OBJECTS_`) specifies the locations of + object files on disk. + Additional usage requirements may be specified in ``INTERFACE_*`` + properties. + + ``INTERFACE`` + Does not reference any library or object files on disk, but may + specify usage requirements in ``INTERFACE_*`` properties. + + The options are: + + ``GLOBAL`` + Make the target name globally visible. + +No rules are generated to build imported targets, and the :prop_tgt:`IMPORTED` +target property is ``True``. Imported libraries are useful for convenient +reference from commands like :command:`target_link_libraries`. + +Details about the imported library are specified by setting properties whose +names begin in ``IMPORTED_`` and ``INTERFACE_``. See documentation of +such properties for more information. Alias Libraries ^^^^^^^^^^^^^^^ -.. code-block:: cmake - +.. signature:: add_library( ALIAS ) + :target: ALIAS -Creates an :ref:`Alias Target `, such that ```` can be -used to refer to ```` in subsequent commands. The ```` does -not appear in the generated buildsystem as a make target. The ```` -may not be an ``ALIAS``. + Creates an :ref:`Alias Target `, such that ```` can be + used to refer to ```` in subsequent commands. The ```` does + not appear in the generated buildsystem as a make target. The ```` + may not be an ``ALIAS``. .. versionadded:: 3.11 An ``ALIAS`` can target a ``GLOBAL`` :ref:`Imported Target ` diff --git a/Help/command/add_test.rst b/Help/command/add_test.rst index 02dd3986aa7..557c858b859 100644 --- a/Help/command/add_test.rst +++ b/Help/command/add_test.rst @@ -27,9 +27,37 @@ directory the test is created in. ``add_test`` options are: ``COMMAND`` - Specify the test command-line. If ```` specifies an executable - target created by :command:`add_executable`, it will automatically be - replaced by the location of the executable created at build time. + Specify the test command-line. + + If ```` specifies an executable target created by + :command:`add_executable`: + + * It will automatically be replaced by the location of the executable + created at build time. + + * .. versionadded:: 3.3 + + The target's :prop_tgt:`CROSSCOMPILING_EMULATOR`, if set, will be + used to run the command on the host:: + + + + .. versionchanged:: 3.29 + + The emulator is used only when + :variable:`cross-compiling `. + See policy :policy:`CMP0158`. + + * .. versionadded:: 3.29 + + The target's :prop_tgt:`TEST_LAUNCHER`, if set, will be + used to launch the command:: + + + + If the :prop_tgt:`CROSSCOMPILING_EMULATOR` is also set, both are used:: + + The command may be specified using :manual:`generator expressions `. diff --git a/Help/command/cmake_language.rst b/Help/command/cmake_language.rst index 707568cf798..38d06bb2314 100644 --- a/Help/command/cmake_language.rst +++ b/Help/command/cmake_language.rst @@ -15,6 +15,7 @@ Synopsis cmake_language(`DEFER`_ ... CALL [...]) cmake_language(`SET_DEPENDENCY_PROVIDER`_ SUPPORTED_METHODS ...) cmake_language(`GET_MESSAGE_LOG_LEVEL`_ ) + cmake_language(`EXIT`_ ) Introduction ^^^^^^^^^^^^ @@ -195,7 +196,7 @@ prints:: Immediate Message Deferred Message -The ``Cancelled Message`` is never printed because its command is +The ``Canceled Message`` is never printed because its command is canceled. The ``deferred_message`` variable reference is not evaluated until the call site, so it can be set after the deferred call is scheduled. @@ -317,7 +318,7 @@ be one of the ```` that was specified when setting the provider. implementation as part of its processing, it can do so by including the ``BYPASS_PROVIDER`` keyword as one of the arguments. -``FETCHCONTENT_MAKEAVAILABE_SERIAL`` +``FETCHCONTENT_MAKEAVAILABLE_SERIAL`` The ```` will be everything passed to the :command:`FetchContent_Declare` call that corresponds to the requested dependency, with the following exceptions: @@ -506,3 +507,25 @@ Getting current message log level If both the command line option and the variable are set, the command line option takes precedence. If neither are set, the default logging level is returned. + +Terminating Scripts +^^^^^^^^^^^^^^^^^^^ + +.. versionadded:: 3.29 + +.. signature:: + cmake_language(EXIT ) + + Terminate the current :option:`cmake -P` script and exit with ````. + + This command works only in :ref:`script mode