]> granicus.if.org Git - graphviz/commitdiff
fix claimed minimum supported CMake version
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 24 Nov 2021 03:16:46 +0000 (19:16 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Tue, 30 Nov 2021 04:43:48 +0000 (20:43 -0800)
Commit 354ed2c644452f300b316d166386bd40d8fec76f, among others, introduced the
use of `$<TARGET_OBJECTS>` in `target_link_libraries` calls. The CMake docs¹
claim this is only officially supported from 3.21 onwards, despite working in
some prior versions. CMake provides binaries going back many versions² so it is
possible to manually bisect exactly what this wording in the CMake docs means.
Running this process yields the answer that CMake 3.9 is the first version that
does not error out when encountering `$<TARGET_OBJECTS>` in a
`target_link_libraries` expression.

Note that the Graphviz CMake files also use some features like `endif` without
an expression, which claims to only be supported from CMake 3.14 onwards.³
Despite this, versions as far back as CMake 3.1 support this syntax just fine.

¹ https://cmake.org/cmake/help/latest/command/target_link_libraries.html#linking-object-libraries-via-target-objects
² https://cmake.org/files/
³ https://cmake.org/cmake/help/v3.13/command/endif.html vs
  https://cmake.org/cmake/help/v3.14/command/endif.html

CHANGELOG.md
CMakeLists.txt

index 0894a87b3771c192199ee548d7d2a4c10f8f2904..9105fca5edc79bc5559e5e0271e9283a6609eeb1 100644 (file)
@@ -33,6 +33,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
   to match the implementation
 - xdot JSON output is not valid JSON #1958
 - fix uninitialized read of `pid` in `_sfpopen` on Windows
+- claimed minimum CMake version supported has been corrected to 3.9
 
 ## [2.49.3] – 2021-10-22
 
index ad63eb3ceb0fabb560ff365fcbdabb9219da95ba..8090ff420bfd958a23308384cdf5305c4841bbc5 100644 (file)
@@ -1,4 +1,4 @@
-cmake_minimum_required (VERSION 3.1 FATAL_ERROR)
+cmake_minimum_required (VERSION 3.9 FATAL_ERROR)
 project (Graphviz)
 
 include(FeatureSummary)