aboutsummaryrefslogtreecommitdiff
path: root/cmake
Commit message (Collapse)AuthorAge
...
* build: fix version generation to its previous behaviorDundar Goc2022-07-26
| | | | | | | | | | | | This will change the version format from v0.8.0-dev-nightly-12-g1a07044c1 to v0.8.0-dev-698-ga5920e98f Closes https://github.com/neovim/neovim/issues/19499
* build(lint): check uncrustify version #19468dundargoc2022-07-25
| | | | This to prevent the user from accidentally using the wrong uncrustify version.
* fix(build): non-git ("tarball") build fails #19448kylo2522022-07-22
| | | | | | | | | | | | | | | | | | | | | | Problem: Build fails without git or .git/. ref #19289 Solution: Fix the version generation logic. Test cases: If `git` is missing: -- Using NVIM_VERSION_MEDIUM: v0.8.0-dev If `.git/` is missing: -- Git tag extraction failed: fatal: not a git repository (or any of the parent directories): .git -- Using NVIM_VERSION_MEDIUM: v0.8.0-dev If `git describe` fails -- Git tag extraction failed: fatal: ... -- Using NVIM_VERSION_MEDIUM: v0.8.0-dev Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* fix(build): fails if git is missing #19366Luis Felipe Dominguez Vega2022-07-14
| | | Generate empty file if git is missing.
* build: gracefully handle error in git-version #19289kylo2522022-07-14
| | | | | | | | - only update git-version if both of these conditions are met: - `git` command succeeds - `versiondef_git.h` would change (SHA1-diff) - else print a status/warning message also move version generation out of Lua into cmake.
* feat(build): add_glob_target runs only on changed files #19070dundargoc2022-06-30
| | | | | | | | | | | | | The general idea is that add_glob_targets creates a "touch file", a dummy file that acts as a dependency in order to check which files are outdated since the last time the target was run. Remove RunUncrustify.cmake as it's no longer necessary. It was initially introduced to silence its noisy output. The per-file targets will suppress the noisy output from uncrustify, except for the very first run. Also remove DefCmdTarget.cmake since add_glob_target already incorporates its functionality.
* build(cmake): fix static `libintl` test on macOSCarlo Cabrera2022-06-29
| | | | | | | | | If `libintl` is a static library on macOS, we also need to explicitly link with `libiconv` and the `CoreFoundation` framework. Otherwise, our `HAVE_WORKING_LIBINTL` test erroneously fails. Closes #19127 Closes #19138
* fix(tests): remove misleading $TEST_PATH segment #19050Justin M. Keyes2022-06-23
| | | | | | | | | | | | | | | Problem: RunTests.cmake adds $TEST_PATH to $TMPDIR with the implication that it gives more isolation. But this is misleading because $TEST_PATH is only defined once. Full test runs use the same $TMPDIR for all tests. This was likely added with the intention of invoking RunTests.cmake once-per-testfile from a wrapper than does the isolation/orchestration. But even so, Nvim's vim_maketempdir() / vim_mktempdir() _already_ creates a unique tempdir per session. Solution: Don't append $TEST_PATH to $TMPDIR. Avoids confusion and makes the path shorter.
* build: remove FindLua.cmake since it's already built into cmakeDundar Goc2022-06-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | FindLua.cmake is a copy from the cmake repo: https://github.com/Kitware/CMake/blob/0419ecbcad7719614349a07189b45e341a8f2c69/Modules/FindLua.cmake. It's a cmake module, meaning it's already shipped with cmake by default. There have been two changes done to our version of FindLua.cmake. The first change is that include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) was changed to include(FindPackageHandleStandardArgs.cmake) This change is required only because we have imported FindLua.cmake module but not FindPackageHandleStandardArgs module. Had FindLua been called as a module as intended then this file would not need changing. The second change is that support for Lua 5.4 is added. However, support for any version of Lua except for 5.1 is disabled since https://github.com/neovim/neovim/pull/16633/commits/e322b5c864c771f774ddfea32f6cd5190a1af419. Because these changes from the upstream FindLua.cmake is unnecessary I believe we can and should use the builtin FindLua.cmake instead of our own.
* build(cmake): simplify def_cmd_target functionDundar Goc2022-06-19
| | | | | | Instead of appending to a command output, append to an existing target instead. The primary benefit is intermediary ...-cmd targets aren't needed, we can instead append commands to the relevant target directly.
* build(cmake): simplify and speed up the uninstall targetDundar Goc2022-06-19
| | | | | | | | | | | | | | | More specifically, replace exec_program with file(REMOVE ...) so that the uninstall target is run during the build stage instead of the configure stage, significantly speeding up the target. The code snippet that was removed is taken from the cmake FAQ https://gitlab.kitware.com/cmake/community/-/wikis/FAQ#can-i-do-make-uninstall-with-cmake. However, this uses undocumented features such as IMMEDIATE when calling configure_file, which is an artifact from cmake 2.x (it's so old it's difficult to find information on it). Similarly, this particular code snippet has been around for a long time and originated from the cmake mailing lists. Based on this I believe the in-file was a workaround for the limitations of cmake back then and that it's not required anymore.
* build(lint): fix lintuncrustify #18945Justin M. Keyes2022-06-12
| | | | | | | | | | Problem: lintuncrustify doesn't actually do anything. Solution: - Fix the parameters. - Fail correctly on nonzero result. followup to #18940
* build(lint): fix luacheck not found #18940Justin M. Keyes2022-06-12
| | | | | | | | | | | | | | | | | Problem: Since 6d57bb89c1ee #18543, luacheck is not found on some systems when running the "lintlua" target. Solution: - Move the find_program() to the top-level CMakeLists.txt - Define a def_cmd_target() function with fewer assumptions than the old lint() function. - Move "lintuncrustify" to src/nvim/CMakeLists.txt so it can reuse the $LINT_NVIM_SOURCES already defined there. - Make the lint targets _fatal_ by default. There is little reason for the "lint" umbrella target defined in Makefile to exist if it's going to ignore the absence of the actual linters. - For now, keep the uncrustify call in a separate cmake script so that it can be silenced (too noisy).
* build: add a cmake target for all used linters #18543dundargoc2022-06-09
| | | | | | | | | * build: move the logic for linters to cmake Cmake is our source of truth. We should have as much of our build process there as possible so everyone can make use of it. * build: remove redundant check for ninja generator The minimum cmake version as of writing this is 3.10, which has ninja support.
* refactor(log): simplify log_path_init #18898Justin M. Keyes2022-06-08
| | | | | | | | | Problem: Since 22b52dd462e5 #11501, log_path_init is called in log_init, so it is now called at a deterministic time. So the "just in time" complexity of log_path_init is no longer needed. Solution: Remove logic intended to try to "heal" partial initialization.
* revert: "ci: remove mingw job #18580"Dundar Goc2022-05-17
| | | | | | | | | | This partially reverts commit f8af81445bb48966d54f4a956842d935d009d275. The mingw parts of cmake was removed to see if it was still used (ref: https://github.com/neovim/neovim/pull/18580). It turns out it is, so this will fix that. Closes: https://github.com/neovim/neovim/issues/18597
* ci: remove mingw job #18580dundargoc2022-05-15
| | | | | | | | | | | | | | | | | | | | Unnecessary CI builds increase the change of spurious failures, which are costly noise. Of course, we should fix all legitimate bugs, but we also cannot micro-manage every platform, so there needs to be a clear motivation for the CI builds that we maintain. Reasons against maintaining a mingw CI job: 1. The windows mingw build is slow. 2. Failures: - https://github.com/neovim/neovim/issues/18494 - https://github.com/neovim/neovim/issues/18495 3. The mingw artifact is 10x bigger than the windows MSVC artifact: https://github.com/neovim/neovim/issues/10560 4. Our releases publish the MSVC (not mingw) artifact for Windows users: https://github.com/neovim/neovim/releases 5. Non-MSVCRT has limitations documented by libuv: http://docs.libuv.org/en/v1.x/process.html > On Windows file descriptors greater than 2 are available to the child process only if the child processes uses the MSVCRT runtime. Closes https://github.com/neovim/neovim/issues/18551
* refactor(terminal)!: drop winpty, require Windows 10 #18253erw72022-04-26
| | | | | | | | | | | Problem: winpty is only needed for Windows 8.1. Removing it reduces our build and code complexity. Solution: - Remove winpty. - Require Windows 10. closes #18252
* ci: show failed message on Windowszeertzjq2022-03-03
|
* ci: skip tests that fail on windowsDundar Göc2022-02-20
|
* test: allow excluding functional/unit tests using TEST_FILTER_OUTJames McCoy2021-12-18
| | | | | | | Although this can already be done using `BUSTED_ARGS`, it complements our existing shortcut of `TEST_FILTER.` [skip ci]
* build(install): rescan GLOB files on rebuildJakub Łuczyński2021-10-18
|
* build(tests): isolate the user environment XDG_DATA_DIRS #16003Javier Lopez2021-10-12
| | | | | | | | | | Problem: Some tests were not passing on my machine, specifically in `test/functional/api/vim_spec.lua` the two tests under `describe('nvim_get_runtime_file...` Solution: Unset `XDG_DATA_DIRS` in the test runner. Note: Window CI failed if we set it to the same value as `XDG_DATA_HOME`.
* fix(build): call find_package(Threads) before using its variablesJames McCoy2021-09-21
|
* build: add ${CMAKE_THREAD_LIBS_INIT} to LIBUV_LIBRARIESJames McCoy2021-09-20
| | | | | | | This is a workaround for not yet having fully correct Find* cmake modules for static builds. https://github.com/Tronic/cmake-modules/issues/3#issuecomment-624469020
* Merge branch 'master' into histfileJustin M. Keyes2021-09-10
|\
| * test: use $TEST_TIMEOUT to specify timeoutJames McCoy2021-09-09
| |
* | do not write into user's ~/.bash_historyJun T2021-09-10
|/
* test: timeout at 20 minutes #15597Justin M. Keyes2021-09-08
| | | | | | | | | | | | | | | Set a maximum test run-time of 20 minutes to: - fail faster - avoid wasting CI resources - set a bound on the test time (if tests take longer than 20 minutes we need to invest in parallelizing them...) Timeout looks like: -- Tests exited non-zero: Process terminated due to timeout -- No output to stderr. CMake Error at /…/neovim/cmake/RunTests.cmake:86 (message): functional tests failed with error: Process terminated due to timeout
* build: prioritize statically built libluv in searchGregory Anders2021-08-14
| | | | | | | | | | | | | | When libluv is built statically it appends an '_a' suffix to the library name. This affects CMake's ability to find the bundled version of libluv (which is built statically) when there is a dynamic version of the library also built on the system, which does not have the '_a' suffix. Prioritize searching for 'libluv_a' first before falling back to 'libluv'. This will ensure the bundled version of libluv is always found first before any system versions of libluv. In cases where we are not using bundled libraries, CMake will still safely fall through to finding 'libluv' since package managers do not typically provide static system libraries.
* chore(deps): bump LibLUV to 1.40.0-0 (#14997)Christian Clason2021-07-07
| | | Adds several threading, async, and gc fixes and allows building with older gcc (4.x). Minimum required version remains 1.30.1.
* Add uninstall target for make and othersbrian.orwe2021-03-16
|
* Align naming of FindTreeSitter cmake file and variablesJames McCoy2020-11-09
| | | | | | | | `find_package(Foo ...)` expects to find a file FindFoo.cmake and the resulting variables to be named `Foo_...`. If those don't all match up, then the detection does not work properly. Closes #13262
* bundle: move tree-sitter as a bundled depThomas Vigouroux2020-11-03
| | | | | | fixup! bundle: move tree-sitter as a bundled dep fixup! bundle: move tree-sitter as a bundled dep
* build/FindLua.cmake: allow Lua 5.4 #12820Michel Alexandre Salim2020-08-31
| | | Lua 5.4 is out, and will be shipped with Fedora 33.
* treesitter: remove utf8proc dependencyThomas Vigouroux2020-04-18
|
* build/MSVC: fix gettext multibyte issue #11774erw72020-01-28
| | | | | | | | | | | Problem: On Windows with the MSVC build, gettext-translation "Questa è già la" displays as "Questa <e8> gi<e0> la". Solution: Fix iconv detection iconv when building gettext. So HAVE_ICONV is correctly defined when building nvim. * fix gettext mb chars on MSVC * fix libintl detection failure on MSVC fixes #11749
* build: run git-describe for dev version during build (#11117)Daniel Hahler2019-09-30
| | | | | | | | This avoids invoking CMake after a new commit, which might take 15s on some systems. Skipped on CMake < 3.2.0 (missing BYPRODUCTS support). Co-Authored-By: Justin M. Keyes <justinkz@gmail.com>
* cmake: use LibFindMacros for utf8proc (#11114)Daniel Hahler2019-09-29
| | | Also update doc.
* Create BuildUtf8proc.cmake and FindUtf8proc.cmakeBjörn Linse2019-09-28
| | | | Using advanced search and replace technology
* cmake/GetCompileFlags: include CMAKE_C_COMPILER_ARG1 (#11091)Daniel Hahler2019-09-25
| | | This is used internally (e.g. on Travis) for 32-bit builds (`-m32`).
* build: rename CMake find modules for LibFindMacros #10928Daniel Hahler2019-09-06
| | | | | | | | | | | | | | | We are using "LIBFOO" prefixes for `LIBFOO_INCLUDE_DIRS` etc, and therefore need to use this for the PREFIX with LibFindMacros also, so that `"${${PREFIX}_FIND_VERSION}"` gets handled there properly. The alternative would be to either manually handle/set the upper/mixed case variants of those variable additionally, which is not as easy. Keeping the existing names is useful for packagers. Before this the version requirements with `find_package(Unibilium 2.0 REQUIRED)` was not handled (a49cf5126), and it prepares for using a required version with libvterm (initially/wrongly ported in 1896c72a5).
* build: cmake: GetCompileFlags: include CMAKE_C_FLAGS (#10957)Daniel Hahler2019-09-06
| | | | Calls `GetCompileFlags` from `src/nvim` directory, to include `--coverage` (and any others).
* get_compile_flags: also look at target propertiesDaniel Hahler2019-08-15
|
* build: link libraries by full path (for luv.so) (#10661)Daniel Hahler2019-08-12
| | | | | | | | Use "luv" as imported library to work around "-lluv" being used due to missing SONAME. Fixes https://github.com/neovim/neovim/issues/10407. Ref: https://gitlab.kitware.com/cmake/cmake/issues/19578 Ref: https://github.com/NixOS/nixpkgs/issues/64400#issuecomment-516557253
* build: port FindLibVterm to LibFindMacros (#10395)Daniel Hahler2019-08-08
|
* build: clean up / remove X_USE_STATIC (#10713)Daniel Hahler2019-08-07
| | | | | | | | This was discouraged (as an option) in 5b5d353151 [1], not enabled/used by default, and not working according to the comment in local.mk.example. Taken out of https://github.com/neovim/neovim/pull/10395. 1: https://github.com/neovim/neovim/pull/2465
* build: require unibilium>=2.0 (#10681)Daniel Hahler2019-08-03
| | | | | | | | | | | | * build: require unibilium>=2.0 This also ports FindUnibilium to LibFindMacros, which was planned anyway, and makes the version check easier. With an older Unibilium our fallback code in `terminfo_from_builtin` will not work (because it assumes the new data structures from 2.0.0 [1]), and nvim would crash later because of `ut` being NUL. 1: https://github.com/neovim/unibilium/commit/42f3cdd284735bd827691c3d0bfae9472b22d5d5
* ci: RunTests: ensure that the logfile gets displayed (#10597)Daniel Hahler2019-07-24
| | | | | | This is meant to help with test failures where e.g. `busted` itself might crash or get killed. Ref: https://github.com/neovim/neovim/issues/10182#issuecomment-514450069
* test: Force $TEST_FILE to relative path [ci skip] #10535erw72019-07-19
| | | | | - Always force TEST_PATH to a relative path. - Eliminate rel_test_path. (The code simplification is worth the extra subdirectory below Xtest_tmpdir/.)