From ebabb88f24cc9f3c1c02cc79cb98d7dc5605fcaa Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Thu, 10 Oct 2019 09:25:32 +0200 Subject: cmake: update minimum CMake version to v3.5.1 Back in commit cf9f34521 (cmake: bump minimum version to 2.8.11, 2017-09-06), we have bumped the minimum CMake version to require at least v2.8.11. The main hold-backs back then were distributions like RHEL/CentOS as well as Ubuntu Trusty, which caused us to not target a more modern version. Nowadays, Ubuntu Trusty has been EOL'd and CentOS 6 has CMake v3.6.1 available via the EPEL6 repository, and thus it seems fair to upgrade to a more recent version. Going through repology [1], one can see that all supported mainstream distributions do in fact have CMake 3 available. Going through the list, the minimum version that is supported by all mainstream distros is in fact v3.5.1: - CentOS 6 via EPEL6: 3.6.1 - Debian Oldstable: 3.7.2 - Fedora 26: 3.8.2 - OpenMandriva 3.x: 3.5.1 - Slackware 14.2: 3.5.2 - Ubuntu 16.04: 3.5.1 Consequentally, let's upgrade CMake to the minimum version of 3.5.1 and remove all the version CMake checks that aren't required anymore. [1]: https://repology.org/project/cmake/versions --- tests/CMakeLists.txt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index c7fe8e102..16bad0f6e 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -42,12 +42,7 @@ ADD_EXECUTABLE(libgit2_clar ${SRC_CLAR} ${SRC_TEST} ${LIBGIT2_OBJECTS}) SET_TARGET_PROPERTIES(libgit2_clar PROPERTIES C_STANDARD 90) SET_TARGET_PROPERTIES(libgit2_clar PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${libgit2_BINARY_DIR}) -IF (${CMAKE_VERSION} VERSION_LESS 2.8.12) - # Already handled by a global INCLUDE_DIRECTORY() -ELSE() - TARGET_INCLUDE_DIRECTORIES(libgit2_clar PRIVATE ../src PUBLIC ../include) -ENDIF() - +TARGET_INCLUDE_DIRECTORIES(libgit2_clar PRIVATE ../src PUBLIC ../include) TARGET_LINK_LIBRARIES(libgit2_clar ${LIBGIT2_LIBS}) IDE_SPLIT_SOURCES(libgit2_clar) -- cgit v1.2.1