]> granicus.if.org Git - graphviz/commit
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)
commite8fc9af14c5b223b5abe55f0dba811eeb9c15a4f
treebf1034b0fdde82652a4de1fda187babdb0cdd4c0
parented9ba048fa5d0f9b0c2c746cbb20c56076492593
fix claimed minimum supported CMake version

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