Browse Source

Bump minimal CMake version to 3.5 to silence a CMake 3.27 warning.

next
Vladimír Vondruš 3 years ago
parent
commit
74767f4db4
  1. 13
      CMakeLists.txt
  2. 2
      doc/python/pages/building.rst
  3. 5
      doc/python/pages/changelog.rst
  4. 37
      package/ci/circleci.yml

13
CMakeLists.txt

@ -23,7 +23,8 @@
# DEALINGS IN THE SOFTWARE. # DEALINGS IN THE SOFTWARE.
# #
cmake_minimum_required(VERSION 3.4) # Matches Corrade requirement, see its root CMakeLists for more information.
cmake_minimum_required(VERSION 3.5)
project(MagnumBindings CXX) project(MagnumBindings CXX)
@ -121,15 +122,7 @@ if(_MAGNUMBINDINGS_ACCEPT_DEPRECATED_UNPREFIXED_OPTIONS AND MAGNUM_BUILD_DEPRECA
endforeach() endforeach()
if(_MAGNUMBINDINGS_WARN_DEPRECATED_UNPREFIXED_OPTION) if(_MAGNUMBINDINGS_WARN_DEPRECATED_UNPREFIXED_OPTION)
# CMake 3.5+ has deprecation warnings enabled by default (which makes message(DEPRECATION "Unprefixed options such as ${_MAGNUMBINDINGS_WARN_DEPRECATED_UNPREFIXED_OPTION} are deprecated, use MAGNUM_${_MAGNUMBINDINGS_WARN_DEPRECATED_UNPREFIXED_OPTION} instead. Delete the unprefixed variable from CMake cache or set both to the same value to silence this warning.")
# sense), 3.4 not. Use a warning there instead.
# TODO: drop when 3.4 is not supported anymore
if(CMAKE_VERSION VERSION_LESS 3.5)
set(DEPRECATION_OR_WARNING WARNING)
else()
set(DEPRECATION_OR_WARNING DEPRECATION)
endif()
message(${DEPRECATION_OR_WARNING} "Unprefixed options such as ${_MAGNUMBINDINGS_WARN_DEPRECATED_UNPREFIXED_OPTION} are deprecated, use MAGNUM_${_MAGNUMBINDINGS_WARN_DEPRECATED_UNPREFIXED_OPTION} instead. Delete the unprefixed variable from CMake cache or set both to the same value to silence this warning.")
endif() endif()
endif() endif()

2
doc/python/pages/building.rst

@ -204,7 +204,7 @@ following commands, the resulting HTML overview is located in
========================= =========================
In ``package/ci/`` there is a ``circleci.yml`` file that compiles and tests the In ``package/ci/`` there is a ``circleci.yml`` file that compiles and tests the
bindings on Linux GCC 4.8 + CMake 3.4 and on macOS, online at bindings on Linux GCC 4.8 + CMake 3.5 and on macOS, online at
https://circleci.com/gh/mosra/magnum-bindings. For Windows there is an https://circleci.com/gh/mosra/magnum-bindings. For Windows there is an
``appveyor.yml`` testing on Windows with MSVC, online at ``appveyor.yml`` testing on Windows with MSVC, online at
https://ci.appveyor.com/project/mosra/magnum-bindings. Code coverage for both https://ci.appveyor.com/project/mosra/magnum-bindings. Code coverage for both

5
doc/python/pages/changelog.rst

@ -35,6 +35,11 @@ Changelog
`Changes since 2020.06`_ `Changes since 2020.06`_
======================== ========================
- Minimal supported CMake version is now 3.5, changed from 3.4, since CMake
3.27+ warns if a compatibility with CMake below 3.5 is requested. Older
versions are not supported anymore and all workarounds for them were
removed. This is a conservative change, as there are no known supported
distributions which would have anything older than 3.5.
- Exposed the :ref:`corrade.BUILD_DEPRECATED` and - Exposed the :ref:`corrade.BUILD_DEPRECATED` and
:ref:`magnum.BUILD_DEPRECATED` constants, as some features may work :ref:`magnum.BUILD_DEPRECATED` constants, as some features may work
differently depending on these being enabled or not and it's useful to be differently depending on these being enabled or not and it's useful to be

37
package/ci/circleci.yml

@ -33,7 +33,8 @@ commands:
command: | command: |
apt update apt update
if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then export LCOV_PACKAGES="lcov curl"; fi if [[ "$CMAKE_CXX_FLAGS" == *"--coverage"* ]]; then export LCOV_PACKAGES="lcov curl"; fi
apt install -y git ninja-build $LCOV_PACKAGES << parameters.extra >> # libidn11 needed by CMake
apt install -y git ninja-build libidn11 $LCOV_PACKAGES << parameters.extra >>
install-base-macos: install-base-macos:
parameters: parameters:
@ -60,17 +61,27 @@ commands:
echo 'export CC=gcc-4.8' >> $BASH_ENV echo 'export CC=gcc-4.8' >> $BASH_ENV
echo 'export CXX=g++-4.8' >> $BASH_ENV echo 'export CXX=g++-4.8' >> $BASH_ENV
install-cmake-3_4: install-cmake:
parameters:
version:
type: string
sudo:
type: string
default: ""
steps: steps:
- run: - run:
name: Install CMake 3.4 name: Install CMake << parameters.version >>
command: | command: |
apt install -y wget libidn11 version_short=<< parameters.version >>
version_short="${version_short%.*}"
<< parameters.sudo >> apt install -y wget
mkdir -p $HOME/cmake && cd $HOME/cmake mkdir -p $HOME/cmake && cd $HOME/cmake
wget -nc --no-check-certificate https://cmake.org/files/v3.4/cmake-3.4.3-Linux-x86_64.tar.gz wget -nc --no-check-certificate https://cmake.org/files/v$version_short/cmake-<< parameters.version >>-Linux-x86_64.tar.gz
tar --strip-components=1 -xzf cmake-3.4.3-Linux-x86_64.tar.gz tar --strip-components=1 -xzf cmake-<< parameters.version >>-Linux-x86_64.tar.gz
echo 'export PATH=$HOME/cmake/bin:$PATH' >> $BASH_ENV echo 'export PATH=$HOME/cmake/bin:$PATH' >> $BASH_ENV
source $BASH_ENV && cmake --version | grep 3.4 source $BASH_ENV
cmake --version | grep << parameters.version >>
ctest --version | grep << parameters.version >>
install-python-3_6: install-python-3_6:
# Can't use the python3.6 docker image because there I can't install GCC # Can't use the python3.6 docker image because there I can't install GCC
@ -221,7 +232,8 @@ jobs:
- install-base-linux: - install-base-linux:
extra: libgl1-mesa-dev libsdl2-dev libglfw3-dev extra: libgl1-mesa-dev libsdl2-dev libglfw3-dev
- install-gcc-4_8 - install-gcc-4_8
- install-cmake-3_4 - install-cmake:
version: "3.5.2"
- install-python-3_6 - install-python-3_6
- install-pybind11 - install-pybind11
- install-meshoptimizer - install-meshoptimizer
@ -243,7 +255,8 @@ jobs:
- install-base-linux: - install-base-linux:
extra: libsdl2-dev libglfw3-dev wget unzip extra: libsdl2-dev libglfw3-dev wget unzip
- install-gcc-4_8 - install-gcc-4_8
- install-cmake-3_4 - install-cmake:
version: "3.5.2"
- install-python-3_6 - install-python-3_6
- install-pybind11 - install-pybind11
- install-meshoptimizer - install-meshoptimizer
@ -267,7 +280,8 @@ jobs:
- install-base-linux: - install-base-linux:
extra: libsdl2-dev libglfw3-dev wget unzip extra: libsdl2-dev libglfw3-dev wget unzip
- install-gcc-4_8 - install-gcc-4_8
- install-cmake-3_4 - install-cmake:
version: "3.5.2"
- install-python-3_6 - install-python-3_6
- install-pybind11 - install-pybind11
- install-meshoptimizer - install-meshoptimizer
@ -292,7 +306,8 @@ jobs:
- install-base-linux: - install-base-linux:
extra: libsdl2-dev libglfw3-dev extra: libsdl2-dev libglfw3-dev
- install-gcc-4_8 - install-gcc-4_8
- install-cmake-3_4 - install-cmake:
version: "3.5.2"
- install-python-3_6 - install-python-3_6
- install-pybind11 - install-pybind11
- install-meshoptimizer - install-meshoptimizer

Loading…
Cancel
Save