Commit Graph

235 Commits

Author SHA1 Message Date
Daniel Hahler 30ae60e7ca
Fix/revisit git-describe enhancement (#11124)
* Fix/keep massaging git-describe result

Ref: https://github.com/neovim/neovim/pull/11117#issuecomment-536416223

* build: revisit generation of version from Git

Fixes "make clean && make", where "auto/versiondef.h" would be missing
since b18b84d - because BYPRODUCTS are apparently removed when cleaning.

This includes the following improvements/changes:

- do not run git-describe during CMake's configure phase just for
  reporting
- do not print with changed Git version (too noisy, simplifies code)

* Move to src/nvim (included before config) for easier flow

* fallback to describe always, write empty include file

* update_version_stamp.lua: use prefix always
2019-10-02 03:45:59 +02:00
Björn Linse c8f861b739 tree-sitter: rename tree_sitter => treesitter for consistency 2019-09-28 14:55:43 +02:00
Björn Linse c07e1e8696 tree-sitter: cleanup build code 2019-09-28 14:55:43 +02:00
Björn Linse b871100be7 Create BuildUtf8proc.cmake and FindUtf8proc.cmake
Using advanced search and replace technology
2019-09-28 14:31:03 +02:00
Björn Linse cd10096386 tree-sitter: initial tree-sitter support 2019-09-28 14:31:03 +02:00
Daniel Hahler 8db62ac57d
build: cmake: GetCompileFlags: include CMAKE_C_FLAGS (#10957)
Calls `GetCompileFlags` from `src/nvim` directory, to include
`--coverage` (and any others).
2019-09-06 20:36:05 +02:00
Daniel Hahler fecbafb29e build: fail with CLANG_TSAN + USE_GCOV #10958
This is better than skipping it silently.
2019-09-06 08:41:04 -07:00
Daniel Hahler 18fb4dcbf9 src/nvim/CMakeLists.txt: use compile options/definitions
This includes `-fsanitize=thread` etc in the output of `--version`.
2019-08-15 19:44:00 +02:00
Daniel Hahler 90e44ecf11
build: link libraries by full path (for luv.so) (#10661)
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
2019-08-12 18:22:02 +02:00
Björn Linse 75928101f8 refactor: enable -Wconversion for ex_getln.c 2019-07-19 15:56:38 +02:00
Daniel Hahler e682d799fa
build: fix check_c_compiler_flag for -Wno-… (#10483)
`check_c_compiler_flag(-Wno-doesnotexist …)` is successful always,
apparently for all "no-" prefixes.

Therefore check for the flag itself (without "no-" prefix).

I am seeing a warning if the source fails to compile:

> cc1: warning: unrecognized command line option ‘-Wno-meh’

Which is turned into an error with `-Werror`:

> cc1: error: unrecognized command line option ‘-Wno-meh’ [-Werror]

But when it compiles successfully, there is no warning/error.

gcc (GCC) 9.1.0.
2019-07-12 22:42:44 +02:00
Daniel Hahler c207095445
build: CMake: do not set CMP0059 to old (#10363)
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
2019-06-29 20:37:48 +02:00
Daniel Hahler d3d25f957d
Dump gcov coverage in process_spawn (#10230)
Fixes https://github.com/neovim/neovim/pull/3926#issuecomment-502343527.
2019-06-15 18:30:04 +02:00
George Zhao c83926cd0a lua: introduce vim.loop (expose libuv event-loop) #10123
Co-authored-by: Andrey Popp <8mayday@gmail.com>

closes #9546
closes #10084
2019-06-10 14:13:18 +02:00
Björn Linse 31cbd34d97 UI: add "compositor" layer to merge grids for TUI use in a correct way
Initially we will use this for the popupmenu, floating windows will
follow soon

NB: writedelay + compositor is weird, we need more flexible
redraw introspection.
2019-02-02 16:31:49 +01:00
James McCoy c2343180d7
Remove support for using jemalloc instead of the system allocator
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.
2019-01-19 18:09:52 -05:00
Justin M. Keyes 20620bae76 Merge #9306 'vim-patch: integrate xdiff library'
closes #1466
closes #1007
closes #1391
2018-12-09 23:07:28 +01:00
Anatolii Sakhnik cf1ffa9166 vim-patch:8.1.0360: using an external diff program is slow and inflexible
Problem:    Using an external diff program is slow and inflexible.
Solution:   Include the xdiff library. (Christian Brabandt)
            Use it by default.

e828b7621c

vim-patch:8.1.0360
vim-patch:8.1.0364
vim-patch:8.1.0366
vim-patch:8.1.0370
vim-patch:8.1.0377
vim-patch:8.1.0378
vim-patch:8.1.0381
vim-patch:8.1.0396
vim-patch:8.1.0432
2018-12-09 19:45:56 +02:00
Björn Linse 9e8f9dd5d4 cmake: add "generated-sources" target
This is intended to be used with source introspection tools like
clangd, where it would useful to regenerate headers and source files,
which introspection results depend on, without making a full
rebuild which takes much longer time than just generating headers.
2018-09-06 20:54:53 +02:00
zhou13 c8e7a447c5 build: Enable LTO (Link Time Optimization) #8654 2018-07-23 03:22:14 +02:00
b-r-o-c-k 15bd936b96 win/deps: Fix copy to subdir (#8636)
The `external_blobs` target was not copying dependency files into
the correct subdirectories. This caused a bug where nvim-qt wouldn't
start because `qwindows.dll` was not located in the `platforms`
subdirectory.

closes https://github.com/equalsraf/neovim-qt/issues/422
2018-06-24 20:21:52 +02:00
Justin M. Keyes 6294a807d3
Merge #8579 win: cmake: Improvements for building with IDEs 2018-06-20 02:19:42 +02:00
James McCoy 23c9e3ec1e
Raise minimum CMake version to 2.8.12 and remove compat code
2.8.12 is supported by our main CI targets and [repology] confirms that
this is broadly supported.

[repology]: https://repology.org/metapackage/cmake/information
2018-06-18 08:00:30 -04:00
b-r-o-c-k 7097aba6be cmake: Organize targets into folders
Enabling CMake's USE_FOLDERS option and adding the FOLDER property to
targets allows some IDEs to list the targets in an organized
hierarchy of folders.
2018-06-17 07:54:39 -05:00
b-r-o-c-k f39a0f5dd0 build/win: Add workaround for Windows command length limit
When building with the Ninja generator on Windows, it was possible for
the external_blobs target to fail when the generated command exceeds the
command length limit (8191 characters). To workaround the problem, a
CMake script is used to copy the files instead of a shell command.

Visual Studio bug report:
https://developercommunity.visualstudio.com/content/problem/212207/file-open-cmake-the-command-line-is-too-long.html
2018-06-14 09:34:18 -05:00
b-r-o-c-k d87e5d7016 build/msvc: Add libiconv to bundled dependencies 2018-06-09 20:50:02 -05:00
Justin M. Keyes 7303dd3e54 win/build: download iconv, gettext tools
- We need the gettext tools (msgmerge.exe) because these aren't built
  when we build from source (not trivial).
- We can use the pre-built libiconv-2.dll for DYNAMIC_ICONV_DLL.
2018-06-06 00:58:57 +02:00
Justin M. Keyes 21c9db1861 build/CMake: find_package(… REQUIRED)
"Always use `find_package` with `REQUIRED`."

- We make an exception for LuaJit (not REQUIRED): the `nvim-test` target
  is included only if we can find LuaJit.

This is partially a cargo-cult (reference below), but it uncovered at
least one problem: `find_package(LibIntl REQUIRED)` fails on my vanilla
ubuntu 16.04 system.

ref: https://schneide.blog/2017/11/06/4-tips-for-better-cmake/

> optional dependencies is nice, but skipping on REQUIRED is not the way
> you want to do it. In the worst case, some of your features will just
> not work if those packages are not found, with no explanation
> whatsoever. Instead, use explicit feature-toggles (e.g. using option())
> that either skip the find_package call or use it with REQUIRED, so the
> user will know that another lib is needed for this feature.
2018-06-06 00:58:57 +02:00
Justin M. Keyes 2ec94eb23f
win/install: xxd.exe (#8241) 2018-04-07 04:09:43 +02:00
Utkarsh Anand 9b7ce00486 build/OpenBSD: need -lpthread -lc++abi for LuaJIT (#8215) 2018-04-02 11:08:11 +02:00
Justin M. Keyes 10008f7d49
build/cmake: avoid CMP0054 (#8149)
CMP0054: Only interpret if() arguments as variables or keywords when unquoted.
2018-03-20 22:19:07 +01:00
Justin M. Keyes 1fb44676cd build: avoid CMP0046 "dependency target does not exist" #8128 2018-03-18 23:41:48 +01:00
Justin M. Keyes 0a56bd3330 build/macOS: remove -iframework line #7891
Linker error:

    [1/3] Linking C executable bin/nvim
    ld: warning: directory not found for option '-FCoreFoundation'

Only the -isysroot change is needed, see
https://github.com/neovim/neovim/pull/7891#discussion_r164036958
2018-01-26 11:42:07 +01:00
John Szakmeister 17b21eae52 build: fix creating generated files on macOS
For some reason, using the clang executable inside of the Xcode default
toolchain the platform's sysroot include isn't present.  This was
debugged by adding "-###" on the command line for generating the header
for nvim/os/lang.c and is was evident the flag was missing.
2018-01-22 06:27:14 -05:00
James McCoy 1f2b35860f
mac: Set $LANG based on the system locale
Unix's typical locale-related environment variables aren't always set
appropriately on a Mac.  Instead of relying on them, query the locale
information using Mac specific APIs and then set $LANG appropriately for
the rest of nvim.

Closes #5873
2017-12-10 07:45:04 -05:00
ZyX b29a776550 Merge branch 'master' into expression-parser 2017-10-30 00:49:12 +03:00
Justin M. Keyes a3a9ef9ad4 Merge #7030 'refactor/single-include'
ref #5321
2017-10-21 04:09:11 +02:00
Justin M. Keyes 37420ef942 build: set MIN_LOG_LEVEL correctly (#7419)
closes #7283
regression by 42d892913d

- Don't need to explicitly put "-O2 -g" in RelWithDebInfo; CMake does
  that already. That was left-over from 42d892913d which removed the
  "Dev" custom build-type, but repurposed the logic for RelWithDebInfo.

- `if(DEFINED MIN_LOG_LEVEL)` doesn't work.
- `if(${MIN_LOG_LEVEL} MATCHES "^$")` doesn't work if -DMIN_LOG_LEVEL is
  omitted.
- `if(MIN_LOG_LEVEL)` also isn't what we want: it would be true if
  MIN_LOG_LEVEL=0.
2017-10-21 02:30:21 +02:00
relnod 0f74b7afeb refactor/single-include: undo.h 2017-10-19 11:20:08 +02:00
relnod 14e63271cc refactor/single-include: undo_defs.h 2017-10-19 11:17:18 +02:00
relnod 4b0a086d16 refactor/single-include: syntax_defs.h 2017-10-19 11:17:18 +02:00
relnod 69199958b7 refactor/single-include: regexp_defs.h 2017-10-19 11:16:46 +02:00
relnod 295c90989d refactor/single-include: terminal.h 2017-10-19 11:14:54 +02:00
ZyX 76f0466536 Merge branch 'master' into expression-parser 2017-10-15 21:16:27 +03:00
ZyX 0300c4d109 viml/expressions: Add lexer with some basic tests 2017-10-08 22:11:57 +03:00
Yuto Tokunaga e5565891af win: wmain(): locale-independent argv (#7180)
fix #7060
2017-08-23 00:55:00 +02:00
Justin M. Keyes 8642f05fd9 single-includes: ignore os/pty_process_win.h 2017-08-16 09:13:44 +02:00
erw7 4b1f21de75 win: support :terminal 2017-08-16 09:13:43 +02:00
Rui Abreu Ferreira a797856755 win/install: winpty-agent.exe 2017-08-16 09:13:43 +02:00
Ryan Prichard 7f22a27a10 win: integrate winpty (WIP)
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.
2017-08-16 09:13:43 +02:00