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
Seen on Travis (osx):
[ RUN ] timers can be stopped from the handler: FAIL
.../build/neovim/neovim/test/functional/eval/timer_spec.lua:167: Expected objects to be the same.
Passed in:
(number) 2
Expected:
(number) 3
stack traceback:
.../build/neovim/neovim/test/functional/eval/timer_spec.lua:167: in function <.../build/neovim/neovim/test/functional/eval/timer_spec.lua:153>
Performance of high-resolution time (clock_gettime via uv_hrtime) is
expensive on some systems. For profiling VimL, syntax, etc., we don't
care about nanosecond-precision and monotonicity edge-cases, so avoid
uv_hrtime().
closes#10328
From the uv__hrtime() source:
0cdb4a5b4b/src/unix/linux-core.c (L442-L462)
/* Prefer CLOCK_MONOTONIC_COARSE if available but only when it has
* millisecond granularity or better. CLOCK_MONOTONIC_COARSE is
* serviced entirely from the vDSO, whereas CLOCK_MONOTONIC may
* decide to make a costly system call.
*/
This micro-benchmark (Debug build) shows negligible differences on my
system:
#include <sys/time.h>
...
proftime_T tm = profile_start();
int trials = 999999;
int64_t t = 0;
struct timeval tv;
for (int i = 0; i < trials; i++) {
t += gettimeofday(&tv,NULL);
}
tm = profile_end(tm);
ILOG("%d trials of gettimeofday: %s", trials, profile_msg(tm));
tm = profile_start();
for (int i = 0; i < trials; i++) {
t += os_hrtime();
}
tm = profile_end(tm);
ILOG("%d trials of os_hrtime: %s", trials, profile_msg(tm));
tm = profile_start();
for (int i = 0; i < trials; i++) {
t += os_utime();
}
tm = profile_end(tm);
ILOG("%d trials of os_utime: %s", trials, profile_msg(tm));
ILOG("%zu", t);
Problem: Search test can be flaky.
Solution: Use WaitFor() instead of a delay. Make it possible to pass a
funcref to WaitFor() to avoid the need for global variables.
(James McCoy, closesvim/vim#2282)
13deab8d08
Problem: Incremental search only shows one match.
Solution: When 'incsearch' and and 'hlsearch' are both set highlight all
matches. (haya14busa, closesvim/vim#2198)
2e51d9a097
Problem: :wall gives an errof for a terminal window. (Marius Gedminas)
Solution: Don't try writing a buffer that can't be written. (Yasuhiro
Matsumoto, closesvim/vim#2190)
059db5c29f
The variables are not meant to be defined there really, but only with
the third-party project.
Using them, e.g. with the following, would actually result in libvterm
not being found then:
make CMAKE_EXTRA_FLAGS="-DUSE_BUNDLED_LIBVTERM=ON" \
DEPS_CMAKE_FLAGS="-DUSE_BUNDLED=OFF -DUSE_BUNDLED_LIBVTERM=ON"
In https://github.com/neovim/neovim/pull/6357 they were renamed to
`USE_BUNDLED_X` from `X_USE_BUNDLED`, but the above reasoning applies
to the old names, too.
Internally `CMAKE_PREFIX_PATH` is used to add the built/bundled third
party packages for `find_package`, so there is no reason to e.g. query
the values via `load_cache` for example from the third-party project.
Just set it from `${CMAKE_HOST_SYSTEM_NAME}` directly, instead of passing it
from the main CMake file (CMAKE_SYSTEM_NAME defaults to it, but is empty
in script mode).
Initially added in 9ce81f7b2, but then even used with unrelated commands
(that do not use RunTests.cmake, e.g. 221f6fffa).
Problem: Stuck in redraw loop when 'lazyredraw' is set.
Solution: Don't loop on update_screen() when not redrawing. (Yasuhiro
Matsumoto, closesvim/vim#2082)
072412ed45
Problem: A terminal window with a running job behaves different from a
window containing a changed buffer.
Solution: Do not set 'bufhidden' to "hide". Fix that a buffer where a
terminal used to run is listed as "[Scratch]".
e561a7e2fa
Problem: Some macros are used without a semicolon, causing auto-indent to be
wrong.
Solution: Use the do-while(0) trick. (Ozaki Kiichi, closesvim/vim#2729)
6f4700233f
Problem: Filetype not detected for C++ header files without extension.
Solution: Recognize the file by the Emacs file mode. (Dmitry Ilyin,
closesvim/vim#4593)
6a7af8e2db
Do not run CMake in build before deleting it unnecessarily:
% make distclean
test -d build && ninja -C build clean || true
ninja: Entering directory `build'
[0/1] Re-running CMake...
* Add ci/common/submit_coverage.sh, used with Travis and AppVeyor
* use gcovr, with coverage.xml for better branch coverage reporting, and
easier processing of gcov files in general
* codecov: use flags again, with `uname -s` additionally
Ref: https://github.com/neovim/neovim/pull/10227#issuecomment-502923543
* remove now unused parsers.gcov config from codecov.yml
Problem: Misspelled mkspellmem as makespellmem.
Solution: Drop duplicate help entry, fix test. (Naruhiko Nishino, Ken
Takata, closesvim/vim#4437)
076073950c