From 88887a8d9143eaca1372235320ca7c964243cc0c Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Thu, 18 Nov 2021 17:06:01 -0500 Subject: [PATCH] chore: bump to 3.22.0 --- .bumpversion.cfg | 2 +- .gitlab-ci.yml | 2 +- README.md | 2 +- chapters/basics.md | 6 +++--- chapters/intro/installing.md | 18 +++++++++--------- examples/CMakeLists.txt | 2 +- examples/extended-project/CMakeLists.txt | 4 ++-- examples/fetch/CMakeLists.txt | 2 +- examples/root-dict/CMakeLists.txt | 2 +- examples/root-simple/CMakeLists.txt | 2 +- examples/root-usefile/CMakeLists.txt | 2 +- examples/simple-project/CMakeLists.txt | 2 +- 12 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index ad5b473..0d8d105 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 3.21.4 +current_version = 3.22.0 [bumpversion:file:.gitlab-ci.yml] search = cmake-{current_version}-linux diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0db7513..f59ff6b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,7 +5,7 @@ test_code: - apt-get update && apt-get install -y make cmake libboost-dev git # We will install latest CMake, even though Ubuntu has a recent one - mkdir -p $HOME/.local - - curl -s "https://cmake.org/files/v3.21/cmake-3.21.4-linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C $HOME/.local + - curl -s "https://cmake.org/files/v3.22/cmake-3.22.0-linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C $HOME/.local - export PATH=$HOME/.local/bin:$PATH script: - cmake -S examples -B build diff --git a/README.md b/README.md index 90412c0..8b8420b 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ Certainly there are no shortage of problems when building. But I think that, in 2021, we have a very good solution to quite a few of those problems. It's CMake. Not CMake 2.8 though; that was released before C++11 even existed! Nor the horrible examples out there for CMake (even those posted on KitWare's own tutorials list). -I'm talking about Modern CMake. CMake 3.4+, maybe even CMake 3.21+! +I'm talking about Modern CMake. CMake 3.4+, maybe even CMake 3.22+! It's clean, powerful, and elegant, so you can spend most of your time coding, not adding lines to an unreadable, unmaintainable Make (Or CMake 2) file. And CMake 3.11+ is supposed to be significantly faster, as well! diff --git a/chapters/basics.md b/chapters/basics.md index b5558c9..68468a1 100644 --- a/chapters/basics.md +++ b/chapters/basics.md @@ -36,7 +36,7 @@ Windows users, who also usually have a very recent version of CMake. This is what new projects should do: ```cmake -cmake_minimum_required(VERSION 3.7...3.21) +cmake_minimum_required(VERSION 3.7...3.22) if(${CMAKE_VERSION} VERSION_LESS 3.12) cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) @@ -56,10 +56,10 @@ you will want to do this instead: ```cmake cmake_minimum_required(VERSION 3.7) -if(${CMAKE_VERSION} VERSION_LESS 3.21) +if(${CMAKE_VERSION} VERSION_LESS 3.22) cmake_policy(VERSION ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}) else() - cmake_policy(VERSION 3.21) + cmake_policy(VERSION 3.22) endif() ``` diff --git a/chapters/intro/installing.md b/chapters/intro/installing.md index fb0fc52..358779d 100644 --- a/chapters/intro/installing.md +++ b/chapters/intro/installing.md @@ -4,7 +4,7 @@ Your CMake version should be newer than your compiler. It should be newer than the libraries you are using (especially Boost). New versions work better for everyone. {% endhint %} -If you have a built in copy of CMake, it isn't special or customized for your system. You can easily install a new one instead, either on the system level or the user level. Feel free to instruct your users here if they complain about a CMake requirement being set too high. Especially if they want 3.1+ support. Maybe even if they want 3.21+ support... +If you have a built in copy of CMake, it isn't special or customized for your system. You can easily install a new one instead, either on the system level or the user level. Feel free to instruct your users here if they complain about a CMake requirement being set too high. Especially if they want 3.1+ support. Maybe even if they want 3.22+ support... #### Quick list (more info on each method below) @@ -34,14 +34,14 @@ You can [download CMake from KitWare][download]. This is how you will probably g On Linux, there are several options. Kitware provides a [Debian/Ubunutu apt repository][apt], as well as [snap packages][snap]. There are universal Linux binaries provided, but you'll need to pick an install location. If you already use `~/.local` for user-space packages, the following single line command[^1] will get CMake for you [^2]: {% term %} -~ $ wget -qO- "https://cmake.org/files/v3.21/cmake-3.21.4-linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C ~/.local +~ $ wget -qO- "https://cmake.org/files/v3.22/cmake-3.22.0-linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C ~/.local {% endterm %} -The names changed in 3.21; older releases had names like `cmake-3.19.7-Linux-x86_64.tar.gz`. If you just want a local folder with CMake only: +The names changed in 3.22; older releases had names like `cmake-3.19.7-Linux-x86_64.tar.gz`. If you just want a local folder with CMake only: {% term %} -~ $ mkdir -p cmake-3.21 && wget -qO- "https://cmake.org/files/v3.21/cmake-3.21.4-linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C cmake-3.21 -~ $ export PATH=`pwd`/cmake-3.21/bin:$PATH +~ $ mkdir -p cmake-3.22 && wget -qO- "https://cmake.org/files/v3.22/cmake-3.22.0-linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C cmake-3.22 +~ $ export PATH=`pwd`/cmake-3.22/bin:$PATH {% endterm %} You'll obviously want to append to the PATH every time you start a new terminal, or add it to your `.bashrc` or to an [LMod][] system. @@ -49,7 +49,7 @@ You'll obviously want to append to the PATH every time you start a new terminal, And, if you want a system install, install to `/usr/local`; this is an excellent choice in a Docker container, for example on GitLab CI. Do not try it on a non-containerized system. {% term %} -docker $ wget -qO- "https://cmake.org/files/v3.21/cmake-3.21.4-linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/local +docker $ wget -qO- "https://cmake.org/files/v3.22/cmake-3.22.0-linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/local {% endterm %} @@ -126,9 +126,9 @@ Just `pip install cmake` on many systems. Add `--user` if you have to (modern pi |---------------|---------------|-------| | [TravisCI Xenial](https://docs.travis-ci.com/user/reference/xenial/#compilers-and-build-toolchain) | 3.12.4 | Mid November 2018 this image became ready for widescale use. | | [TravisCI Bionic](https://docs.travis-ci.com/user/reference/bionic/#compilers-and-build-toolchain) | 3.12.4 | Same as Xenial at the moment. | -| [Azure DevOps 18.04](https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops#use-a-microsoft-hosted-agent) | 3.21.3 | kept up to date | -| [GitHub Actions 18.04](https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu1804-README.md) | 3.21.3 | Same runners as Azure DevOps | -| [GitHub Actions 20.04](https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md) | 3.21.3 | Same runners as Azure DevOps | +| [Azure DevOps 18.04](https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops#use-a-microsoft-hosted-agent) | 3.22.3 | kept up to date | +| [GitHub Actions 18.04](https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu1804-README.md) | 3.22.3 | Same runners as Azure DevOps | +| [GitHub Actions 20.04](https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-README.md) | 3.22.3 | Same runners as Azure DevOps | If you are using GitHub Actions, also see the [jwlawson/actions-setup-cmake](https://github.com/marketplace/actions/actions-setup-cmake) action, which can install your selection of CMake, even in a docker action run. diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 71e7442..806f09b 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.11...3.21) +cmake_minimum_required(VERSION 3.11...3.22) project(ModernCMakeExamples) set(MODERN_CMAKE_BUILD_TESTING ON) diff --git a/examples/extended-project/CMakeLists.txt b/examples/extended-project/CMakeLists.txt index 81bfdb6..3dac513 100644 --- a/examples/extended-project/CMakeLists.txt +++ b/examples/extended-project/CMakeLists.txt @@ -1,5 +1,5 @@ -# Works with 3.11 and tested through 3.21 -cmake_minimum_required(VERSION 3.11...3.21) +# Works with 3.11 and tested through 3.22 +cmake_minimum_required(VERSION 3.11...3.22) # Project name and a few useful settings. Other commands can pick up the results project( diff --git a/examples/fetch/CMakeLists.txt b/examples/fetch/CMakeLists.txt index 53757cd..32ce2d5 100644 --- a/examples/fetch/CMakeLists.txt +++ b/examples/fetch/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.14...3.21) +cmake_minimum_required(VERSION 3.14...3.22) project(FetchExample LANGUAGES CXX) diff --git a/examples/root-dict/CMakeLists.txt b/examples/root-dict/CMakeLists.txt index 9d1e522..d9da294 100644 --- a/examples/root-dict/CMakeLists.txt +++ b/examples/root-dict/CMakeLists.txt @@ -2,7 +2,7 @@ ## [main] -cmake_minimum_required(VERSION 3.4...3.21) +cmake_minimum_required(VERSION 3.4...3.22) project(RootDictExample LANGUAGES CXX) diff --git a/examples/root-simple/CMakeLists.txt b/examples/root-simple/CMakeLists.txt index 707faa1..d98fffd 100644 --- a/examples/root-simple/CMakeLists.txt +++ b/examples/root-simple/CMakeLists.txt @@ -1,7 +1,7 @@ # CMake ROOT simple example ## [main] -cmake_minimum_required(VERSION 3.1...3.21) +cmake_minimum_required(VERSION 3.1...3.22) project(RootSimpleExample LANGUAGES CXX) diff --git a/examples/root-usefile/CMakeLists.txt b/examples/root-usefile/CMakeLists.txt index 0978bc1..92760b2 100644 --- a/examples/root-usefile/CMakeLists.txt +++ b/examples/root-usefile/CMakeLists.txt @@ -1,7 +1,7 @@ # CMake ROOT usefile example ## [main] -cmake_minimum_required(VERSION 3.1...3.21) +cmake_minimum_required(VERSION 3.1...3.22) project(RootUseFileExample LANGUAGES CXX) diff --git a/examples/simple-project/CMakeLists.txt b/examples/simple-project/CMakeLists.txt index d27a110..8e33633 100644 --- a/examples/simple-project/CMakeLists.txt +++ b/examples/simple-project/CMakeLists.txt @@ -6,7 +6,7 @@ # You should always specify a range with the newest # and oldest tested versions of CMake. This will ensure # you pick up the best policies. -cmake_minimum_required(VERSION 3.1...3.21) +cmake_minimum_required(VERSION 3.1...3.22) # This is your project statement. You should always list languages; # Listing the version is nice here since it sets lots of useful variables