mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 10:45:16 -07:00
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:
parent
25435a4bad
commit
23c9e3ec1e
@ -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,31 +569,17 @@ 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)
|
||||
if(LUA_HAS_FFI)
|
||||
set(TEST_LIBNVIM_PATH $<TARGET_FILE:nvim-test>)
|
||||
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()
|
||||
set(TEST_LIBNVIM_PATH "")
|
||||
endif()
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/test/config/paths.lua.in
|
||||
${CMAKE_BINARY_DIR}/test/config/paths.lua.gen)
|
||||
file(GENERATE
|
||||
OUTPUT ${CMAKE_BINARY_DIR}/test/config/paths.lua
|
||||
INPUT ${CMAKE_BINARY_DIR}/test/config/paths.lua.gen)
|
||||
set(TEST_LIBNVIM_PATH "")
|
||||
endif()
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/test/config/paths.lua.in
|
||||
${CMAKE_BINARY_DIR}/test/config/paths.lua.gen)
|
||||
file(GENERATE
|
||||
OUTPUT ${CMAKE_BINARY_DIR}/test/config/paths.lua
|
||||
INPUT ${CMAKE_BINARY_DIR}/test/config/paths.lua.gen)
|
||||
|
||||
add_custom_target(functionaltest
|
||||
COMMAND ${CMAKE_COMMAND}
|
||||
|
@ -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})
|
||||
|
2
third-party/CMakeLists.txt
vendored
2
third-party/CMakeLists.txt
vendored
@ -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()
|
||||
|
2
third-party/cmake/GettextCMakeLists.txt
vendored
2
third-party/cmake/GettextCMakeLists.txt
vendored
@ -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
|
||||
|
2
third-party/cmake/GperfCMakeLists.txt
vendored
2
third-party/cmake/GperfCMakeLists.txt
vendored
@ -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
|
||||
|
2
third-party/cmake/LibiconvCMakeLists.txt
vendored
2
third-party/cmake/LibiconvCMakeLists.txt
vendored
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 2.8.7)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(libiconv C)
|
||||
|
||||
include_directories(
|
||||
|
2
third-party/cmake/LibuvCMakeLists.txt
vendored
2
third-party/cmake/LibuvCMakeLists.txt
vendored
@ -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)
|
||||
|
2
third-party/cmake/Libvterm-tbl2inc_c.cmake
vendored
2
third-party/cmake/Libvterm-tbl2inc_c.cmake
vendored
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 2.8.7)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
|
||||
set(HEX_ALPHABET "0123456789abcdef")
|
||||
|
||||
|
2
third-party/cmake/LibvtermCMakeLists.txt
vendored
2
third-party/cmake/LibvtermCMakeLists.txt
vendored
@ -1,4 +1,4 @@
|
||||
cmake_minimum_required(VERSION 2.8.11)
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
project(libvterm LANGUAGES C)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
2
third-party/cmake/UnibiliumCMakeLists.txt
vendored
2
third-party/cmake/UnibiliumCMakeLists.txt
vendored
@ -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)
|
||||
|
2
third-party/cmake/libtermkeyCMakeLists.txt
vendored
2
third-party/cmake/libtermkeyCMakeLists.txt
vendored
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user