mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 10:45:16 -07:00
build: update cmake min version to 3.10 #16065
* build(cmake): update cmake min version to 3.10 * ci: test cmake minimum required version * build(cmake): remove some legacy includes * Since version 3.5 cmake_parse_arguments is implemented natively.
This commit is contained in:
parent
427bac6877
commit
035d82e0d3
19
.github/workflows/ci.yml
vendored
19
.github/workflows/ci.yml
vendored
@ -37,6 +37,7 @@ jobs:
|
||||
cc: gcc
|
||||
runner: ubuntu-20.04
|
||||
os: linux
|
||||
cmake: minimum_required
|
||||
runs-on: ${{ matrix.runner }}
|
||||
timeout-minutes: 45
|
||||
if: github.event.pull_request.draft == false
|
||||
@ -55,6 +56,24 @@ jobs:
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y autoconf automake build-essential ccache cmake cpanminus cscope gcc-multilib gdb gettext gperf language-pack-tr libtool-bin locales ninja-build pkg-config python3 python3-pip python3-setuptools unzip valgrind xclip
|
||||
|
||||
- name: Install minimum required version of cmake
|
||||
if: matrix.cmake == 'minimum_required'
|
||||
env:
|
||||
CMAKE_URL: 'https://cmake.org/files/v3.10/cmake-3.10.0-Linux-x86_64.sh'
|
||||
CMAKE_VERSION: '3.10.0'
|
||||
shell: bash
|
||||
run: |
|
||||
curl --retry 5 --silent --show-error --fail -o /tmp/cmake-installer.sh "$CMAKE_URL"
|
||||
mkdir -p "$HOME/.local/bin" /opt/cmake-custom
|
||||
chmod a+x /tmp/cmake-installer.sh
|
||||
/tmp/cmake-installer.sh --prefix=/opt/cmake-custom --skip-license
|
||||
ln -sfn /opt/cmake-custom/bin/cmake "$HOME/.local/bin/cmake"
|
||||
cmake_version="$(cmake --version | head -1)"
|
||||
echo "$cmake_version" | grep -qF "cmake version $CMAKE_VERSION" || {
|
||||
echo "Unexpected CMake version: $cmake_version"
|
||||
exit 1
|
||||
}
|
||||
|
||||
- name: Install new clang
|
||||
if: matrix.flavor == 'asan' || matrix.flavor == 'tsan'
|
||||
run: |
|
||||
|
@ -133,8 +133,6 @@ jobs:
|
||||
- BUILD_32BIT=ON
|
||||
- CMAKE_FLAGS="$CMAKE_FLAGS -m32 -DCMAKE_TOOLCHAIN_FILE=$TRAVIS_BUILD_DIR/cmake/i386-linux-gnu.toolchain.cmake"
|
||||
- DEPS_CMAKE_FLAGS="$DEPS_CMAKE_FLAGS -m32 -DCMAKE_TOOLCHAIN_FILE=$TRAVIS_BUILD_DIR/cmake/i386-linux-gnu.toolchain.cmake"
|
||||
# Minimum required CMake.
|
||||
- CMAKE_URL=https://cmake.org/files/v2.8/cmake-2.8.12-Linux-i386.sh
|
||||
- *common-job-env
|
||||
- name: big-endian
|
||||
os: linux
|
||||
|
@ -2,8 +2,8 @@
|
||||
# intro: https://codingnest.com/basic-cmake/
|
||||
# best practices (3.0+): https://gist.github.com/mbinna/c61dbb39bca0e4fb7d1f73b0d66a4fd1
|
||||
|
||||
# Version should match the tested CMAKE_URL in .travis.yml.
|
||||
cmake_minimum_required(VERSION 2.8.12)
|
||||
# Version should match the tested CMAKE_URL in .github/workflows/ci.yml.
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(nvim C)
|
||||
|
||||
if(POLICY CMP0065)
|
||||
@ -590,9 +590,7 @@ if(BUSTED_PRG)
|
||||
# console pool: to do so we need to use the USES_TERMINAL
|
||||
# option, but this is only available in CMake 3.2
|
||||
set(TEST_TARGET_ARGS)
|
||||
if(NOT (${CMAKE_VERSION} VERSION_LESS 3.2.0))
|
||||
list(APPEND TEST_TARGET_ARGS "USES_TERMINAL")
|
||||
endif()
|
||||
list(APPEND TEST_TARGET_ARGS "USES_TERMINAL")
|
||||
|
||||
set(UNITTEST_PREREQS nvim-test unittest-headers)
|
||||
set(FUNCTIONALTEST_PREREQS nvim printenv-test printargs-test shell-test streams-test tty-test ${GENERATED_HELP_TAGS})
|
||||
|
@ -44,16 +44,3 @@ fi
|
||||
|
||||
source ~/.nvm/nvm.sh
|
||||
nvm install 10
|
||||
|
||||
if [[ -n "$CMAKE_URL" ]]; then
|
||||
echo "Installing custom CMake: $CMAKE_URL"
|
||||
curl --retry 5 --silent --show-error --fail -o /tmp/cmake-installer.sh "$CMAKE_URL"
|
||||
mkdir -p "$HOME/.local/bin" /opt/cmake-custom
|
||||
bash /tmp/cmake-installer.sh --prefix=/opt/cmake-custom --skip-license
|
||||
ln -sfn /opt/cmake-custom/bin/cmake "$HOME/.local/bin/cmake"
|
||||
cmake_version="$(cmake --version)"
|
||||
echo "$cmake_version" | grep -qF '2.8.12' || {
|
||||
echo "Unexpected CMake version: $cmake_version"
|
||||
exit 1
|
||||
}
|
||||
fi
|
||||
|
@ -231,8 +231,6 @@ endfunction()
|
||||
set(use_git_version 0)
|
||||
if(NVIM_VERSION_MEDIUM)
|
||||
message(STATUS "NVIM_VERSION_MEDIUM: ${NVIM_VERSION_MEDIUM}")
|
||||
elseif(${CMAKE_VERSION} VERSION_LESS "3.2.0")
|
||||
message(STATUS "Skipping version-string generation (requires CMake 3.2.0+)")
|
||||
elseif(EXISTS ${PROJECT_SOURCE_DIR}/.git)
|
||||
find_program(GIT_EXECUTABLE git)
|
||||
if(GIT_EXECUTABLE)
|
||||
|
2
third-party/cmake/BuildLibuv.cmake
vendored
2
third-party/cmake/BuildLibuv.cmake
vendored
@ -1,5 +1,3 @@
|
||||
include(CMakeParseArguments)
|
||||
|
||||
# BuildLibuv(TARGET targetname CONFIGURE_COMMAND ... BUILD_COMMAND ... INSTALL_COMMAND ...)
|
||||
# Reusable function to build libuv, wraps ExternalProject_Add.
|
||||
# Failing to pass a command argument will result in no command being run
|
||||
|
2
third-party/cmake/BuildLibvterm.cmake
vendored
2
third-party/cmake/BuildLibvterm.cmake
vendored
@ -1,5 +1,3 @@
|
||||
include(CMakeParseArguments)
|
||||
|
||||
# BuildLibvterm(CONFIGURE_COMMAND ... BUILD_COMMAND ... INSTALL_COMMAND ...)
|
||||
# Failing to pass a command argument will result in no command being run
|
||||
function(BuildLibvterm)
|
||||
|
2
third-party/cmake/BuildLua.cmake
vendored
2
third-party/cmake/BuildLua.cmake
vendored
@ -1,5 +1,3 @@
|
||||
include(CMakeParseArguments)
|
||||
|
||||
# BuildLua(CONFIGURE_COMMAND ... BUILD_COMMAND ... INSTALL_COMMAND ...)
|
||||
# Reusable function to build lua, wraps ExternalProject_Add.
|
||||
# Failing to pass a command argument will result in no command being run
|
||||
|
2
third-party/cmake/BuildLuajit.cmake
vendored
2
third-party/cmake/BuildLuajit.cmake
vendored
@ -1,5 +1,3 @@
|
||||
include(CMakeParseArguments)
|
||||
|
||||
# BuildLuajit(TARGET targetname CONFIGURE_COMMAND ... BUILD_COMMAND ... INSTALL_COMMAND ...)
|
||||
# Reusable function to build luajit, wraps ExternalProject_Add.
|
||||
# Failing to pass a command argument will result in no command being run
|
||||
|
2
third-party/cmake/BuildLuv.cmake
vendored
2
third-party/cmake/BuildLuv.cmake
vendored
@ -1,5 +1,3 @@
|
||||
include(CMakeParseArguments)
|
||||
|
||||
# BuildLuv(PATCH_COMMAND ... CONFIGURE_COMMAND ... BUILD_COMMAND ... INSTALL_COMMAND ...)
|
||||
# Reusable function to build luv, wraps ExternalProject_Add.
|
||||
# Failing to pass a command argument will result in no command being run
|
||||
|
2
third-party/cmake/BuildMsgpack.cmake
vendored
2
third-party/cmake/BuildMsgpack.cmake
vendored
@ -1,5 +1,3 @@
|
||||
include(CMakeParseArguments)
|
||||
|
||||
# BuildMsgpack(CONFIGURE_COMMAND ... BUILD_COMMAND ... INSTALL_COMMAND ...)
|
||||
# Reusable function to build msgpack, wraps ExternalProject_Add.
|
||||
# Failing to pass a command argument will result in no command being run
|
||||
|
2
third-party/cmake/BuildTreesitter.cmake
vendored
2
third-party/cmake/BuildTreesitter.cmake
vendored
@ -1,5 +1,3 @@
|
||||
include(CMakeParseArguments)
|
||||
|
||||
# BuildTreeSitter(TARGET targetname CONFIGURE_COMMAND ... BUILD_COMMAND ... INSTALL_COMMAND ...)
|
||||
function(BuildTreeSitter)
|
||||
cmake_parse_arguments(_treesitter
|
||||
|
3
third-party/cmake/GetBinaryDeps.cmake
vendored
3
third-party/cmake/GetBinaryDeps.cmake
vendored
@ -1,6 +1,3 @@
|
||||
# Download and install binary dependencies for windows
|
||||
include(CMakeParseArguments)
|
||||
|
||||
# This is similar to the build recipes, but instead downloads a third party
|
||||
# binary and installs it under the DEPS_PREFIX.
|
||||
# The INSTALL_COMMAND is executed in the folder where downloaded files are
|
||||
|
Loading…
Reference in New Issue
Block a user