Commit Graph

205 Commits

Author SHA1 Message Date
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