From: Matthew Fernandez Date: Thu, 13 Oct 2022 00:52:52 +0000 (-0700) Subject: bump required CMake version to 3.13.0 X-Git-Tag: 7.0.0~11^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=da82cbb9802c7924d8000335cb32505507a69c79;p=graphviz bump required CMake version to 3.13.0 This allows dropping several workarounds in the CMake build system. The only supported platform with a CMake version less than 3.13.0 is Ubuntu 18.04. Given CMake is not the default build system, the age of Ubuntu 18.04 makes it unlikely there are users there building Graphviz from source, and later CMake versions are easily obtainable from Kitware, it seems reasonable to increase this requirement. Gitlab: #2290 --- diff --git a/CHANGELOG.md b/CHANGELOG.md index c3cf7ddcb..484da7f31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **Breaking**: An `outline_height` field has been added to the `Agnodeinfo_t` struct. - When using the CMake build system, the minimum requirement has been increased - from CMake 3.9 to CMake 3.10.2. + from CMake 3.9 to CMake 3.13.0. - When compiling Graphviz with the Intel C Compiler, the Autotools build system no longer suppresses `-ffast-math`. Users relying on this are encouraged to investigate what in their build environment is appending a flag their C diff --git a/CMakeLists.txt b/CMakeLists.txt index aa8a33e7e..b609dfc33 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR) +cmake_minimum_required(VERSION 3.13.0 FATAL_ERROR) project(Graphviz) include(FeatureSummary) @@ -143,14 +143,7 @@ endif() # ============================ Set Graphviz version ============================ -if(${CMAKE_VERSION} VERSION_LESS "3.12.0") - find_program(Python3_EXECUTABLE NAMES python3 python3.exe python.exe) -else() - find_package(Python3 COMPONENTS Interpreter) -endif() -if(NOT Python3_EXECUTABLE) - message(FATAL_ERROR "Python 3 not found") -endif() +find_package(Python3 REQUIRED COMPONENTS Interpreter) if(DEFINED VERSION) set(GRAPHVIZ_VERSION_STRING "${VERSION}") @@ -246,11 +239,7 @@ endif() if(use_coverage) add_compile_options("-coverage") - if(${CMAKE_VERSION} VERSION_LESS "3.13.0") - link_libraries("-coverage") - else() - add_link_options("-coverage") - endif() + add_link_options("-coverage") endif() # ============================ Packaging information =========================== diff --git a/cmake/FindCAIRO.cmake b/cmake/FindCAIRO.cmake index 5d706b614..a92916eb9 100644 --- a/cmake/FindCAIRO.cmake +++ b/cmake/FindCAIRO.cmake @@ -38,12 +38,6 @@ else() find_package(PkgConfig) pkg_check_modules(CAIRO cairo) - # prior to CMake 3.12, PkgConfig does not set *_LINK_LIBRARIES, so do it - # manually - if(${CMAKE_VERSION} VERSION_LESS 3.12) - find_library(CAIRO_LINK_LIBRARIES cairo PATHS ENV LIBRARY_PATH) - endif() - find_package_handle_standard_args(CAIRO DEFAULT_MSG CAIRO_INCLUDE_DIRS CAIRO_LIBRARIES diff --git a/cmake/FindPANGOCAIRO.cmake b/cmake/FindPANGOCAIRO.cmake index e045e8ff6..b92e5bea9 100644 --- a/cmake/FindPANGOCAIRO.cmake +++ b/cmake/FindPANGOCAIRO.cmake @@ -80,13 +80,6 @@ else() find_package(PkgConfig) pkg_check_modules(PANGOCAIRO pangocairo) - # prior to CMake 3.12, PkgConfig does not set *_LINK_LIBRARIES, so do it - # manually - if(${CMAKE_VERSION} VERSION_LESS 3.12) - find_library(PANGOCAIRO_LINK_LIBRARIES pangocairo-1.0 - PATHS ENV LIBRARY_PATH) - endif() - find_package_handle_standard_args(PANGOCAIRO DEFAULT_MSG PANGOCAIRO_INCLUDE_DIRS PANGOCAIRO_LIBRARIES