Raise minimum CMake version to 2.8.12 and remove compat code

2.8.12 is supported by our main CI targets and [repology] confirms that
this is broadly supported.

[repology]: https://repology.org/metapackage/cmake/information
This commit is contained in:
James McCoy 2018-06-16 10:20:25 -04:00
parent 25435a4bad
commit 23c9e3ec1e
No known key found for this signature in database
GPG Key ID: DFE691AE331BA3DB
11 changed files with 19 additions and 39 deletions

View File

@ -2,7 +2,7 @@
# intro: https://codingnest.com/basic-cmake/
# best practices (3.0+): https://gist.github.com/mbinna/c61dbb39bca0e4fb7d1f73b0d66a4fd1
cmake_minimum_required(VERSION 2.8.7)
cmake_minimum_required(VERSION 2.8.12)
project(nvim C)
if(POLICY CMP0059)
@ -569,19 +569,6 @@ if(BUSTED_PRG)
message(WARNING "disabling unit tests: no Luajit FFI in ${LUA_PRG}")
endif()
if(${CMAKE_VERSION} VERSION_LESS 2.8.12)
if(CMAKE_GENERATOR MATCHES "Visual Studio")
set(TEST_LIBNVIM_PATH ${CMAKE_BINARY_DIR}/lib/nvim-test.dll)
else()
get_target_property(TEST_LIBNVIM_PATH nvim-test LOCATION)
endif()
configure_file(
${CMAKE_SOURCE_DIR}/test/config/paths.lua.in
${CMAKE_BINARY_DIR}/test/config/paths.lua)
else()
# To avoid duplicating paths.lua.in while we still support CMake < 2.8.12,
# use configure_file() to add the generator expression and then generate
# the final file
if(LUA_HAS_FFI)
set(TEST_LIBNVIM_PATH $<TARGET_FILE:nvim-test>)
else()
@ -593,7 +580,6 @@ if(BUSTED_PRG)
file(GENERATE
OUTPUT ${CMAKE_BINARY_DIR}/test/config/paths.lua
INPUT ${CMAKE_BINARY_DIR}/test/config/paths.lua.gen)
endif()
add_custom_target(functionaltest
COMMAND ${CMAKE_COMMAND}

View File

@ -394,12 +394,6 @@ endif()
set(NVIM_EXEC_LINK_LIBRARIES ${NVIM_LINK_LIBRARIES} ${LUA_PREFERRED_LIBRARIES})
if(CMAKE_VERSION VERSION_LESS "2.8.8")
# Use include_directories() because INCLUDE_DIRECTORIES target property
# is not supported
include_directories(${LUA_PREFERRED_INCLUDE_DIRS})
endif()
# Don't use jemalloc in the unit test library.
if(JEMALLOC_FOUND)
list(APPEND NVIM_EXEC_LINK_LIBRARIES ${JEMALLOC_LIBRARIES})

View File

@ -1,5 +1,5 @@
# This is not meant to be included by the top-level.
cmake_minimum_required (VERSION 2.8.7)
cmake_minimum_required (VERSION 2.8.12)
project(NVIM_DEPS)
# Needed for: check_c_compiler_flag()

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.7)
cmake_minimum_required(VERSION 2.8.12)
project(gettext C)
# Adds PREFIX to each item in LIST

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.7)
cmake_minimum_required(VERSION 2.8.12)
project(gperf LANGUAGES C CXX)
add_executable(gperf

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.7)
cmake_minimum_required(VERSION 2.8.12)
project(libiconv C)
include_directories(

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.7)
cmake_minimum_required(VERSION 2.8.12)
project(libuv LANGUAGES C)
file(GLOB UV_SOURCES_COMMON src/*.c)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.7)
cmake_minimum_required(VERSION 2.8.12)
set(HEX_ALPHABET "0123456789abcdef")

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.11)
cmake_minimum_required(VERSION 2.8.12)
project(libvterm LANGUAGES C)
include(GNUInstallDirs)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.7)
cmake_minimum_required(VERSION 2.8.12)
project(unibilium LANGUAGES C)
file(GLOB SRC_FILES ${PROJECT_SOURCE_DIR}/*.c)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.7)
cmake_minimum_required(VERSION 2.8.12)
project(libtermkey)
add_definitions(-D _CRT_SECURE_NO_WARNINGS)