diff options
-rw-r--r-- | .github/workflows/ci.yml | 19 | ||||
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | CMakeLists.txt | 8 | ||||
-rwxr-xr-x | ci/before_install.sh | 13 | ||||
-rw-r--r-- | src/nvim/CMakeLists.txt | 2 | ||||
-rw-r--r-- | third-party/cmake/BuildLibuv.cmake | 2 | ||||
-rw-r--r-- | third-party/cmake/BuildLibvterm.cmake | 2 | ||||
-rw-r--r-- | third-party/cmake/BuildLua.cmake | 2 | ||||
-rw-r--r-- | third-party/cmake/BuildLuajit.cmake | 2 | ||||
-rw-r--r-- | third-party/cmake/BuildLuv.cmake | 2 | ||||
-rw-r--r-- | third-party/cmake/BuildMsgpack.cmake | 2 | ||||
-rw-r--r-- | third-party/cmake/BuildTreesitter.cmake | 2 | ||||
-rw-r--r-- | third-party/cmake/GetBinaryDeps.cmake | 3 |
13 files changed, 22 insertions, 39 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0dbe484108..968094a2a6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: | diff --git a/.travis.yml b/.travis.yml index 06547febba..ec7e19b2f9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 26c60ffbf1..f44937b5ae 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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}) diff --git a/ci/before_install.sh b/ci/before_install.sh index c3fd8bdbde..f12f972fe0 100755 --- a/ci/before_install.sh +++ b/ci/before_install.sh @@ -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 diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index 9c6eafa2df..185d55daed 100644 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -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) diff --git a/third-party/cmake/BuildLibuv.cmake b/third-party/cmake/BuildLibuv.cmake index c5f7d6d5ab..32fe2659a4 100644 --- a/third-party/cmake/BuildLibuv.cmake +++ b/third-party/cmake/BuildLibuv.cmake @@ -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 diff --git a/third-party/cmake/BuildLibvterm.cmake b/third-party/cmake/BuildLibvterm.cmake index c3485dac25..09f2ba7f2c 100644 --- a/third-party/cmake/BuildLibvterm.cmake +++ b/third-party/cmake/BuildLibvterm.cmake @@ -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) diff --git a/third-party/cmake/BuildLua.cmake b/third-party/cmake/BuildLua.cmake index c3f789509e..a40cb7dcb2 100644 --- a/third-party/cmake/BuildLua.cmake +++ b/third-party/cmake/BuildLua.cmake @@ -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 diff --git a/third-party/cmake/BuildLuajit.cmake b/third-party/cmake/BuildLuajit.cmake index ca41a7cee3..512d5ef5ae 100644 --- a/third-party/cmake/BuildLuajit.cmake +++ b/third-party/cmake/BuildLuajit.cmake @@ -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 diff --git a/third-party/cmake/BuildLuv.cmake b/third-party/cmake/BuildLuv.cmake index f5d45c7ff7..69f3b60ecf 100644 --- a/third-party/cmake/BuildLuv.cmake +++ b/third-party/cmake/BuildLuv.cmake @@ -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 diff --git a/third-party/cmake/BuildMsgpack.cmake b/third-party/cmake/BuildMsgpack.cmake index 30af5f060b..39a8a64d23 100644 --- a/third-party/cmake/BuildMsgpack.cmake +++ b/third-party/cmake/BuildMsgpack.cmake @@ -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 diff --git a/third-party/cmake/BuildTreesitter.cmake b/third-party/cmake/BuildTreesitter.cmake index a55b2e36e8..0aa2706d7d 100644 --- a/third-party/cmake/BuildTreesitter.cmake +++ b/third-party/cmake/BuildTreesitter.cmake @@ -1,5 +1,3 @@ -include(CMakeParseArguments) - # BuildTreeSitter(TARGET targetname CONFIGURE_COMMAND ... BUILD_COMMAND ... INSTALL_COMMAND ...) function(BuildTreeSitter) cmake_parse_arguments(_treesitter diff --git a/third-party/cmake/GetBinaryDeps.cmake b/third-party/cmake/GetBinaryDeps.cmake index 982bf62265..04e3f95a29 100644 --- a/third-party/cmake/GetBinaryDeps.cmake +++ b/third-party/cmake/GetBinaryDeps.cmake @@ -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 |