- When not running the unit tests, building the third-party busted,
nvim-client and other dependencies can be skipped by passing
-DUSE_BUNDLED_BUSTED=FALSE to the third-party project.
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.
This requires a couple of extra modules that are not installed by
default, and it requires capturing stdout of the tests--otherwise CMake
output is intermixed with the XML output of busted.
This is a variant of the utfTerminal output handler that will:
- Output the file name before each suite is executed
- Output the test name before each test is executed
This will make it simpler to identify crashing/hanging tests.
It turns out that `file(DOWNLOAD ...)` is not very user friendly with
it's error message, and only supports MD5 on v2.8.10 of CMake (the
default for Ubuntu 12.04). If CMake is built without SSL support,
users are left hanging with a message that the hashes don't match.
It turns out that `file(SHA1 ...)` exists in v2.8.10, and we
can use that to compute the hash ourselves. So this splits the hash
checking into a separate step, where we can provide some additional
advice if the SHA1 is the hash for an empty file. Additionally, it also
allows us to drop the MD5 hashes and maintain only SHA1 hashes for our
dependencies.
This is useful when trying to bisect an issue in a dependency, and we
want to pull from a specific commit but don't want to have to download
and determine the sha1sum and md5sum of the tarball.
- 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
When building under Homebrew, we want to let Homebrew manage
downloading and extracting the tarballs. See PR #1411.
Also make sure to skip only if directory is not empty. Fix#1433.
Also, the command was removing only .so versions of the library, and not
the the `.dylib` under Mac OS X, and in a way that it would fail if the
files weren't present.
Instead, let's delegate to a CMake script--to get the portability--and
use a glob to detect and remove the shared versions of the library.
Hopefully, this will become unnecessary as msgpack's build becomes more
full-featured, and we can just tell it to build the static version
instead.
Underneath the hood, CMake uses libcurl and libcurl has had a number of
issues regarding progress feedback. In one sample run against Travis
CI, we ended up with nearly 3,000 lines of progress output for a single
download.
Unfortunately, CMake doesn't have the download and extract steps
separate, so we have some extra work that we have to do. Much of the
content was taken from the ExternalProject.cmake and it's template for
generating the content of the download and extract CMake files.