From d2b648ec4c09d91f57ee73838d284b67366123f6 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 12 Nov 2020 11:35:11 -0500 Subject: [PATCH 1/7] clang-tidy: ignore `misc-no-recursion` CMake has intentional recursion in its codebase, so avoid warning about occurrences. --- .clang-tidy | 1 + 1 file changed, 1 insertion(+) diff --git a/.clang-tidy b/.clang-tidy index 10819efd12..5e513fbd1b 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -7,6 +7,7 @@ bugprone-*,\ -bugprone-too-small-loop-variable,\ google-readability-casting,\ misc-*,\ +-misc-no-recursion,\ -misc-non-private-member-variables-in-classes,\ -misc-static-assert,\ modernize-*,\ From 6a83417908f77051344475d419a92c2ef7a47ee6 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 12 Nov 2020 11:36:23 -0500 Subject: [PATCH 2/7] clang-tidy: ignore new warnings from newer versions These warnings can be fixed in the future, but are ignored for now. --- .clang-tidy | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.clang-tidy b/.clang-tidy index 5e513fbd1b..11e1726325 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -4,6 +4,9 @@ bugprone-*,\ -bugprone-macro-parentheses,\ -bugprone-misplaced-widening-cast,\ -bugprone-narrowing-conversions,\ +-bugprone-reserved-identifier,\ +-bugprone-signed-char-misuse,\ +-bugprone-suspicious-include,\ -bugprone-too-small-loop-variable,\ google-readability-casting,\ misc-*,\ @@ -17,6 +20,8 @@ modernize-*,\ -modernize-use-trailing-return-type,\ -modernize-use-transparent-functors,\ performance-*,\ +-performance-no-automatic-move,\ +-performance-trivially-destructible,\ readability-*,\ -readability-convert-member-functions-to-static,\ -readability-function-size,\ @@ -24,9 +29,15 @@ readability-*,\ -readability-implicit-bool-conversion,\ -readability-inconsistent-declaration-parameter-name,\ -readability-magic-numbers,\ +-readability-make-member-function-const,\ -readability-named-parameter,\ +-readability-qualified-auto,\ +-readability-redundant-access-specifiers,\ -readability-redundant-declaration,\ +-readability-redundant-string-init,\ +-readability-simplify-boolean-expr,\ -readability-uppercase-literal-suffix,\ +-readability-use-anyofallof,\ " HeaderFilterRegex: 'Source/cm[^/]*\.(h|hxx|cxx)$' CheckOptions: From 86f196f63410f144328acaff80ece2b750f8b8a1 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 12 Nov 2020 13:42:47 -0500 Subject: [PATCH 3/7] Tests/FindBoost/TestPython: support finding 3.8 and 3.9 --- Tests/FindBoost/TestPython/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/FindBoost/TestPython/CMakeLists.txt b/Tests/FindBoost/TestPython/CMakeLists.txt index 4d137ca0d1..6d292cd398 100644 --- a/Tests/FindBoost/TestPython/CMakeLists.txt +++ b/Tests/FindBoost/TestPython/CMakeLists.txt @@ -2,10 +2,10 @@ cmake_minimum_required(VERSION 3.14) project(TestFindBoostPython CXX) include(CTest) -find_package(Boost OPTIONAL_COMPONENTS python27 python34 python35 python36 python37) +find_package(Boost OPTIONAL_COMPONENTS python27 python34 python35 python36 python37 python38 python39) set(FAILTEST TRUE) -foreach (v IN ITEMS 27 34 35 36 37) +foreach (v IN ITEMS 27 34 35 36 37 38 39) if (Boost_PYTHON${v}_FOUND) set(FAILTEST FALSE) break() From ada31706253c3953f48f86d571e5255cb4556113 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 22 Oct 2020 09:28:08 -0400 Subject: [PATCH 4/7] ci: install gmock in the Fedora 31 image The gmock libraries are referenced by GTest's CMake package files. While at it, also explicitly install gettext. It is installed already, but make it explicit for future testing of the FindGettext module. (cherry picked from commit 585cc7c9301ff474a40d7702ce429b93f474d44f) --- .gitlab/ci/docker/fedora31/install_deps.sh | 2 ++ .gitlab/os-linux.yml | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab/ci/docker/fedora31/install_deps.sh b/.gitlab/ci/docker/fedora31/install_deps.sh index fa57f61f21..c1391e3faa 100755 --- a/.gitlab/ci/docker/fedora31/install_deps.sh +++ b/.gitlab/ci/docker/fedora31/install_deps.sh @@ -39,8 +39,10 @@ dnf install --setopt=install_weak_deps=False -y \ fontconfig-devel \ freetype-devel \ gdal-devel \ + gettext \ giflib-devel \ glew-devel \ + gmock \ gnutls-devel \ gsl-devel \ gtest-devel \ diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml index 9438676260..4e8fb80010 100644 --- a/.gitlab/os-linux.yml +++ b/.gitlab/os-linux.yml @@ -49,7 +49,7 @@ ### Fedora .fedora31: - image: "kitware/cmake:ci-fedora31-x86_64-2020-10-20" + image: "kitware/cmake:ci-fedora31-x86_64-2020-10-22" variables: GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci" From bd62d2ecf3c9e4753113c077e33aa96482f0edb0 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 12 Nov 2020 09:42:28 -0500 Subject: [PATCH 5/7] ci: update to Fedora 33 for Linux builds --- .gitlab/ci/docker/{fedora31 => fedora33}/Dockerfile | 4 ++-- .gitlab/ci/docker/{fedora31 => fedora33}/install_deps.sh | 0 .gitlab/ci/docker/{fedora31 => fedora33}/install_ispc.sh | 0 .gitlab/ci/docker/{fedora31 => fedora33}/install_rvm.sh | 3 +++ 4 files changed, 5 insertions(+), 2 deletions(-) rename .gitlab/ci/docker/{fedora31 => fedora33}/Dockerfile (90%) rename .gitlab/ci/docker/{fedora31 => fedora33}/install_deps.sh (100%) rename .gitlab/ci/docker/{fedora31 => fedora33}/install_ispc.sh (100%) rename .gitlab/ci/docker/{fedora31 => fedora33}/install_rvm.sh (75%) diff --git a/.gitlab/ci/docker/fedora31/Dockerfile b/.gitlab/ci/docker/fedora33/Dockerfile similarity index 90% rename from .gitlab/ci/docker/fedora31/Dockerfile rename to .gitlab/ci/docker/fedora33/Dockerfile index 80ab3798cd..8ebcb9ee3f 100644 --- a/.gitlab/ci/docker/fedora31/Dockerfile +++ b/.gitlab/ci/docker/fedora33/Dockerfile @@ -1,10 +1,10 @@ -FROM fedora:31 as rvm-build +FROM fedora:33 as rvm-build MAINTAINER Ben Boeckel COPY install_rvm.sh /root/install_rvm.sh RUN sh /root/install_rvm.sh -FROM fedora:31 +FROM fedora:33 MAINTAINER Ben Boeckel COPY install_deps.sh /root/install_deps.sh diff --git a/.gitlab/ci/docker/fedora31/install_deps.sh b/.gitlab/ci/docker/fedora33/install_deps.sh similarity index 100% rename from .gitlab/ci/docker/fedora31/install_deps.sh rename to .gitlab/ci/docker/fedora33/install_deps.sh diff --git a/.gitlab/ci/docker/fedora31/install_ispc.sh b/.gitlab/ci/docker/fedora33/install_ispc.sh similarity index 100% rename from .gitlab/ci/docker/fedora31/install_ispc.sh rename to .gitlab/ci/docker/fedora33/install_ispc.sh diff --git a/.gitlab/ci/docker/fedora31/install_rvm.sh b/.gitlab/ci/docker/fedora33/install_rvm.sh similarity index 75% rename from .gitlab/ci/docker/fedora31/install_rvm.sh rename to .gitlab/ci/docker/fedora33/install_rvm.sh index 2332ab75ef..6d4fa97f90 100755 --- a/.gitlab/ci/docker/fedora31/install_rvm.sh +++ b/.gitlab/ci/docker/fedora33/install_rvm.sh @@ -13,6 +13,9 @@ dnf install --setopt=install_weak_deps=False -y \ curl -sSL https://get.rvm.io | bash -s stable +# This is intentionally an older version. +# If updating, the associated `env_fedora*_makefiles.cmake` file needs updated +# as well. /usr/local/rvm/bin/rvm install ruby-2.7.0 tar -C /usr/local -cf /root/rvm.tar rvm From 061f7d5ca396babb8488ea523f14a3cd64a22892 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 12 Nov 2020 09:44:32 -0500 Subject: [PATCH 6/7] gitlab-ci: update Linux CI to use Fedora 33 --- .gitlab-ci.yml | 34 ++++++++-------- .gitlab/ci/configure_fedora31_tidy.cmake | 3 -- ....cmake => configure_fedora33_common.cmake} | 0 ...ake => configure_fedora33_makefiles.cmake} | 0 ...a.cmake => configure_fedora33_ninja.cmake} | 2 +- ...e => configure_fedora33_ninja_multi.cmake} | 0 ....cmake => configure_fedora33_sphinx.cmake} | 0 ...> configure_fedora33_sphinx_package.cmake} | 0 .gitlab/ci/configure_fedora33_tidy.cmake | 3 ++ ...les.cmake => env_fedora33_makefiles.cmake} | 0 .gitlab/os-linux.yml | 40 +++++++++---------- 11 files changed, 41 insertions(+), 41 deletions(-) delete mode 100644 .gitlab/ci/configure_fedora31_tidy.cmake rename .gitlab/ci/{configure_fedora31_common.cmake => configure_fedora33_common.cmake} (100%) rename .gitlab/ci/{configure_fedora31_makefiles.cmake => configure_fedora33_makefiles.cmake} (100%) rename .gitlab/ci/{configure_fedora31_ninja.cmake => configure_fedora33_ninja.cmake} (75%) rename .gitlab/ci/{configure_fedora31_ninja_multi.cmake => configure_fedora33_ninja_multi.cmake} (100%) rename .gitlab/ci/{configure_fedora31_sphinx.cmake => configure_fedora33_sphinx.cmake} (100%) rename .gitlab/ci/{configure_fedora31_sphinx_package.cmake => configure_fedora33_sphinx_package.cmake} (100%) create mode 100644 .gitlab/ci/configure_fedora33_tidy.cmake rename .gitlab/ci/{env_fedora31_makefiles.cmake => env_fedora33_makefiles.cmake} (100%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eda96ae401..5550c2fc87 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -46,7 +46,7 @@ prep:source-package: prep:doc-package: extends: - - .fedora31_sphinx_package + - .fedora33_sphinx_package - .cmake_prep_doc_linux - .linux_builder_tags_qt - .cmake_doc_artifacts @@ -72,16 +72,16 @@ build:debian10-iwyu: - .linux_builder_tags - .run_automatically -build:fedora31-tidy: +build:fedora33-tidy: extends: - - .fedora31_tidy + - .fedora33_tidy - .cmake_build_linux - .linux_builder_tags_qt - .run_automatically -build:fedora31-sphinx: +build:fedora33-sphinx: extends: - - .fedora31_sphinx + - .fedora33_sphinx - .cmake_build_linux - .linux_builder_tags_qt - .run_automatically @@ -110,9 +110,9 @@ test:debian10-ninja: needs: - build:centos6-release -test:fedora31-makefiles: +test:fedora33-makefiles: extends: - - .fedora31_makefiles + - .fedora33_makefiles - .cmake_test_linux_package - .linux_builder_tags_qt - .run_dependent @@ -132,36 +132,36 @@ test:cuda10.2-nvidia: needs: - build:centos6-release -build:fedora31-ninja: +build:fedora33-ninja: extends: - - .fedora31_ninja + - .fedora33_ninja - .cmake_build_linux - .cmake_build_artifacts - .linux_builder_tags_qt - .run_manually -test:fedora31-ninja: +test:fedora33-ninja: extends: - - .fedora31_ninja + - .fedora33_ninja - .cmake_test_linux - .linux_builder_tags_x11 - .cmake_test_artifacts - .run_dependent dependencies: - - build:fedora31-ninja + - build:fedora33-ninja needs: - - build:fedora31-ninja + - build:fedora33-ninja -test:fedora31-ninja-multi: +test:fedora33-ninja-multi: extends: - - .fedora31_ninja_multi + - .fedora33_ninja_multi - .cmake_test_linux_external - .linux_builder_tags_qt - .run_dependent dependencies: - - test:fedora31-ninja + - test:fedora33-ninja needs: - - test:fedora31-ninja + - test:fedora33-ninja build:linux-x86_64-package: extends: diff --git a/.gitlab/ci/configure_fedora31_tidy.cmake b/.gitlab/ci/configure_fedora31_tidy.cmake deleted file mode 100644 index 55d022c899..0000000000 --- a/.gitlab/ci/configure_fedora31_tidy.cmake +++ /dev/null @@ -1,3 +0,0 @@ -set(CMake_RUN_CLANG_TIDY ON CACHE BOOL "") - -include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora31_common.cmake") diff --git a/.gitlab/ci/configure_fedora31_common.cmake b/.gitlab/ci/configure_fedora33_common.cmake similarity index 100% rename from .gitlab/ci/configure_fedora31_common.cmake rename to .gitlab/ci/configure_fedora33_common.cmake diff --git a/.gitlab/ci/configure_fedora31_makefiles.cmake b/.gitlab/ci/configure_fedora33_makefiles.cmake similarity index 100% rename from .gitlab/ci/configure_fedora31_makefiles.cmake rename to .gitlab/ci/configure_fedora33_makefiles.cmake diff --git a/.gitlab/ci/configure_fedora31_ninja.cmake b/.gitlab/ci/configure_fedora33_ninja.cmake similarity index 75% rename from .gitlab/ci/configure_fedora31_ninja.cmake rename to .gitlab/ci/configure_fedora33_ninja.cmake index ea429c1b4a..883f425e7b 100644 --- a/.gitlab/ci/configure_fedora31_ninja.cmake +++ b/.gitlab/ci/configure_fedora33_ninja.cmake @@ -4,4 +4,4 @@ set(CMake_TEST_GUI "ON" CACHE BOOL "") # Cover compilation with C++11 only and not higher standards. set(CMAKE_CXX_STANDARD "11" CACHE STRING "") -include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora31_common.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora33_common.cmake") diff --git a/.gitlab/ci/configure_fedora31_ninja_multi.cmake b/.gitlab/ci/configure_fedora33_ninja_multi.cmake similarity index 100% rename from .gitlab/ci/configure_fedora31_ninja_multi.cmake rename to .gitlab/ci/configure_fedora33_ninja_multi.cmake diff --git a/.gitlab/ci/configure_fedora31_sphinx.cmake b/.gitlab/ci/configure_fedora33_sphinx.cmake similarity index 100% rename from .gitlab/ci/configure_fedora31_sphinx.cmake rename to .gitlab/ci/configure_fedora33_sphinx.cmake diff --git a/.gitlab/ci/configure_fedora31_sphinx_package.cmake b/.gitlab/ci/configure_fedora33_sphinx_package.cmake similarity index 100% rename from .gitlab/ci/configure_fedora31_sphinx_package.cmake rename to .gitlab/ci/configure_fedora33_sphinx_package.cmake diff --git a/.gitlab/ci/configure_fedora33_tidy.cmake b/.gitlab/ci/configure_fedora33_tidy.cmake new file mode 100644 index 0000000000..9052fdc562 --- /dev/null +++ b/.gitlab/ci/configure_fedora33_tidy.cmake @@ -0,0 +1,3 @@ +set(CMake_RUN_CLANG_TIDY ON CACHE BOOL "") + +include("${CMAKE_CURRENT_LIST_DIR}/configure_fedora33_common.cmake") diff --git a/.gitlab/ci/env_fedora31_makefiles.cmake b/.gitlab/ci/env_fedora33_makefiles.cmake similarity index 100% rename from .gitlab/ci/env_fedora31_makefiles.cmake rename to .gitlab/ci/env_fedora33_makefiles.cmake diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml index 4e8fb80010..3808020f1d 100644 --- a/.gitlab/os-linux.yml +++ b/.gitlab/os-linux.yml @@ -48,36 +48,36 @@ ### Fedora -.fedora31: - image: "kitware/cmake:ci-fedora31-x86_64-2020-10-22" +.fedora33: + image: "kitware/cmake:ci-fedora33-x86_64-2020-11-13" variables: GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci" #### Lint builds -.fedora31_tidy: - extends: .fedora31 +.fedora33_tidy: + extends: .fedora33 variables: - CMAKE_CONFIGURATION: fedora31_tidy + CMAKE_CONFIGURATION: fedora33_tidy CTEST_NO_WARNINGS_ALLOWED: 1 CMake_SKIP_INSTALL: 1 -.fedora31_sphinx: - extends: .fedora31 +.fedora33_sphinx: + extends: .fedora33 variables: - CMAKE_CONFIGURATION: fedora31_sphinx + CMAKE_CONFIGURATION: fedora33_sphinx CTEST_NO_WARNINGS_ALLOWED: 1 CTEST_SOURCE_SUBDIRECTORY: "Utilities/Sphinx" CMake_SKIP_INSTALL: 1 -.fedora31_sphinx_package: - extends: .fedora31 +.fedora33_sphinx_package: + extends: .fedora33 variables: - CMAKE_CONFIGURATION: fedora31_sphinx_package + CMAKE_CONFIGURATION: fedora33_sphinx_package CTEST_SOURCE_SUBDIRECTORY: "Utilities/Sphinx" #### Build and test @@ -89,26 +89,26 @@ CMAKE_CONFIGURATION: debian10_ninja CTEST_NO_WARNINGS_ALLOWED: 1 -.fedora31_ninja: - extends: .fedora31 +.fedora33_ninja: + extends: .fedora33 variables: - CMAKE_CONFIGURATION: fedora31_ninja + CMAKE_CONFIGURATION: fedora33_ninja CTEST_NO_WARNINGS_ALLOWED: 1 -.fedora31_ninja_multi: - extends: .fedora31 +.fedora33_ninja_multi: + extends: .fedora33 variables: - CMAKE_CONFIGURATION: fedora31_ninja_multi + CMAKE_CONFIGURATION: fedora33_ninja_multi CTEST_NO_WARNINGS_ALLOWED: 1 CMAKE_GENERATOR: "Ninja Multi-Config" -.fedora31_makefiles: - extends: .fedora31 +.fedora33_makefiles: + extends: .fedora33 variables: - CMAKE_CONFIGURATION: fedora31_makefiles + CMAKE_CONFIGURATION: fedora33_makefiles CTEST_NO_WARNINGS_ALLOWED: 1 CMAKE_GENERATOR: "Unix Makefiles" From 6e35919e15b350c771afe8e9dc2a510dc4300e02 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Thu, 12 Nov 2020 09:44:45 -0500 Subject: [PATCH 7/7] gitlab-ci: use Fedora 33 to build sources --- .gitlab/os-linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/os-linux.yml b/.gitlab/os-linux.yml index 3808020f1d..c69302a38a 100644 --- a/.gitlab/os-linux.yml +++ b/.gitlab/os-linux.yml @@ -12,7 +12,7 @@ LAUNCHER: "scl enable devtoolset-6 rh-python36 --" .linux_prep_source: - image: "fedora:32" + image: "fedora:33" variables: GIT_CLONE_PATH: "$CI_BUILDS_DIR/cmake ci"