]> git.ipfire.org Git - thirdparty/zstd.git/commit
Provide forward compatible cmake paradigms 1475/head
authorHans Johnson <hans.j.johnson@gmail.com>
Mon, 24 Dec 2018 14:18:26 +0000 (08:18 -0600)
committerHans Johnson <hans.j.johnson@gmail.com>
Fri, 28 Dec 2018 19:47:35 +0000 (13:47 -0600)
commit97d1de3d22c5ad53a465d76a5708a4ba90d0ed8b
tree91c78a46a907ce0a5d86c5a1a48da95367e51c0c
parent23c73fe3e28321fd8747e1f310e0bd3e989e3d00
Provide forward compatible cmake paradigms

Automatically extract version information
from the zstd.h file.  Use naming of variables
consisent with modern cmake and https://semver.org/
(Semantic Versioning 2.0.0, MAJOR, MINOR, PATCH)

Modern versions of cmake provide consistent
paradigms for configuring project external
interface values.

This set of changes provide a back port of
some of cmake 3+ paradigms back to cmake 2.8.9.
Set and allow use of the current cmake policies
for newer versions of cmake when available to
allow for modern compiler features to be
utilized when available.

NOTE: The intent is that future modifications to
cmake will enable (conditional on cmake version support)
the ability to support modern linkage, and target
export mechanisms.  Those future changes will
make incorporating zstd into other packages
much easier.

This patch also allows the more rigourous error
checking of commmon cmake errors to be preformed
by cmake (i.e. more stringent syntax checking and
create errors for common hard to find misuses of
cmake variables).

This patch also provides support for modern
compiler support options by cmake (like
enabling interprocedural optimization
if link time optimizations are known to be supported
by the compiler envirionment.  IPO can be supported
by setting the CMAKE_INTERPROCEDURAL_OPTIMIZATION variable
for newer versions of cmake.
build/cmake/CMakeLists.txt
build/cmake/CMakeModules/GetZstdLibraryVersion.cmake
build/cmake/lib/CMakeLists.txt