Commit Graph

295 Commits

Author SHA1 Message Date
Justin M. Keyes
7a1a3a1258 build: Default BUSTED_OUTPUT_TYPE to "nvim" (#6811) 2017-05-25 14:51:53 +02:00
Justin M. Keyes
6255c4e053 build: FreeBSD: Disable -Wc11-extensions only for clang
From FreeBSD ports patch:
https://svnweb.freebsd.org/ports/head/editors/neovim/files/patch-CMakeLists.txt?revision=425833&view=markup

References #4363
2017-05-21 13:44:02 +02:00
Florian Walch
7383274f66 cmake: Support building without LuaJIT. #6736
Compile `nvim` executable against Lua if PREFER_LUA=ON.

As the testing library `nvim-test` requires LuaJIT, it is
still compiled against LuaJIT. If LuaJIT is not available,
`nvim-test` is not built.
2017-05-13 16:59:06 +02:00
Björn Linse
244a1f97db Merge pull request #6704 from bfredl/luaexec
execute lua directly from the remote API
2017-05-13 15:06:41 +02:00
James McCoy
b43a3dbff8 Detect support for and use -Wimplicit-fallthrough 2017-05-12 14:41:51 -04:00
Björn Linse
12fb634fe6 API version bump 2017-05-12 10:02:36 +02:00
ZyX
09f849b600 Merge branch 'master' into luaviml'/lua 2017-05-08 15:43:45 +03:00
Rui Abreu Ferreira
685ca180f7 win: Terminal UI #6315
For CI builds unibilium is provided through msys2 packages, and
libtermkey is built from source in third-party from equalsraf/libtermkey.

In Windows we cannot read terminal input from the stdin file descriptor,
instead use libuv's uv_tty API. It should handle key input and encoding.

The UI suspend is not implemented for Windows, because the
SIGSTP/SIGCONT do not exist in windows. Currently this is a NOOP.

Closes #3902
Closes #6640
2017-05-03 12:48:24 +02:00
Justin M. Keyes
1b0d573a65 version bump 2017-05-01 22:17:32 +02:00
Justin M. Keyes
52727d98d7 NVIM v0.2.0
FEATURES:
    bc4a2e1576 help, man.vim: "outline" (TOC) feature #5169
    58422f17d8 'guicursor' works in the TUI (and sends info to UIs) #6423
    129f107c0c api: nvim_get_mode() #6247
    0b59f988f4 api/ui: externalize tabline #6583
    bc6d868d00 'listchars': `Whitespace` highlight group #6367
    6afa7d66cd writefile() obeys 'fsync' option #6427
    c60e409471 eval.c refactor (also improves some error messages) #5119
    9d200cd0a3 getcompletion("cmdline") #6376
    2ea7bfc627 terminal: Support extra arguments in 'shell'. #4504
    bf5110266c DirChanged autocmd #5928 #6262
    1743df82f9 'cpoptions': "_" flag to toggle `cw` behaviour #6235
    22337b1c01 CTRL-R omits trailing ^M when pasting to cmdline #6137
    0e44916fff :edit allows unescaped spaces in filename #6119
    abdbfd26bc eval: Add id() function and make printf("%p") useful #6095
    bdfa1479d2 findfile(), :find, gf work in :terminal. #6009
    2f38ed11c9 providers: Disable if `g:loaded_*` exists.
    b5560a69b1 setpos() can set lowercase marks in other buffers #5753
    7c513d646d Throttle :! output, pulse "..." message. #5396
    d2e8c76dc2 v:exiting #5651

    :terminal improvements #6185 #6142
      - cursor keeps position after leaving insert-mode.
      - 4ceec30cd0 Follows output only if cursor is at end of buffer.
      - e7bbd35c81 new option: 'scrollback'
      - fedb8443d5 quasi-support for undo and 'modifiable'
      - b45ddf731b disables 'list' by default
      - disables 'relativenumber' by default

    :help now contains full API documentation at `:help api`.

    man.vim saw numerous improvements.

    Windows support:
      - Windows is no longer "experimental", it is fully supported.
      - Windows package includes a GUI, curl.exe and other utilities.

    "Vim 8" features: partials, lambdas.

SECURITY FIXES:
    CVE-2017-5953 CVE-2017-6349 CVE-2017-6350 #6485

CHANGES:
    NVIM_TUI_ENABLE_CURSOR_SHAPE was removed. Use 'guicursor' instead.
        See https://github.com/neovim/neovim/wiki/Following-HEAD#20170402

    81525dc5c3 'mouse=a' is no longer the default. (This will probably
                 change again after it is improved.) #6022

    0c1f783164 defaults: 'showcmd', 'belloff', 'ruler' #6087
    eb0e94f71b api: {get,set}_option update local options as appropriate #6405
    bdcb2a38b3 "Reading from stdin..." message was removed. #6298

FIXES:
    12fc1defd6 ops: fix i<c-r> with multi-byte text #6524
    dd391bfca1 Windows: system() and friends #6497
    13352c00f1 Windows: os_get_hostname() #6413
    16babc6687 tui: Less-noisy mouse seqs #6411
    3a9dd13f9e (vim bug) folding edge-cases  #6207
    f6946c68ae job-control: set CLOEXEC on pty processes. #5986
    d1afd434f3 rplugin: Call s:LoadRemotePlugins() on startup.
    1215084676 backtick-expansion works with `shell=fish` #6224
    e32ec03d67 tui: Improved behavior after resize. #6202
    86c2adc074 edit.c: CTRL-SPC: Insert previously-inserted text. #6090
    c318d8e672 b:changedtick now follows VimL rules #6112
    34e24cb2f7 terminal: Initialize colors in reverse order #6160
    e8899178ec undo: Don't set b_u_curhead in ex_undojoin() #5869
    d25649fa01 undo: :earlier, g-: Set b_u_seq_cur correctly. (#6016)
    043d8ba422 'Visual-mode put from @. register' #5782
    42c922b32c open_buffer(): Do `BufEnter` for directories.
    50d0d89129 inccommand: Preview :sub commands only after delimiter #5932
    1420e10474 CheckHealth improvements #5519
    c8d5e9230e jobstart(): Return -1 if cmd is not executable. #5671
2017-05-01 22:13:23 +02:00
ZyX
ab4d13e2fa Merge branch 'master' into luaviml'/lua 2017-04-10 22:21:06 +03:00
ZyX
0f4b4c7529 headers: Remove useless HAVE_CONFIG_H macros
We do not have non-cmake build options, cmake always does configure_file.
2017-04-09 03:36:18 +03:00
ZyX
043d8ff9f2 Merge branch 'master' into luaviml'/lua 2017-04-08 01:54:58 +03:00
James McCoy
af2ee9c5d1
cmake: Detect whether msgpack-c has MSGPACK_OBJECT_FLOAT{32,64} types 2017-03-30 21:35:36 -04:00
ZyX
d60302d517 cmake: Link libnvim-test with luajit in place of lua, disable ASAN
Reasoning: luajit is not being compiled with sanitizers, lua is. Given that 
linking with sanitized libraries requires sanitizers enabled, it is needed to 
either compile libnvim-test with sanitizers or link it with lua compiled without 
sanitizers. Most easy way to do the latter is just use luajit which is compiled 
without sanitizers (as they do not work well with luajit).
2017-03-27 00:12:23 +03:00
ZyX
1646a28173 cmake: Allow switching from luajit to lua 2017-03-27 00:12:23 +03:00
ZyX
e7bbd8256b eval: Add luaeval function
No tests yet, no documentation update, no :lua* stuff, no vim module.

converter.c should also work with typval_T, not Object.

Known problem: luaeval("1", {}) results in

    PANIC: unprotected error in call to Lua API (attempt to index a nil value)

Ref #3823
2017-03-27 00:11:24 +03:00
Björn Linse
a5d03be7b8 api: bump api level to 2 2017-03-15 15:01:06 +01:00
Justin M. Keyes
039c7ab607 ci: MIN_LOG_LEVEL=2 (#6169)
DEBUG_LOG_LEVEL is very noisy and causes a lot of disk activity.
It is not needed on CI.
2017-02-24 11:03:56 +01:00
Justin M. Keyes
30826cb2d6 build: oldtest target: TEST_FILE, NVIM_PRG (#6098)
- Add support for TEST_FILE to the `oldtest` target, for consistency
  with the busted/lua tests.
  Caveat: with the busted/lua tests TEST_FILE takes a full path, whereas
  for `oldtest` it must be "test_foo.res".
- Add support for NVIM_PRG, again so that all test-related targets are
  consistent.
- Use consistent name for NVIM_PRG. But still need to support NVIM_PROG
  for QuickBuild CI.

Note: The `oldtest` target is driven by the top-level Makefile, because
it requires a TTY. CMake 3.2 added a USES_TERMINAL flag to
add_custom_target(). But we support CMake 2.8...

    add_custom_target(oldtest
      COMMAND make clean
      COMMAND make NVIM_PRG=$<TARGET_FILE:nvim> $ENV{MAKEOVERRIDES}
      DEPENDS nvim
      WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/src/nvim/testdir"
      USES_TERMINAL true
    )
2017-02-12 01:02:54 +01:00
Justin M. Keyes
3803314f78 doc: QuickBuild 2017-01-31 08:58:43 +01:00
Justin M. Keyes
f78982620a build: Disable jemalloc for FreeBSD. (#6007)
jemalloc's README states:

> jemalloc [is] the FreeBSD libc allocator since 2005. ...  Modern jemalloc
> releases continue to be integrated back into FreeBSD

Since FreeBSD ships with jemalloc in some form, we don't need to require
jemalloc there. Less risk, low cost.
2017-01-26 13:07:30 +01:00
Justin M. Keyes
d3b4764dc1 win: Define USE_FNAME_CASE (#5962) 2017-01-17 16:32:41 +01:00
Rui Abreu Ferreira
ac44d0ed54 test: system([...]) 2017-01-11 01:05:55 +01:00
Justin M. Keyes
9956beee24 version bump 2016-11-27 20:03:35 +01:00
Justin M. Keyes
0542baac28 NVIM v0.1.7
FEATURES:
0213e99aaf PR #5561 'inccommand'

FIXES:
c685879eea PR #5632 SECURITY FIX
d28d108648 CheckHealth: Fix version comparison.
7be113d795 PR #5670 shell_write_cb: Schedule error message.
1d4563771b jobs: ensure calling jobclose() on a pty job sends SIGHUP.
36c0ec6dd4 tui/suspend_event(): set STDIN to "blocking"
7a4d069bcc, cf52b881d9 man.vim: avoid errors in unusual circumstances
ed198737fd PR #5546 ex_global: Catch CTRL-C even if it is mapped.

CHANGES:
9147331e21 PR #2905 encoding: only allow encoding=utf-8
5f0260808c PR #5636 build: Upgrade jemalloc
f1fed42ca7 PR #5567 l10n: Update Ukrainian translation
2016-11-27 20:03:30 +01:00
Justin M. Keyes
242c3d5f0b version bump 2016-10-28 15:16:59 +02:00
Justin M. Keyes
cc1ec959f1 NVIM v0.1.6
FEATURES:
0b5a7e4ad5 #4432 API: external UIs can render custom popupmenu
c6ac4f84b1 #4934 API: call any API method from vimscript
31df051ed9 #4568 API: nvim_call_atomic(): multiple calls in a single request
b268ba353a #5424 API: nvim_win_get_number(), nvim_tabpage_get_number()
e7e2844d46 has("nvim-1.2.3") checks for a specific Nvim version
522b885a0d #5295, #5493 `:CheckHealth` checks tmux, terminfo, performance
719dae2e01 #5384 events: allow event processing in getchar()
f25797f869 #5386 API: metadata: Nvim version & API level
22dfe6925d #5389 API: metadata: "since", "deprecated_since"
605e74327a Added QuickFixLine highlight group

CHANGES:
4af6ec746c #5253 perf: Disable clipboard in do_cmdline()
6e9f329d05 #5299 perf: Skip foldUpdate() in insert-mode.
9d4fcec7c6 #5426 perf: Do not auto-update folds for some foldmethods.
eeec0cab58 #5419 tui: Default to normal-mode cursor shape.

FIXES:
e83845285c #5436 tui: Fix "weird characters" / "bleeding termcodes"
10a54ad12e #5243 signal_init: Always unblock SIGCHLD.
bccb49bedb #5316 eval.c: Fix memory leak for detached pty job
626065d385 #5227 tchdir: New tab should inherit CWD.
cd321b7d0f #5292 getcwd(): Return empty string if CWD is invalid.
6127eaef05 shada: Fix non-writeable ShaDa directory handling
ca65514a24 #2789 system(): Respect shellxescape, shellxquote
2daf54ee8d #4874 Restore vim-like tab dragging
0c536b5d8a #5319 syntax.c: Support bg/fg special color-names.
3c53371b0c #4972 from justinmk/schedule-ui_refresh
68bcb32ec4 #4789 tui.c: Do not wait for tui loop on teardown.
c8b6ec2e6a #5409 v:count broken in command-line window
6bc3bcefc6 #5461 fix emoji display
51937e1322 #5470 fix :terminal with :argadd, :argu
79d77da8a0 #5481 external UIs: opening multiple files from command-line
657ba62a84 #5501 rplugin: resolve paths in manifest file
6a6f188d2a #5502 system('foo &', 'bar'): Show error, don't crash.
1ff162c0d9 #5515 os_nodetype: open fd with O_NONBLOCK
2a6c5bb0c4 #5450 modeline: Handle version number overflow.
0ade1bb706 #5225 CI tests now run against Windows!
2016-10-28 15:16:45 +02:00
Justin M. Keyes
c5f5f427c6 api: api_info()['version']
API level is disconnected from NVIM version. The API metadata holds the
current API level, and the lowest backwards-compatible level supported
by this instance.

Release 0.1.6 is the first release that reports the Nvim version and API
level.

    metadata['version'] = {
      major: 0,
      minor: 1,
      patch: 6,
      api_level: 1,
      api_compatible: 0,
      api_prerelease: false,
    }

The API level may remain unchanged across Nvim releases if the API has
not changed.

When changing the API,
    - set NVIM_API_PRERELEASE to true
    - increment NVIM_API_LEVEL (at most once per Nvim version)
    - adjust NVIM_API_LEVEL_COMPAT if backwards-compatibility was broken

api_level_0.mpack was generated from Nvim 0.1.5 with:
    nvim --api-info
2016-10-28 14:33:13 +02:00
Rui Abreu Ferreira
f25797f869 api: Nvim version, API level #5386
The API level is disconnected from the NVIM version. The API metadata
holds the current API level, and the lowest backwards-compatible level
supported by this instance.

Release 0.1.6 will be the first release reporting the Nvim version and
API level.

    metadata['version'] = {
      major: 0,
      minor: 1,
      patch: 6,
      prerelease: true,
      api_level: 1,
      api_compatible: 0,
    }

The API level may remain unchanged across Neovim releases if the API has
not changed.

When changing the API the CMake variable NVIM_API_PRERELEASE is set to
true, and  NVIM_API_CURRENT/NVIM_API_COMPATIBILITY are incremented
accordingly.

The functional tests check the API table against fixtures of past
versions of Neovim. It compares all the functions in the old table with
the new one, it does ignore some metadata attributes that do not alter
the function signature or were removed since 0.1.5.  Currently the only
fixture is 0.mpack, generated from Neovim 0.1.5 with nvim --api-info.
2016-10-26 14:23:50 +02:00
James McCoy
885db120fa Merge pull request #5456 from jamessan/char-sign-conversion
Enable CI testing of unsigned char and fix fallout
2016-10-15 15:29:13 -04:00
John Szakmeister
53eddb881c build: prevent in-tree builds for the time being, as it's not supported 2016-10-11 20:20:31 -04:00
James McCoy
cb03517fd3
ci: Force unsigned char usage for the 32bit build
Since C leaves whether char is signed or unsigned up to the implementer,
there are different defaults on different architectures.

Forcing unsigned char for one of our CI builds should help catch these
issues moving forward.
2016-10-09 21:12:45 -04:00
Rui Abreu Ferreira
4c9e5676cd Disable use of jemalloc in OpenBSD
Works around #3434, turning off the use of jemalloc in OpenBSD.
2016-09-10 18:43:04 +01:00
Björn Linse
7e2348f2b1 eval: use gperf to generate the hash of builtin functions
make api functions highlighted as builtins in vim.vim
2016-08-31 21:57:04 +02:00
Rui Abreu Ferreira
9ce81f7b2b functionaltest: Create lua helper for os.tmpname()
In Windows Lua's os.tmpname() returns relative paths starting with \s,
prepend them with $TEMP to generate a valid path.

In OS X os.tmpname() returns paths in '/tmp' but they should be in
'/private/tmp'. We cannot use os_name() for platform detection because
some tests use tempname() before nvim is spawned, instead use one of the
following:

1. Set SYSTEM_NAME environment variable before calling the tests, it
   is set from CMAKE_SYSTEM_NAME(i.e. uname -s or 'Windows')
2. Call uname -s
3. Assume windows
2016-08-31 11:32:28 +01:00
Rui Abreu Ferreira
bed61041a0 third-party: Build busted in Windows
Busted now builds on Windows, remove the check. In Windows the binary
is called busted.bat.
2016-08-26 08:09:56 +01:00
Justin M. Keyes
ad43480952 version bump 2016-08-22 00:28:47 -04:00
Justin M. Keyes
5b8255e251 NVIM v0.1.5
Features:
    c7d84c5550 PR #4980 Full `:ruby` support!
    c74ce334f2 PR #4624 timers: timer_start(), timer_stop()
    b8e6f04e69 PR #5205 `:CheckHealth` command

    47a15d0256 PR #4865 file: Add buffered reading and writing
        *Much* faster shada file reading (important for startup time).

    71b3e20d0f PR #4723 jobstart() learned 'rpc'
        jobs and RPC channel IDs share the same "namespace".
        jobstart() can starts RPC channels, which allows scripts to handle
        'stderr' on a RPC channel, like a typical non-RPC job.
        jobpid()/jobstop() work on RPC "jobs".
        Deprecates rpcstart().

    4dc4efc36f PR #4449 man.vim rewrite
        `:Man` command is enabled by default.
        New features: completion, window handling, better parsing, and more.

    8a4e5b4bc2 PR #4697 capture() function (renamed to execute())
        Supports nesting, including nested :redir.

    ae6db26b09 PR #5050 'rplugin manifest: default to XDG dir'
    a1682281f4 PR #5214 Restore ":browse oldfiles".
    1f7304b846 Better handling of mouse-clicks on concealed chars.
    5ea4d58a1b PR #5026 terminal: Ensure b:term_title always has a value
    c002310787 tui: Assume 256 colors in most cases.
    a2ecbc2cc0 PR #4929 Always resize the :terminal
    a59330d6fc PR #4925 api_info()
    a160590e40 PR #4813 allow setting cwd in jobstart(), termopen()
    74f6460181 PR #4633: support "special" highlight (undercurl)
    5a5ef1c222 PR #3450 mouse: Implement horizontal scroll.

Windows support:
    All PRs now build on Appveyor targeting win32 and win64!
    Numerous fixes!

Fixes:
    e9061117a5 PR #4646 Prevent data loss for process output streams
    7fa1baf44e PR #4798 'process.c: Fix block in teardown'
    c10fe010f1 Prevent endless loop in printdigraph(). (#5215)
    add41dca98 PR #5192 timers: Avoid crash after processing events
    006f9c0c9c PR #5195 Set the default value for 'packpath'
    6da7d6890c PR #5025 Restore double click
    d622e9c416 readfile(): Less-disruptive readonly check.
        Fixes an issue where nvim unnecessarily "touched" open files.
    fe6ec75725 PR #4964 Handle very long $XDG_DATA_DIRS.
    895f712df8 option: Do not expand options in XDG vars.
    1d8a076157 server_init: Handle server_address_new() failure.
    be531aba77 PR #5042 Fix v:register for clipboard=unnamed,unnamedplus
    204f557a11 PR #4984 'Trigger TabNewEntered with <CTRL-W>T'
    1e93e24f5e PR #4851 synIDattr(): Return RRGGBB value for `fg#`.

Changes:
    acc5d08b37 PR #4690 'termguicolors' option enables "true color".
        NVIM_TUI_ENABLE_TRUE_COLOR is now ignored.
2016-08-21 22:14:28 -04:00
Rui Abreu Ferreira
25ec29d4e1 Windows: Fix functionaltest fixtures 2016-08-07 21:57:29 +01:00
Josh Triplett
fc98d2d96d Pass busted the path to the detected Lua interpreter
Otherwise, busted may run a different interpreter than the one we
detected, without the capabilities we expect.  (For instance, we might
have detected the luajit interpreter, but busted might run the lua
interpreter, without the ffi module.)
2016-07-13 00:37:50 -07:00
Nicolai Skogheim
c475e3f8d1 cmake: remove unused includes (#4947) 2016-06-22 22:46:21 -04:00
Florian Walch
abe47d5f64 CMake: Search all possibly usable Lua executables. (#4858) 2016-06-03 12:21:29 -04:00
Rui Abreu Ferreira
46aac2a09a Windows: Don't build the TUI is systems where it is not supported
The TUI can be enabled/disabled at build time with -DFEAT_TUI, default is ON for
UNIX, and OFF for non UNIX. When off, Neovim prints a message to stderr, along
with a list of the server endpoints.
2016-05-27 23:43:40 +01:00
Rui Abreu Ferreira
d5c89b1896 cmake: Allow building without Luajit
By default Neovim searched a Luajit instalation and linked against
the luajit library.

In practice Neovim only requires luajit to run the unit tests. All other
targets only require lua and the correct lua modules. This commit:

1. Remove the strict dependency on Luajit
2. Makes the unittest target depend on the lua 'ffi' module.
   If the module is not available the target is not enabled
   and a message is displayed.
2016-05-19 17:55:19 +01:00
Dimitri Merejkowsky
2582754bdd Fix running tests from Ninja 2016-05-17 23:23:32 +02:00
Justin M. Keyes
7925ffc872 version bump 2016-04-24 21:58:07 -04:00
Justin M. Keyes
4dcd19d9bc NVIM v0.1.4
Features:
  5ebffaa :tcd for tab-local working directory (like :lcd, but for tabs)
  d835c03 remote/define.vim: support remote function "range"
  007d573 json_encode/json_decode (with sophisticated error detection) #4131
  b50afb4 clipboard: support "lemonade" tool

Fixes:
  cc1beec eval.c: Fix heap corruption error. #4592
  4043725 mbyte.c: Fix invalid memory access in utfc_ptr2char_len #4574
  4eb5827 Enable syntax/filetype by default. #4558

Changes:
  5c6592f v:windowid is writeable (useful for GUIs) #4608
2016-04-24 21:46:34 -04:00
Thiago de Arruda
c18d5917e3 Update lua client to 0.0.1-24
The new version of the lua client uses libmpack as a backend, and some test
scripts had to be updated to reflect that.
2016-04-13 09:21:32 -03:00
Justin M. Keyes
e605faaa2f version bump 2016-04-08 17:26:07 -04:00
Justin M. Keyes
f4f80a238b NVIM v0.1.3
Features:
  f2ae5a9 Add TextYankPost and TextDeletePost autocmds
  44b2cef bufhl: new mechanism for plugins to add highlights to a buffer
  39c3842 Make set{qf,loc}list() take {title}
  77a7ca4 'shortmess': Add "F" flag. #4446
  99d4c8c keymap: Support <D-...> (super/command key).

Fixes:
  14c9b30 terminal.c: temporary fix for incorrect paste handling

Notable changes:
  50e129f defaults: Enable syntax and filetype plugins.
  4e39eee upgrade libvterm (improves terminal reflow)
2016-04-07 22:04:21 -04:00
Justin M. Keyes
d9ecd06627 build: Specify old behavior for POLICY CMP0059.
This is needed as long as we support cmake older than 2.8.12. When we
bump the minimum version to 2.8.12, we can use target_compile_options()
and add_compile_options() instead.

Closes #4389
2016-03-09 10:25:45 -05:00
Thiago de Arruda
646ab30858 Add Lua 5.1 as a third party dep
Also add a functionaltest-lua target to run the functional tests using the lua
interpreter and corresponding helper to top-level Makefile
2016-03-07 14:38:39 -03:00
Justin M. Keyes
0c2ba7554f Merge pull request #3900 from ZyX-I/inf-nan-string
Make it possible to eval() all floating-point values dumped by string()
2016-02-28 11:48:54 -05:00
ZyX
92d4dfdca5 ci: Disable -Wc11-extensions on FreeBSD
Closes #4363.
2016-02-28 06:58:47 +03:00
Jun T
1a15cf84c2 build: install *.mo into the "standard" directory
Change POROJECT_NAME to 'nvim', and use it as the gettext
domain name. The *.mo files, previously installed as
$runtime/lang/xx/LC_MESSAGES/nvim.mo, are now installed as
$prefix/locale/xx/LC_MESSAGES/nvim.mo.
2016-02-23 13:39:56 +09:00
Florian Walch
e7615ddc22 CMake: Add #include in _FORTIFY_SOURCE check. #4214
Some toolchains apparently set _FORTIFY_SOURCE=2 in internal header
files. Include <string.h> (which in turn should include such internal
header files) before checking the value of _FORTIFY_SOURCE to catch
that.

Fixes #4183.
2016-02-10 00:17:55 +01:00
Justin M. Keyes
cb5ee26540 Merge pull request #4094 from justinmk/_GNU_SOURCE
cmake: Linux: define _GNU_SOURCE.
2016-02-09 00:34:14 -05:00
Justin M. Keyes
d402841b54 version bump 2016-02-09 00:21:54 -05:00
Justin M. Keyes
b33c777493 NVIM v0.1.2
Features:
  ef66249 tabline: Add %[] atom to the tabline, for random commands on click
  f338ea7 job control: implement jobpid() to get PID of job
  d0d5d17 job control: add 'detach' option to jobstart
  7ad3f07 Add support for binary numbers

Fixes:
  291495a regexp_nfa.c: Speed up find_match_text()
  317d5ca input: Do not set high-bit; preserve ALT modifier.
  3b7c409 shell: Unquote &shell* options before using them

Notable changes:
  49b06a8 encoding: Always use "utf-8" as default for &encoding
  79a6983 ui: revert "gui_running" hack

Other changes:
  b4b4536 version: semver.org compliance
  c6aa716 reproducible builds: Stop using __{DATE,TIME}__
  46bd3c0 clipboard: Check $DISPLAY. Prefer xsel. #4150
  f6ecd12 job control: don't kill PTY processes on exit
  49f0417 clipboard: Detach clipboard helper, so contents is kept after nvim exit
  38435e8 python: Add missing I/O methods to RedirectStream
  d26b01d eval: Use better error messages when failing to dump values
  62d137c Remove swapsync.
2016-02-09 00:01:18 -05:00
James McCoy
2be51f5e85 cmake: msgpack: Add more thorough version check
In 33bc332, version constraints were added to pkg_search_module(), but
that only affects the set of directories searched by
find_library()/find_path().

Once the header directory is found, parse the version from
version_master.h so it can be checked by the find_package() call in the
root CMakeLists.txt.
2016-02-05 19:46:53 -05:00
Justin M. Keyes
b5f6f43095 cmake: Linux: define _GNU_SOURCE.
Closes #4042
2016-01-24 21:18:44 -05:00
Rui Abreu Ferreira
1eaa2227e9 CMake: Defer setting CACHE CMAKE_BUILD_TYPE.
The Visual Studio CMake generator fails to configure if
CACHE CMAKE_BUILD_TYPE is set before CMAKE_BUILD_TYPE.
2016-01-18 09:18:18 -05:00
Rui Abreu Ferreira
f5ae5fa799 MSVC+CMake: avoid get_target_property. #4004
When using the Visual Studio generator don't use get_target_property for
custom command, because it returns unexpanded VS variables (e.g.
$(Configuration)) within the result as part of the LOCATION path.

The single case where this is a problem is for getting the output path for
nvim-test, instead we use a path here.
2016-01-17 22:59:55 -05:00
Rui Abreu Ferreira
54a1fb77e7 MinGW: don't use -fstack-protector
Mingw-w64 fails to link when using -fstack-protector flags, disabled the
flag check for non Unix system.
2016-01-13 23:09:27 -05:00
Rui Abreu Ferreira
1ce329e7dd Fix build output paths for Visual Studio generator
The Visual Studio cmake generator creates subdirectories inside
the build path for different build configuration. But this breaks some of our
cmake scripts, like the help tags installer, that assume the targets are
built in that location. Updated CMakeLists.txt to remove extra paths.
2016-01-10 14:16:30 -05:00
Justin M. Keyes
73b8c89518 Merge pull request #2667 from equalsraf/tb-min-log
cmake: Pass MIN_LOG_LEVEL as compiler definition
2016-01-10 12:21:52 -05:00
Rui Abreu Ferreira
72d03cc961 cmake: Pass -DMIN_LOG_LEVEL as compiler definition
- Check if MIN_LOG_LEVEL value is a number 0-3, default to
  INFO (1) or ignore it in Release mode
- When TRAVIS_CI_BUILD is ON the default is DEBUG (0)
- Add local.mk.example
2016-01-10 17:06:53 +00:00
Rui Abreu Ferreira
fd10729bc8 CMake: Add CPack settings to CMakeLists.txt 2016-01-10 09:50:35 -05:00
Justin M. Keyes
b4b4536339 version: semver.org compliance
We use `git describe` to stamp pre-release versions (dev builds). But
`git describe` uses the result of the most-recent tag (the current
_release_ version)--so we must munge it with the _next_ (i.e.
unreleased) version.

Also fix non-git builds: do not invoke git_describe(NVIM_VERSION_MEDIUM)
if we're not in a git tree, else it gets the dummy value
"HEAD-HASH-NOTFOUND".

Example :version output in non-git build:
  NVIM 0.1.2-dev

Example :version output in git build:
  NVIM v0.1.2-176-g9c3c2b5
2016-01-08 01:09:22 -05:00
Rui Abreu Ferreira
bd529ea3f3 MinGW: libuv needs -D_WIN32_WINNT=0x0600
Without this compilation fails due to a missing symbol: SRWLOCK in libuv
headers. _WIN32_WINNT defines the Windows header version that is to be used,
and it seems libuv requires this version. See

    b471b33da8
2016-01-04 19:51:09 -05:00
Rui Abreu Ferreira
8be2ab11de Fix CMakeLists.txt search paths for cross compile 2015-12-15 13:53:46 -05:00
Michael Reed
7be12edd38 Remove "Commit:" field from --version output
If nvim is built from a non-tagged commit, the truncated commit hash is
already appended to the main version string (e.g., "NVIM v0.1.0-83-g959f260 ..."),
making the "Commit:" field redundant.

Regarding the truncated hash length: we don't have nearly enough commits
to worry about collisions, and probably won't ever, so the default
length should be fine.
2015-12-05 16:15:32 -05:00
Justin M. Keyes
4a1c36e953 Nvim 0.1.1
- shada/msgpack editor plugin #3270
- VimL Dict notifications #3603
    - Note: API for this feature may change.
- :profile dump, :profile stop #2427
- :oldfiles! #3611
- TermOpen, TermClose events #3653
- fix: shada/viminfo: Do not save unlisted and quickfix buffers #3581
2015-12-05 14:56:37 -05:00
Marco Hinz
818f926eb0 Tests: add luacheck for linting tests
Source: https://github.com/mpeterv/luacheck
Docs:   http://luacheck.readthedocs.org/en/0.12.0/index.html

Run via "make testlint".
2015-11-23 13:57:21 +01:00
Justin M. Keyes
d0401b04a4 build: Use git describe for version strings.
When building in a git repo:
  - If HEAD corresponds to an annotated tag, (i.e. git_get_exact_tag()
    returns truthy) the current build is considered a "release" build:
    NVIM_VERSION_MEDIUM is directly assigned the tagged version name,
    and NVIM_VERSION_* defines are ignored.
  - If HEAD is not a tagged release, then NVIM_VERSION_MEDIUM is
    directly assigned the result of `git describe`.

If git (or the repo) is not available:
  - The NVIM_VERSION_* defines are used to define NVIM_VERSION_MEDIUM.

Sample outputs for `nvim --version` and `nvim +version`:

    Building with git @ non-tagged commit e66df14:
      NVIM v0.1.0-1-ge66df14 (compiled Nov  1 2015 19:10:30)
      Commit: e66df148f9401be17adab324a6e41d927aae20b3

    Building with git @ v0.1.1 tag:
      NVIM v0.1.1 (compiled Nov  1 2015 19:03:52)
      [no "Commit:" line]

    Building this commit _not_ in a git repo:
      NVIM 0.1.0-dev (compiled Nov  1 2015 19:16:11)
      [no "Commit:" line]
2015-11-01 21:31:29 -05:00
Justin M. Keyes
c4826c3003 Nvim 0.1.0 2015-11-01 16:16:38 -05:00
Justin M. Keyes
4a0c0fd321 Nvim 0.1.0 2015-11-01 14:23:40 -05:00
Florian Walch
90909e9362 CMake: Force use of project directory to look for Git data.
Before this change, building Neovim would recursively search parent
directories for a .git directory. If Neovim was downloaded as a tarball
(i.e. without a .git directory), but placed in a subdirectory of
a Git repository, this caused a CMake error. Such a situation could
occur when packaging Neovim, for example.

Unfortunately, the previous attempt in #3317 did not fix this problem.
2015-11-01 16:19:52 +01:00
Florian Walch
a83020922d version: Prepare for releases.
* Hide commit information from --version if we can't find any (e.g. when
  building from tarball).

To define a release in CMake, set NVIM_VERSION_PRERELEASE to "".
This will modify --version output to:

    * Show annotated Git tag instead of commit hash (NVIM_VERSION_COMMIT).
    * Hide commit date (NVIM_VERSION_BUILD).
2015-11-01 15:41:36 +01:00
Florian Walch
cb87ea7e82 CMake: Disable logging for release build types.
These are: Release, MinSizeRel, and RelWithDebInfo.

Closes #2913.
2015-11-01 15:41:36 +01:00
Florian Walch
87e5a41316 CMake: Add custom Dev build type.
Introduce new build type Dev that replaces RelWithDebInfo for development
builds off master and has optimizations, debug info, and logging enabled.
Keep assertions enabled for RelWithDebInfo.
2015-11-01 15:41:36 +01:00
Thiago de Arruda
6cd20177df build: Set the default value of ENABLE_JEMALLOC to ON
Restoring the default which was changed by #3515.
2015-10-29 14:51:56 -03:00
Ole Reifschneider
2bcfd7fde1 Make jemalloc optional 2015-10-26 19:33:50 +01:00
Michael Reed
e0974bdd0d build: Check if compiler supports -Wvla before use
OpenBSD's GCC (4.2.1) doesn't have the -Wvla flag.
2015-10-02 13:02:44 -04:00
Florian Walch
e8fdbd1cc4 CMake: Remove --sort-common from linker flags.
Workaround for bugs reported at #2641 and #3374.
Root cause for this problem is still unknown.

Resolves #2641 and resolves #3374.
2015-10-01 00:16:25 +02:00
Rui Abreu Ferreira
2c6f74d6d6 Enable compiler flag -Wvla 2015-09-24 17:41:03 +01:00
Florian Walch
231ac048aa CMake: Use project directory to look for Git revision.
If downloading Neovim as a tarball (i.e. without Git data),
building Neovim will search parent directories for a .git directory.
Explicitly set GIT_DIR to the project directory to avoid that.
2015-09-08 22:54:57 +02:00
Rui Abreu Ferreira
9bc1b78058 MSVC: Don't use GCC -O/-g flags. #3267 2015-08-31 02:51:49 -04:00
Yamakaky
4a8d557d44 cmake: Enable -fdiagnostics-color=auto gcc flag. #3137 2015-08-27 22:16:43 -04:00
Justin M. Keyes
f15b864239 MSVC: use MSVC instead of GCC-like compiler flags.
- We can build with /W4, but it gives thousands of warnings.
- _CRT_NONSTDC_NO_DEPRECATE disables warnings about POSIX functions.
  https://msdn.microsoft.com/en-us/library/ms235384.aspx
- _CRT_SECURE_NO_WARNINGS
  https://msdn.microsoft.com/en-us/library/8ef0s5kh.aspx
2015-08-27 22:00:34 -04:00
Michael Reed
2b4cbbebf4 cmake: Build with -fstack-protector-strong if available #2597
If not available, fall back to -fstack-protector + --param=ssp-buffer-size=4
If that isn't available, do nothing.

See the following articles for more information:

https://lwn.net/Articles/584225/
https://outflux.net/blog/archives/2014/01/27/fstack-protector-strong/
2015-08-26 18:05:38 -04:00
Rui Abreu Ferreira
fc7055f6e9 Mingw: Use POSIX compatible stdio #3232
- There are some differences between stdio (*printf) functions in POSIX
  and the MS runtime, this commit enables Mingw compatibility for these
  functions
2015-08-25 19:13:23 -04:00
ZyX
e1cc0fe996 cmake: Generate tags and some vim syntax elements 2015-07-26 21:09:52 +03:00
Florian Walch
fe6bd8cae2 CMake: Add option for Clang TSan, rename option ASAN -> ASAN_UBSAN. 2015-07-05 10:31:16 +03:00
Florian Walch
bd9042b1a9 CMake: Add option for Clang MSan. 2015-07-05 10:31:16 +03:00
Michael Reed
01a200996a Remove outdated and unused manuals #2891
`nvim-[lang].1`:
The non-english manuals are completely outdated and still written in
roff, as opposed to mdoc, which is used for `nvim.1`.
Given that, they're nearly useless at the moment, and when/if they are
updated, they should probably be rewritten from scratch using `nvim.1`
as a reference.

`xxd*.1`:
xxd hasn't been in the source tree for a long time, so the manual is of
little use.

`nvimtutor*.1`:
The vimtutor script hasn't ever shipped with nvim, and the consensus
seems to be that it won't, at least in the form of an executable
installed alongside `$(PREFIX)/bin/nvim` (see #2700).

In `nvim.1`, the argument to the `.Os` macro was removed. This was done
because its only purpose was to signify that nvim and nvimtutor
were part of the "Neovim" distribution, i.e., one and the same, which
isn't applicable anymore because `nvimtutor.1` is being removed.
From the `.Os` documentation in `man mdoc`:

    Os
	 Operating system version for display in the page footer.  This is the
	 mandatory third macro of any mdoc file.  Its syntax is as follows:

	       .Os [system [version]]

	 The optional system parameter specifies the relevant operating system or
	 environment.  It is suggested to leave it unspecified, in which case
	 mandoc(1) uses its -Ios argument or, if that isn't specified either,
	 sysname and release as returned by uname(3).

	 Examples:
	       .Os
	       .Os KTH/CSC/TCS
	       .Os BSD 4.3

	 See also Dd and Dt.

Reviewed-by: Felipe Morales <hel.sheep@gmail.com>
Reviewed-by: Florian Walch <florian@fwalch.com>
Reviewed-by: Justin M. Keyes <justinkz@gmail.com>

[ci skip]
2015-06-25 19:08:21 -04:00
Thomas Anderson
9995f15a98 CMake: Fix helptags generation when prefix is not /usr. #2741 2015-06-09 01:12:08 -04:00
Florian Walch
2271b746d7 CMake: Fix _FORTIFY_SOURCE detection when using hardening-wrapper. #2788
When checking code with check_c_source_compiles, the "check variable"
(for the _FORTIFY_SOURCE detection: previously _FORTIFY_SOURCE_ACCEPTABLE, now
HAS_ACCEPTABLE_FORTIFY) is passed to the compiler like
-D_FORTIFY_SOURCE_ACCEPTABLE. This throws off hardening-wrapper [1],
which then NOT sets _FORTIFY_SOURCE=2 for the check, assuming it had already
been set manually as it detected -D_FORTIFY_SOURCE*. Renaming the "check
variable" to not match this pattern works around this problem.

[1] https://github.com/thestinger/hardening-wrapper
2015-06-04 13:43:02 +03:00
Thiago de Arruda
1352725beb build: Limit --coverage flag to files under "src"
Resolves #2632. This is done so C helper modules don't generate unexpected
coverage output.

Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
Reviewed-by: Florian Walch <florian@fwalch.com>
2015-05-18 04:28:01 -03:00
Michael Reed
aa1d9a1807 Build: Use GNUInstallDirs, install man pages #2649
For now, only install man pages matching "nvim*.1": we don't want to
install xxd.1 as it might conflict with that of a user's Vim
installation.

closes #1826

Reviewed-by: Florian Walch <florian@fwalch.com>
Helped-by: John Szakmeister <john@szakmeister.net>
2015-05-17 14:57:43 -04:00
John Szakmeister
d00558bbdb build: create prereq targets for test dependencies
This will help make sure that we build all the right prereqs before
manually running tests under QuickBuild.

Notice that shell-test has been added as a prereq for the functional
tests, since it's a requirement for testing the terminal features.
2015-05-09 09:24:07 -04:00
Scott Prager
74aef89720 term: use an argument vector for termopen().
Old behaviour: termopen('cmd') would run `&shell &shcf "cmd"`, which
caused the functional tests to fail on some systems due to the process
not "owning" the terminal. Also, it is inconsistent with jobstart().

Modify termopen() so that &shell is not invoked, but maintain the old
behaviour with :terminal. Factor the common code for building the
argument vector from jobstart() and modify the functional tests to call
termopen() instead of :terminal (fixes #2354).

Also:
 * Add a 'name' option for termopen() so that `:terminal {cmd}` produces
   a buffer named "term//{cwd}/{cmd}" and termopen() users can customize
   the name.
 * Update the documentation.
 * Add functional tests for `:terminal` sinse its behaviour now differs
   from termopen(). Add "test/functional/fixtures/shell-test.c" and move
   "test/functional/job/tty-test.c" there, too.

Helped-by: Justin M. Keyes <@justinmk>
2015-05-02 09:47:29 -04:00
Florian Walch
8130eb1191 jemalloc: Force use of prefixed functions.
* Set JEMALLOC_NO_DEMANGLE to be able to use `je_*` functions,
  regardless of how jemalloc was compiled (--with-jemalloc-prefix)
* Show jemalloc information in Neovim's version output.

Resolve #2449.
2015-04-29 22:26:55 +03:00
Florian Walch
5b5d353151 CMake: Don't request static linking for dependencies.
For built-in dependencies, shared libraries are removed and static
linking is always used.

For systemwide dependencies, static linking should not be used.
2015-04-29 22:26:55 +03:00
Florian Walch
07d4142a18 CMake: Refer to Unibilium instead of LibUnibilium. 2015-04-29 22:26:55 +03:00
Michael Reed
55aab0e7e1 CMakeLists.txt: Remove unneeded globs
refs #2426
2015-04-16 20:22:05 -04:00
Thiago de Arruda
8a1a9b9558 deps: Add jemalloc as an optional dependency
Jemalloc will be used if the cmake option `USE_JEMALLOC` is enabled(which is the
default). To avoid trouble with clang's ASAN, it is disabled by default if the
`SANITIZE` option is enabled.

Since jemalloc has thread cache for small objects, it fills the gap created by
removing klib memory pools.

The `xstrdup` funciton(memory.c) had to be reimplemented on top of `xmalloc` to
make it work with a custom allocator.
2015-04-13 08:22:59 -03:00
David Bürgin
d3bb177f1e vim-patch:7.4.497 #2295
Problem:    With some regexp patterns the NFA engine uses many states and
            becomes very slow.  To the user it looks like Vim freezes.
Solution:   When the number of states reaches a limit fall back to the old
            engine. (Christian Brabandt)

https://github.com/vim/vim/releases/tag/v7-4-497

Helped-by: David Bürgin <676c7473@gmail.com>
Helped-by: Justin M. Keyes <justinkz@gmail.com>
Helped-by: Scott Prager <splinterofchaos@gmail.com>
2015-04-05 19:24:58 -04:00
Scott Prager
feca9624b8 CMakeLists: enable USE_FNAME_CASE on Mac 2015-03-31 11:20:24 -03:00
lyuts
862d687fea Fixed compilation when using custom libtermkey (not installed in base
system).
2015-03-15 00:11:10 -07:00
Volodymyr Medvid
f7d5839d0c deps: Provide options to disable static linkage
Allow dynamic linkage to libunibilium, libtermkey and libvterm.
2015-03-08 23:29:47 +02:00
Thiago de Arruda
81a346553c deps: Add libvterm to the project dependencies
libvterm is a terminal emulation library with abstract display. It will be used
to implement builtin terminal emulation into Nvim.
2015-02-28 10:41:53 -03:00
Mike Zeller
f28941b96d illumos requires the use of limits.h for things like INT_MAX #2049 2015-02-26 11:42:05 -05:00
John Szakmeister
9bc1e4335c build: make sure our deps area is picked up for pkg-config files 2015-02-24 14:01:20 -05:00
Thiago de Arruda
d7e560e5b3 job: Allow spawning jobs connected to pseudo terminals 2015-02-23 21:43:33 -03:00
Thiago de Arruda
9a2dd7c498 ui: Rewrite the builtin terminal UI
Now all terminal-handling code was moved to src/nvim/tui, which implements a
new terminal UI based on libtermkey and unibilium
2015-02-16 23:17:39 -03:00
John Szakmeister
1eef530351 Merge pull request #1588 from equalsraf/tb-no-central-deps
Dont force ../.deps in third-party/CMakeLists.txt use the Makefile instead
2014-12-18 08:11:00 -05:00
John Szakmeister
379dcd7d7f Merge pull request #1686 from jszakmeister/include-opts-in-fortify-check
build: include the flags for the build type in the _FORTIFY_SOURCE check
2014-12-18 04:14:14 -05:00
Ross Smith
1c3d093c85 Detect and propagate _FORTIFY_SOURCE prefix
Get prefix to a -D_FORTIFY_SOURCE string if it is present in
CFLAGS and apply the prefix to flags added to redefine
_FORTIFY_SOURCE in CFLAGS and CPPFLAGS

* fixes 1569
2014-12-17 23:05:46 -05:00
John Szakmeister
0a5dad8a10 build: include the flags for the build type in the _FORTIFY_SOURCE check
It turns out the check was being performed without optimizations enabled
even when the CMAKE_BUILD_TYPE was set to a release build.  This led to
_FORTIFY_SOURCE's level not being correctly determined, and us failing
to apply the correct workaround.

To counter this, we'll take the default flags for the build type and
apply them.  Also, if options are passed via CFLAGS, they are
automatically passed on to the underlying build.  So this should cover
all the necessary ground.

This fixes #1647.
2014-12-16 06:02:42 -05:00
Rui Abreu Ferreira
8d54a7203e Allow cmake caller to override DEPS_PREFIX
- Caller can override bundled dependency location using
  DEPS_PREFIX
- Cache variable DEPS_PREFIX, using .deps/usr by default
- Removed unused variables DEPS_BIN_DIR, DEPS_BUILD_DIR, DEPS_DIR
  DEPS_INSTALL_DIR
- Corner case: if the caller tries to override DEPS_PREFIX after a
  successful cmake configuration, the caller needs to clear the cache
  because dependency checks are based on the old value
2014-12-16 10:28:43 +00:00
oakes
dd9e5a3d7a Allow building as a static -fPIC library 2014-12-12 14:48:39 -05:00
John Szakmeister
7b6f705e5f build: probe the compiler to see if we need to turn down _FORTIFY_SOURCE
Some builds don't use Release (such as Gentoo, though it can be told
to).  So let's go a bit further and probe the compiler to see if we need
to turn down the _FORTIFY_SOURCE level.
2014-11-25 20:18:51 -05:00
Florian Walch
96b31ca048 CMake: Set -Wconversion by default. 2014-11-19 17:21:21 +01:00
Rui Abreu Ferreira
2b887ec66b Use cmake --build instead of Make
- If possble try to abstract away from Make, and use cmake --build
- third-party still needs to find Make to build some components
- Removed search for Make from CMakeLists.txt
* for CMake < 3.0 --build has no color output
2014-11-14 14:35:16 +00:00
John Szakmeister
2540155591 build: fix CMAKE_MODULE_PATH usage
Fixes #1447.  `CMAKE_MODULE_PATH` is meant to be a list of directories,
and as such, is not the proper way to launch our scripts.  Let's use
`${PROJECT_SOURCE_DIR}/cmake` instead.  Also, let's not outright set
`CMAKE_MODULE_PATH`, but instead append our location to the list.
2014-11-10 19:26:01 -05:00
Florian Walch
176930fa56 version: Add compilation info. 2014-11-09 18:34:57 +01:00
John Szakmeister
dcccc1a50d Merge pull request #1437 from jszakmeister/build-search-fixes
A few fixes for some build-related issues.
2014-11-09 08:31:33 -05:00
John Szakmeister
d51c0a9471 build: only attempt to use -Og if it's supported
Commit a1d411f9c9 just assumes that gcc
will support the `-Og` option, but gcc that comes with Ubuntu 12.04 does
not.  Let's check to see if the flag is supported, and then decide
whether to enable it or not.
2014-11-09 06:58:17 -05:00
Justin M. Keyes
c9df7ba308 Merge pull request #1383 from fwalch/nvim-buildtype
CMake: Set custom RelWithDebInfo compile flags.
2014-11-08 18:39:12 -05:00
John Szakmeister
9344a40e74 build: pull iconv detection into its own FindIconv.cmake file
This will provide better control for those who may want to alter which
one gets used.
2014-11-08 16:22:35 -05:00
John Szakmeister
203a5166a0 build: give priority to /sw and /opt/local on Mac OS X
Unfortunately, we can't force the specific inclusion of a header file.
So if anything add /opt/local/include to the include path--such as
libintl--then other dependencies might be drawn from /opt/local at
compile time, even though we detected them elsewhere at configure time.
This, in turn, causes issues with mixed versions, such as the iconv.h
header being pulled from /opt/local/include, but linked against the
library in /usr/lib--which can be mismatched versions.

So, despite CMake's best effort to treat /sw and /opt/local as just
another system area, we really need to give them preferential treatment.
To do this, we add them to CMAKE_PREFIX_PATH.

This fixes an issue discovered while re-enabling iconv in #1370.
2014-11-08 16:21:47 -05:00
John Szakmeister
05f78d30ac build: use the proper libintl include variable
What was there worked, but it wasn't meant to be the variable that you
use for inclusion.
2014-11-08 16:11:12 -05:00
Florian Walch
a1d411f9c9 CMake: Set custom RelWithDebInfo compile flags. 2014-11-08 21:54:30 +01:00
John Szakmeister
5d97f3fc2c build: default to using -O2 for release builds
The -O3 optimization level can often lead to dangerous (and sometimes
incorrect) optimizations being performed.  So let's use a level that's
more stable.
2014-11-07 06:21:54 -05:00
John Szakmeister
5ba1d980fb build: fix running of functional tests directly with CMake
If you aren't just building everything into build/, then the functional
tests fail because they can't find the nvim executable.  Let's pass in
the location of the nvim executable, and set NVIM_PRG environment
variable accordingly.
2014-11-05 07:26:35 -05:00
Florian Walch
b904c33e41 CMake: Rename target "test" to "functionaltest".
Remove build warning:

    The target name "test" is reserved or not valid for certain CMake
    features, such as generator expressions, and may result in undefined
    behavior.
2014-11-05 11:54:20 +01:00
Florian Walch
5714afc11e CMake: Modify _FORTIFY_SOURCE only for release builds.
Remove build warning for Debug builds:

    # warning _FORTIFY_SOURCE requires compiling with optimization (-O)
2014-11-05 11:54:15 +01:00
John Szakmeister
64ea00299d build: turn down the _FORTIFY_SOURCE level on gcc >= 4.0 2014-11-05 03:53:31 -05:00
John Szakmeister
5e65400c6f Add missing linker flags required for LuaJIT on 64-bit Mac OS X.
This was brought up in #1294.
2014-10-17 06:50:13 -04:00
Thiago de Arruda
69561ea922 test: Remove run-functional-tests.py
Now that the lua client is available, python/lupa are no longer necessary to run
the functional tests. The helper functions previously defined in
run-functional-tests.py were adapted to test/functional/helpers.lua.
2014-10-16 09:21:37 -03:00
Justin M. Keyes
92b17e174f cmake: handle missing git or .git/
GetGitRevisionDescription.cmake: we don't need fine-grained failure
modes, we only need "yes" or "no".

fix #1292
2014-10-15 14:45:42 -04:00
Justin M. Keyes
a1901941f8 version: generate "build number" from commit timestamp
- cmake: git_timestamp() returns last commit time formatted as
  `YYYYMMddHHmm`.
- Always include commit hash in :version and --version output.

`nvim --version` sample output:
  NVIM 0.0.0-alpha+201410070245 (compiled Oct  7 2014 05:30:45)
  Commit: f747b2b1ff7bfe7eb00cc2be82d7af87c98f1111
2014-10-07 10:23:15 +00:00
Justin M. Keyes
2c2fee4d1f version: report commit hash as "build number" in long version string 2014-10-07 10:03:14 +00:00
Thiago de Arruda
42d5b526b9 test: Replace vroom by lua/busted for functional tests
The 'lupa' python package provides a simple way to seamless integrate lua and
python code.

This commit replaces vroom by a python script that exposes the 'neovim' package
to a lua state, and invokes busted to run functional tests. This is a temporary
solution that will enable writing functional tests using lua/bused while a lua
client library is not available.

The reason for dropping vroom is flexibility: Lua/busted has a nice DSL-style
syntax while also providing the customization power of a full programming
language. Another reason is to use a single framework for unit/functional tests.

Two other changes were performed in this commit:

- Instead of "gcc-unittest/gcc-ia32", the travis builds for gcc are now
  identified by "gcc/gcc-32". They will run unit/functional tests for both 64
  and 32 bits.
- Old integration tests(in src/nvim/testdir) are now ran by the 'oldtest' target
2014-09-30 17:37:16 -03:00
John Szakmeister
0d35369324 build: install with the correct permissions
The install() command will create the parent directories, but it does so
with the user's umask.  We want to do our best to make sure the correct
permissions are being set, without clobbering existing permissions.

To do this, this commit introduces an install_helper(), which is similar
in signature to the install() command, to help ensure that directories
are created ahead of the actual install() command.  This will attempt to
use 0644 permissions for files and 0755 permissions for directories by
default--though they can be overridden.

To make this work correctly, without trying to introduce some mechanism
with setting the umask, it meant that there's a small portion that makes
use of an "internal" version of the file() command.  It has been tested
on CMake 2.8.11, 2.8.12, and 3.0.2, and works correctly on all versions.

This fixes #1201 and #1086.
2014-09-22 05:56:52 -04:00
Thiago de Arruda
ddecfb763b deps: Switch lua msgpack library to one that supports 2.0 2014-09-16 14:14:00 -03:00
Florian Walch
0a01b3052e Update busted to 2.0.rc3.
Default to verbose output to show more information in case of errors.
Fix #1031.
2014-09-11 20:03:35 +02:00
Rui Abreu Ferreira
426f906485 Add 'bit' to the list of lua dependencies
- ex_cmds.lua requires the 'bit' module
2014-08-29 05:56:21 -04:00