diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 41 |
1 files changed, 20 insertions, 21 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c0f8483ea..0100146274 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,14 +4,10 @@ # - pitfalls: https://izzys.casa/2019/02/everything-you-never-wanted-to-know-about-cmake/ # - troubleshooting: # - variable_watch https://cmake.org/cmake/help/latest/command/variable_watch.html +# - verbose output: cmake --build build --verbose # Version should match the tested CMAKE_URL in .github/workflows/build.yml. -cmake_minimum_required(VERSION 3.13) - -# Can be removed once minimum version is at least 3.15 -if(POLICY CMP0092) - cmake_policy(SET CMP0092 NEW) -endif() +cmake_minimum_required(VERSION 3.16) project(nvim C) @@ -40,6 +36,12 @@ include(PreventInTreeBuilds) include(Util) #------------------------------------------------------------------------------- +# User settings +#------------------------------------------------------------------------------- + +set(DEPS_IGNORE_SHA FALSE) + +#------------------------------------------------------------------------------- # Variables #------------------------------------------------------------------------------- set(FUNCS_DATA ${PROJECT_BINARY_DIR}/funcs_data.mpack) @@ -47,9 +49,6 @@ set(TOUCHES_DIR ${PROJECT_BINARY_DIR}/touches) file(GLOB DOCFILES CONFIGURE_DEPENDS ${PROJECT_SOURCE_DIR}/runtime/doc/*.txt) -set_directory_properties(PROPERTIES - EP_PREFIX "${DEPS_BUILD_DIR}") - if(NOT CI_BUILD) set(CMAKE_INSTALL_MESSAGE NEVER) endif() @@ -127,6 +126,7 @@ else() option(ENABLE_LTO "enable link time optimization" ON) endif() option(ENABLE_LIBINTL "enable libintl" ON) +option(ENABLE_WASMTIME "enable wasmtime" OFF) message(STATUS "CMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}") @@ -146,9 +146,9 @@ set(NVIM_VERSION_PATCH 0) set(NVIM_VERSION_PRERELEASE "-dev") # for package maintainers # API level -set(NVIM_API_LEVEL 12) # Bump this after any API change. +set(NVIM_API_LEVEL 13) # Bump this after any API/stdlib change. set(NVIM_API_LEVEL_COMPAT 0) # Adjust this after a _breaking_ API change. -set(NVIM_API_PRERELEASE false) +set(NVIM_API_PRERELEASE true) # Build-type: RelWithDebInfo # /Og means something different in MSVC @@ -241,7 +241,7 @@ add_glob_target( GLOB_DIRS runtime scripts src test GLOB_PAT *.lua TOUCH_STRATEGY PER_DIR) -add_dependencies(lintlua-luacheck lua-dev-deps) +add_dependencies(lintlua-luacheck lua_dev_deps) add_glob_target( TARGET lintlua-stylua @@ -300,26 +300,25 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) add_subdirectory(cmake.packaging) endif() +get_externalproject_options(uncrustify ${DEPS_IGNORE_SHA}) ExternalProject_Add(uncrustify - URL https://github.com/uncrustify/uncrustify/archive/uncrustify-0.79.0.tar.gz - URL_HASH SHA256=e7afaeabf636b7f0ce4e3e9747b95f7bd939613a8db49579755dddf44fedca5f DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/uncrustify CMAKE_ARGS ${DEPS_CMAKE_ARGS} + -D CMAKE_RUNTIME_OUTPUT_DIRECTORY=${DEPS_BIN_DIR} EXCLUDE_FROM_ALL TRUE - DOWNLOAD_NO_PROGRESS TRUE) + ${EXTERNALPROJECT_OPTIONS}) option(USE_BUNDLED_BUSTED "Use bundled busted" ON) if(USE_BUNDLED_BUSTED) - ExternalProject_Add(lua-dev-deps - URL https://github.com/neovim/deps/raw/5a1f71cceb24990a0b15fd9a472a5f549f019248/opt/lua-dev-deps.tar.gz - URL_HASH SHA256=27db2495f5eddc7fc191701ec9b291486853530c6125609d3197d03481e8d5a2 - DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/lua-dev-deps + get_externalproject_options(lua_dev_deps ${DEPS_IGNORE_SHA}) + ExternalProject_Add(lua_dev_deps + DOWNLOAD_DIR ${DEPS_DOWNLOAD_DIR}/lua_dev_deps SOURCE_DIR ${DEPS_SHARE_DIR} CONFIGURE_COMMAND "" BUILD_COMMAND "" INSTALL_COMMAND "" EXCLUDE_FROM_ALL TRUE - DOWNLOAD_NO_PROGRESS TRUE) + ${EXTERNALPROJECT_OPTIONS}) else() - add_custom_target(lua-dev-deps) + add_custom_target(lua_dev_deps) endif() |