aboutsummaryrefslogtreecommitdiff
path: root/cmake
Commit message (Collapse)AuthorAge
...
* tests: move "busted" dir to "test" (#10518)Daniel Hahler2019-07-16
| | | | | | | | | | | * tests: move "busted" dir to "test" It is used for outputHandlers only, and clearly belongs to the tests. Use the full module name with the `-o` option to `busted` then for clarity. * luacheck * test/busted/outputHandlers/TAP.lua: use/extend upstream
* build: fix GetCompileFlags for CMake #10444Daniel Hahler2019-07-07
| | | Ref: https://github.com/neovim/neovim/pull/10363#issuecomment-508916959
* build: FindLibIntl: fix warning about CMP0075 (#10427)Daniel Hahler2019-07-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * build: FindLibIntl: fix warning about CMP0075 The common pattern elsewhere to set this only during the check, and here it was not unset, resulting in a warning later (on Alpine 3.10): -- Found Iconv -- Looking for pthread.h CMake Warning (dev) at /usr/share/cmake/Modules/CheckIncludeFile.cmake:80 (message): Policy CMP0075 is not set: Include file check macros honor CMAKE_REQUIRED_LIBRARIES. Run "cmake --help-policy CMP0075" for policy details. Use the cmake_policy command to set the policy and suppress this warning. CMAKE_REQUIRED_LIBRARIES is set to: /usr/lib/libintl.so For compatibility with CMake 3.11 and below this check is ignoring it. Call Stack (most recent call first): /usr/share/cmake/Modules/FindThreads.cmake:105 (CHECK_INCLUDE_FILE) CMakeLists.txt:482 (find_package) This warning is for project developers. Use -Wno-dev to suppress it. -- Looking for pthread.h - found * build: remove lists / REMOVE_ITEM around check_c_source_compiles
* Merge pull request #10414 from blueyed/luacheckDaniel Hahler2019-07-04
|\ | | | | Improve luacheck integration, fix more issues.
| * Improve luacheck setup [skip appveyor]Daniel Hahler2019-07-04
| | | | | | | | | | | | | | | | - Move .luacheckrc to root, add read_globals=vim - Simplify lualint target, run it on all lua files - Lint preload.lua, but ignore W211 - Remove testlint target, included in lualint (and lint) - Clean up .luacheckrc
* | build: FindLuaJit: handle luajit-2.1 include path suffix (#10418)Daniel Hahler2019-07-04
|/
* build: fix warning with passively available libintl (#10380)Daniel Hahler2019-07-01
| | | Since 0364f51 it would display a warning.
* build: update cmake/LibFindMacros.cmake (#10355)Daniel Hahler2019-06-30
| | | Source: https://github.com/Tronic/cmake-modules/blob/d6b5e94625d41469eaf1e2c484d7204cd263893d/LibFindMacros.cmake
* build: FindLibLUV: use PkgConfig (#10359)Daniel Hahler2019-06-29
| | | | | | Apparently forgotten in c83926cd0. - Also LIMIT_SEARCH was never used. - Also add LIBLUV_DEFINITIONS, as used with other Find modules.
* build: CMake: do not set CMP0059 to old (#10363)Daniel Hahler2019-06-29
| | | | | | | | | Keeps using add_definitions for compatibility with older CMake. Newer CMake (3.12) would have `add_compile_definitions`, but it is not required, since `add_defitions` was meant to be used for compile/preprocessor definitions initially anyway. Ref: https://github.com/neovim/neovim/pull/4389
* cmake/RunTests.cmake: fix TEST_TAG/TEST_FILTER [ci skip] #10371Daniel Hahler2019-06-29
| | | | | Followup to f1f9a2f97. The mentioned example there did not work after all, likely due to changing quoting during PR review.
* build: CMake: remove usage of USE_BUNDLED_X in main project (#10354)Daniel Hahler2019-06-28
| | | | | | | | | | | | | | | | | | The variables are not meant to be defined there really, but only with the third-party project. Using them, e.g. with the following, would actually result in libvterm not being found then: make CMAKE_EXTRA_FLAGS="-DUSE_BUNDLED_LIBVTERM=ON" \ DEPS_CMAKE_FLAGS="-DUSE_BUNDLED=OFF -DUSE_BUNDLED_LIBVTERM=ON" In https://github.com/neovim/neovim/pull/6357 they were renamed to `USE_BUNDLED_X` from `X_USE_BUNDLED`, but the above reasoning applies to the old names, too. Internally `CMAKE_PREFIX_PATH` is used to add the built/bundled third party packages for `find_package`, so there is no reason to e.g. query the values via `load_cache` for example from the third-party project.
* CMakeLists: remove/cleanup passing of CMAKE_SYSTEM_NAME (#10351)Daniel Hahler2019-06-27
| | | | | | | | Just set it from `${CMAKE_HOST_SYSTEM_NAME}` directly, instead of passing it from the main CMake file (CMAKE_SYSTEM_NAME defaults to it, but is empty in script mode). Initially added in 9ce81f7b2, but then even used with unrelated commands (that do not use RunTests.cmake, e.g. 221f6fffa).
* tests: busted: do not use "--lua" (#10303)Daniel Hahler2019-06-24
| | | | | | | | | | | | | | The feature is very rudimentary [1], and causes problems when not using bundled deps, where it might then fail to find `busted.runner` due to this. E.g. with "-DUSE_BUNDLED=OFF -DUSE_BUNDLED_LUAROCKS=ON": `.deps/usr/bin/busted` contains `exec '/usr/bin/luajit' -e …`, i.e. it run luajit with adjusted lpath etc. But using `--lua /usr/bin/luajit` then causes this `busted` wrapper to be replaced with just `/usr/bin/luajit`, i.e. it is missing the adjusted lpath then. 1: https://github.com/Olivine-Labs/busted/commit/9eb6c9cf93bc558a2398c822b896990e48bd69fd
* tests: improve RunTests.cmake (#10239)Daniel Hahler2019-06-22
| | | | | | | | | | | | | | | | - allow for passing in BUSTED_ARGS via env - quote values of TEST_TAG/TEST_FILTER Previously TEST_FILTER="'foo bar'" was required. This allows for: make functionaltest TEST_FILE=test/functional/terminal/tui_spec.lua \ BUSTED_ARGS="--no-keep-going --shuffle" \ TEST_FILTER="TUI background color handles" * RunTests.cmake: BUILD_DIR for Xtest files, isolated TMPDIR Assume relative path for given TEST_PATH.
* cmake: fix usage of find_package_handle_standard_args (#10288)Daniel Hahler2019-06-21
| | | | | | | | | | | | | | | | | | | The package argument is case sensitive, which is important to handle X_FIND_REQUIRED properly, i.e. error out early if it is not found: CMake Error at /usr/share/cmake-3.14/Modules/FindPackageHandleStandardArgs.cmake:137 (message): Could NOT find Unibilium (missing: UNIBILIUM_LIBRARY UNIBILIUM_INCLUDE_DIR) Otherwise it would continue until: CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: UNIBILIUM_INCLUDE_DIR (ADVANCED) Quickly checked via `rg 'find_package_handle_standard|find_package.*REQUIRED' -I | sort`. Ref: https://gitlab.kitware.com/cmake/cmake/issues/19413
* ci: Travis: remove obsolete cmake fileDaniel Hahler2019-06-17
| | | | Added in f65614fb1, forgot to be removed in 55682710a.
* lua: introduce vim.loop (expose libuv event-loop) #10123George Zhao2019-06-10
| | | | | | Co-authored-by: Andrey Popp <8mayday@gmail.com> closes #9546 closes #10084
* Remove support for using jemalloc instead of the system allocatorJames McCoy2019-01-19
| | | | | | There was never any investigation done to determine whether using jemalloc was actually a net benefit for nvim. It has been a portability limitation and adds another factor to consider when triaging issues.
* build: remove cmake/GenerateHelptags.cmake.inJustin M. Keyes2019-01-04
| | | | | | This file wasn't used since e1cc0fe99688. That may have been accidental, but it's not needed anymore anyway. Also the "Workaround for hanging" is no longer relevant.
* runtime/lua/vim/compat.luaJustin M. Keyes2018-12-20
| | | | | | | | | | | | | | | | | | | | | ref #9280 Introduce the `vim.compat` module, to help environments with system Lua 5.2+ run the build/tests. Include the module implicitly in all tests. ref #8677 legacy `vim` module: beep buffer command dict eval firstline lastline line list open type window
* build: adjust some messages (#9087)Justin M. Keyes2018-10-06
|
* build/test: skip empty TEST_TAG, TEST_FILTERJustin M. Keyes2018-06-16
| | | | | - Empty "--tags=", "--filter=" prevents TEST_FILE from running. - Fix another bug: TEST_FILTER overwrote TEST_TAG.
* build/msvc: Add libiconv to bundled dependenciesb-r-o-c-k2018-06-09
|
* cmake/FindLibIntl.cmake: handle passive case explicitlyJustin M. Keyes2018-06-06
| | | | | | | | | If check_c_source_compiles() succeeded (HAVE_WORKING_LIBINTL is set) then the result of find_xxx() doesn't matter. This happens on systems (linux+glibc) where libintl is available passively. This allows `find_package(LibIntl REQUIRED)` to work and will still correctly fail (REQUIRED) on systems lacking libintl.
* Change to not use library prefix on MSVCerw72018-05-23
|
* build/msvc: Add libintl to bundled dependencies (#8163)b-r-o-c-k2018-03-24
|
* build/msvc: Fix name of import libraryb-r-o-c-k2018-02-28
|
* cmake/LuaHelpers.cmake: check_lua_module: use 'lua -l'Daniel Hahler2018-02-22
| | | | | | It only shortens the traceback a bit for when a module is not found though, only removing the "(command line):1: in main chunk" (with lua5.2).
* cmake/LuaHelpers.cmake: check_lua_module: display errorsDaniel Hahler2018-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This helps to figure out what the problem is, e.g. in my case I have lua51-mpack installed to be used with luajit, but it is broken (missing libmpack). With this patch you get: -- Checking Lua interpreter /usr/bin/luajit /usr/bin/luajit: error loading module 'mpack' from file '/usr/lib/lua/5.1/mpack.so': libmpack.so.0: cannot open shared object file: No such file or directory stack traceback: [C]: at 0x55fcf0166fb0 [C]: in function 'require' (command line):1: in main chunk [C]: at 0x55fcf01188a0 -- [/usr/bin/luajit] The 'mpack' lua package is required for building Neovim -- Checking Lua interpreter /usr/bin/lua5.1 /usr/bin/lua5.1: error loading module 'mpack' from file '/usr/lib/lua/5.1/mpack.so': libmpack.so.0: cannot open shared object file: No such file or directory stack traceback: [C]: ? [C]: in function 'require' (command line):1: in main chunk [C]: ? -- [/usr/bin/lua5.1] The 'mpack' lua package is required for building Neovim -- Checking Lua interpreter /usr/bin/lua5.2 /usr/bin/lua5.2: (command line):1: module 'mpack' not found: no field package.preload['mpack'] no file '/usr/share/lua/5.2/mpack.lua' no file '/usr/share/lua/5.2/mpack/init.lua' no file '/usr/lib/lua/5.2/mpack.lua' no file '/usr/lib/lua/5.2/mpack/init.lua' no file './mpack.lua' no file '/usr/lib/lua/5.2/mpack.so' no file '/usr/lib/lua/5.2/loadall.so' no file './mpack.so' stack traceback: [C]: in function 'require' (command line):1: in main chunk [C]: in ? -- [/usr/bin/lua5.2] The 'mpack' lua package is required for building Neovim -- Checking Lua interpreter /usr/bin/lua /usr/bin/lua: (command line):1: module 'mpack' not found: no field package.preload['mpack'] no file '/usr/share/lua/5.3/mpack.lua' no file '/usr/share/lua/5.3/mpack/init.lua' no file '/usr/lib/lua/5.3/mpack.lua' no file '/usr/lib/lua/5.3/mpack/init.lua' no file './mpack.lua' no file './mpack/init.lua' no file '/usr/lib/lua/5.3/mpack.so' no file '/usr/lib/lua/5.3/loadall.so' no file './mpack.so' stack traceback: [C]: in function 'require' (command line):1: in main chunk [C]: in ? -- [/usr/bin/lua] The 'mpack' lua package is required for building Neovim CMake Error at CMakeLists.txt:459 (message): A suitable Lua interpreter was not found. While this makes it more verbose for the expected error case ("module 'mpack' not found"), the behavior before this patch hides too much. This is the old output: -- Checking Lua interpreter /usr/bin/luajit -- [/usr/bin/luajit] The 'mpack' lua package is required for building Neovim -- Checking Lua interpreter /usr/bin/lua5.1 -- [/usr/bin/lua5.1] The 'mpack' lua package is required for building Neovim -- Checking Lua interpreter /usr/bin/lua5.2 -- [/usr/bin/lua5.2] The 'mpack' lua package is required for building Neovim -- Checking Lua interpreter /usr/bin/lua -- [/usr/bin/lua] The 'mpack' lua package is required for building Neovim CMake Error at CMakeLists.txt:459 (message): A suitable Lua interpreter was not found. This is for when the whole configuration runs (i.e. after `make distclean`), afterwards only one Lua interpreter gets checked only.
* cmake/GetCompileFlags: remove duplicate include dirsJustin M. Keyes2018-02-14
| | | | Reduces noise in :version message.
* busted: explicit LUA_PATH to test scripts (#7864)Matthieu Coudron2018-01-20
| | | | in case LUA_PATH does not contain `./?.lua`, busted can not load lua test scripts. (for instance on nixos). Thus we make it explicit.
* cmake,bsd: Fix mandir to saner defaults. (#7417)Franklin Mathieu2017-10-21
| | | | | | | | | | | | closes #7239 The old behaviour was to set CMAKE_INSTALL_MANDIR to /usr/local/man when MANPREFIX wasn't defined. This caused mismatching installation paths when the installation prefix wasn't /usr/local. This fix explicitely checks that the prefix is /usr/local to change the value of CMAKE_INSTALL_MANDIR, and uses the default behaviour otherwise, as /usr/local is the exception rather than the norm (as per man hier(7)).
* Stub ngettext when libintl isn't availableJames McCoy2017-10-03
| | | | | | This should have been included in #6547 as part of vim-patch:7.4.2152. Closes #7352
* win: integrate winpty (WIP)Ryan Prichard2017-08-16
| | | | | | | | | | | | | | Handling of process exit is still broken. It detects the moment when the child process exits, then quickly stops polling for process output. It should continue polling for output until the agent has scraped all of the process' output. This problem is easy to notice by running a command like "dir && exit", but even typing "exit<ENTER>" can manifest the problem -- the "t" might not appear. winpty's Cygwin adapter handles shutdown by waiting for the agent to close the CONOUT pipe, which it does after it has scraped the child's last output. AFAIK, neovim doesn't do anything interesting when winpty closes the CONOUT pipe.
* test: force LC_ALL=en_US.UTF-8Justin M. Keyes2017-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tests that check localized error messages need a stable locale, else errors like this occur: [ FAILED ] 2 tests, listed below: [ FAILED ] ...npack/file/vim/neovim/test/functional/eval/null_spec.lua @ 29: NULL list is accepted as an empty list by writefile() ...npack/file/vim/neovim/test/functional/eval/null_spec.lua:30: Expected objects to be the same. Passed in: (string) ' E484: Cannot open file Xtest-functional-viml-null' Expected: (string) ' E484: Can't open file Xtest-functional-viml-null' stack traceback: ...npack/file/vim/neovim/test/functional/eval/null_spec.lua:30: in function <...npack/file/vim/neovim/test/functional/eval/null_spec.lua:29> [ FAILED ] ...k/file/vim/neovim/test/functional/ex_cmds/write_spec.lua @ 81: :write errors out correctly ...k/file/vim/neovim/test/functional/ex_cmds/write_spec.lua:97: Expected objects to be the same. Passed in: (string) 'Vim(write):E510: Cannot make backup file (add ! to override)' Expected: (string) 'Vim(write):E510: Can't make backup file (add ! to override)' stack traceback: ...k/file/vim/neovim/test/functional/ex_cmds/write_spec.lua:97: in function <...k/file/vim/neovim/test/functional/ex_cmds/write_spec.lua:81> 10 SKIPPED TESTS 2 FAILED TESTS -- Output to stderr: 2017/07/29 00:41:32 ERROR 31133/open_log_file:170: Logging to stderr, failed to open $NVIM_LOG_FILE: Xtest-startup-xdg-logpath/nvim/log 2017/07/29 00:41:32 WARN 31133/call_set_error:815: RPC: ch 1 was closed by the client CMake Error at /home/shlomif/Download/unpack/file/vim/neovim/cmake/RunTests.cmake:50 (message): Running functional tests failed with error: 1. FAILED: CMakeFiles/functionaltest cd /home/shlomif/Download/unpack/file/vim/neovim/build && /usr/bin/cmake -DBUSTED_PRG=/home/shlomif/Download/unpack/file/vim/neovim/.deps/usr/bin/busted -DLUA_PRG=/home/shlomif/Download/unpack/file/vim/neovim/.deps/usr/bin/luajit -DNVIM_PRG=/home/shlomif/Download/unpack/file/vim/neovim/build/bin/nvim -DWORKING_DIR=/home/shlomif/Download/unpack/file/vim/neovim -DBUSTED_OUTPUT_TYPE=nvim -DTEST_DIR=/home/shlomif/Download/unpack/file/vim/neovim/test -DBUILD_DIR=/home/shlomif/Download/unpack/file/vim/neovim/build -DTEST_TYPE=functional -DSYSTEM_NAME=Linux -P /home/shlomif/Download/unpack/file/vim/neovim/cmake/RunTests.cmake ninja: build stopped: subcommand failed. Makefile:102: recipe for target 'functionaltest' failed make: *** [functionaltest] Error 1
* Prefer the static jemalloc library by default on OSXJames McCoy2017-07-07
| | | | | When neovim is dynamically linked against jemalloc on OSX, users are hitting the deadlock described in jemalloc/jemalloc#895.
* Merge #6789 from ZyX-I/lua-pathJustin M. Keyes2017-06-27
|\ | | | | lua: Add paths from &runtimepath to package.path and package.cpath
| * ci: Also lint lua code in src/nvim/luaZyX2017-05-25
| |
| * cmake: Rename RunTestsLint to RunLuacheckZyX2017-05-25
| |
* | test: Set $NVIM_LOG_FILE to test-local pathJustin M. Keyes2017-06-07
| | | | | | | | | | | | - Do not delete it: may need to inspect it after tests finished. - Avoids writing to stderr in cases where the test-local $XDG_DATA_HOME was not created yet.
* | install: bsd: install manpages to /usr/local/manJustin M. Keyes2017-05-27
|/ | | | | | https://svnweb.freebsd.org/ports/head/editors/neovim/Makefile?revision=428479&view=markup#l28 Closes #6771
* Merge branch 'master' into luaviml'/luaZyX2017-05-08
|\
| * build: OpenBSD: libuv does not use KVM, do not link to it. (#6663)Edd Barrett2017-05-03
| |
* | cmake: Add FindLua.cmakeZyX2017-04-10
|/ | | Copied from CMake v3.8.0-707-g0419ecb, modified one include() line.
* cmake: Use archive instead of downloading *.json files (#6482)Nikolai Aleksandrovich Pavlov2017-04-09
|
* cmake: Replace RunLint.cmake with code in src/nvim/CMakeLists.txtZyX2017-03-31
| | | | | | This also removes LINT_FILE environment variable, other then that functionality is kept. It is expected that developers needing partial linting will use `make lint`, touching interesting file before (if not done already by writing to them).
* cmake: Allow failing to download small suppress filesZyX2017-03-31
|
* cmake: Make Download.cmake check for errorsZyX2017-03-31
| | | Copying from third-party/cmake/DownloadAndExtractFile.cmake.
* cmake: Add `clint` target to build MakefileZyX2017-03-31
| | | | | | | | | | | | | | | | | | | | | Allows linting only modified files and linting multiple files in parallel. In the current state is rather slow because errors.json is a 6 MiB file and needs to be reparsed each time. Results on my system (6-core): # In build dir, actually parallel make -j5 clint 241.24s user 8.39s system 334% cpu 1:14.74 total # In root, one process make -j5 clint 60.69s user 0.37s system 93% cpu 1:05.19 total In both cases download time included. That is not well for travis (though I would keep travis as-is because new variant will fail before checking all files), but already good enough for regular development: total times are nearly identical and this is the *full* build, further `make -C build clint` will check only modified files.