Commit Graph

224 Commits

Author SHA1 Message Date
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
Florian Walch
bbaf699b6b CMake: Use DESTDIR for helptags generation. 2014-08-23 18:05:41 -04:00
Florian Walch
1310820e4f CMake: Generate helptags during install step.
Fix #1056.
2014-08-23 09:32:47 -04:00
John Szakmeister
531ded7865 Move po generation from Make to CMake.
Fixes #902: localization build: `install`, `uninstall`, `prefixcheck
targets.  All the language-related bits will now build under CMake.
Changes include:

  * Moving all non-generated sources into the NEOVIM_SOURCES variable
    to aid in generating the .pot file.
  * Moving a couple generated sources from NEOVIM_SOURCES and into
    NEOVIM_GENERATED_SOURCES.
  * Added NEOVIM_HEADERS to the executable and the library for folks who
    are using something other than Ninja or makefiles (that way the
    headers will show up in the IDE files).
  * Now uses gettext's `--update` switch to update the .po files, rather
    than doing a fragile `mv` dance that could leave you with a broken
    working tree if you press CTRL-C at the right time.
  * Creates `update-po-${LANG}` targets for updating individual
    languages, just like the original Makefile.
  * Also adds the `update-po` target for updating all the languages.
  * Ported the `check-${LANG}` style targets.  They're
    `check-po-${LANG}` under CMake.
  * Handles all the one-off instances that were in the original
    Makefile.  Fixed up ko.UTF-8.po to include the "Original
    translation" line like other .po files to make the generation of the
    "Generate from ..." comments consistent.  Updated ko.po with the new
    text.
2014-07-17 07:16:53 -04:00
John Szakmeister
c261b351ed Revert "Merge #928 'Move po gen to cmake'"
This reverts commit 53fba180c3, reversing
changes made to a3b3db8256.
2014-07-17 06:10:38 -04:00
John Szakmeister
67533e0948 Move po generation from Make to CMake.
Fixes #902: localization build: `install`, `uninstall`, `prefixcheck
targets.  All the language-related bits will now build under CMake.
Changes include:

  * Moving all non-generated sources into the NEOVIM_SOURCES variable
    to aid in generating the .pot file.
  * Moving a couple generated sources from NEOVIM_SOURCES and into
    NEOVIM_GENERATED_SOURCES.
  * Added NEOVIM_HEADERS to the executable and the library for folks who
    are using something other than Ninja or makefiles (that way the
    headers will show up in the IDE files).
  * Now uses gettext's `--update` switch to update the .po files, rather
    than doing a fragile `mv` dance that could leave you with a broken
    working tree if you press CTRL-C at the right time.
  * Creates `update-po-${LANG}` targets for updating individual
    languages, just like the original Makefile.
  * Also adds the `update-po` target for updating all the languages.
  * Ported the `check-${LANG}` style targets.  They're
    `check-po-${LANG}` under CMake.
  * Handles all the one-off instances that were in the original
    Makefile.  Fixed up ko.UTF-8.po to include the "Original
    translation" line like other .po files to make the generation of the
    "Generate from ..." comments consistent.  Updated ko.po with the new
    text.
2014-07-17 05:47:32 -04:00
Rui Abreu Ferreira
feffc65270 Add cmake platform checks
- Defined CMake checks for all headers in config.h.in
- Removed headers checks that are not used anymore:
  sgtty.h sys/statfs.h libintl.h poll.h
- Added UNIX check
- Add some fatal checks
  + Check for setenv() and fail if it does not exist
    since our os layer just assumes it does
  + lstat is required by os_unix.c
  + sys/wait.h is required in UNIX
- Removed entries for functions that are not being used: getcwd,
  getrlimit, getwd, nanosleep, sigaltstack, getwd, sigstack, fseeko
- Replaced nearly all defines in config.h.in for functions with
  compile time checks
- Add check for symbol FD_CLOEXEC
- Add check for langinfo CODESET
- HAVE_ICONV_H and HAVE_ICONV hold the expected checks but Neovim uses
  USE_ICONV define to actually decide whether to enable it
- Removed checks that are no longer needed
  + USEMEMMOVE
  + _FILE_OFFSET_BITS
  + HAVE_ST_BLKSIZE
  + dlfcn.h
2014-07-15 10:43:21 +02:00
Pavel Platto
2dc69700ec Use default busted pattern for unittests #943
- Unittest should contain substring '_spec' in filename.
- This is the simplest way to use both lua and moonscript tests.
- This prevents running of non-test scripts from test folder.
2014-07-14 20:08:39 +02:00
Rui Abreu Ferreira
6f0d3c0e77 Refactor the lua dependency checking.
This is in preparation for the next step, which is to find a suitable
lua interpreter, rather than just erroring when an interpreter is found
but doesn't have the necessary dependencies.

Helped-by: John Szakmeister <john@szakmeister.net>
2014-07-11 19:28:54 -04:00
Rui Abreu Ferreira
e06595fffb Removed unnecessary PATHS from cmake modules
- DEPS_INSTALL_DIR is already set into CMAKE_PREFIX_PATH in
  the main CMakeLists.txt
2014-07-08 05:06:09 -04:00
John Szakmeister
7cb20fd1b0 Generate a lua module to help pass build-related settings.
This allows us to avoid hard-coding paths and using environment
variables to communicate key information to unit tests, which fits
with the overall goal of making sure that folks driving CMake directly
can continue to do out-of-tree builds.
2014-05-03 10:36:54 -04:00
John Szakmeister
f9885f0b6a Allow a single unittest file to be run.
With this, you can now run a single unit test file using:

    TEST_FILE=/path/to/file make unittest

For example, to just run the path unit tests, you can do:

    TEST_FILE=test/unit/path.moon make unittest
2014-04-23 07:11:59 -04:00
Thiago de Arruda
9f7426ca16 Configure travis to perform a 32-bit build
- Build targeting 32-bit with travis
- Code in `before_install`/`after_success` was moved to travis.sh since it
  provides greater flexibility for detecting the build matrix environment. This
  improves the build speed since we now install only what's necessary.
- Now clint has a dedicated travis worker
2014-04-22 21:55:59 -03:00
Thiago de Arruda
78fd9386b6 Fix unit tests
Apparently busted 1.11.0 is broken(https://github.com/Olivine-Labs/busted/issues/236)
in a way that is causing the unit tests to fail. This pins the version to 1.10.0
and also fixes a wrong variable set when msgpack was added as a dependency
2014-04-14 16:46:16 -03:00
Thiago de Arruda
878e6e661d Add cmake module for finding msgpack 2014-04-11 14:07:44 -03:00
John Szakmeister
0efc815216 Append to CMAKE_PREFIX_PATH instead setting it outright.
Also, don't set it in the FindXxx cmake scripts--it's unnecessary, and
it resets the value.
2014-03-28 05:09:45 -04:00
John Szakmeister
f9aeb219c1 Fail RunUnittests if we get a non-zero exit code from busted. 2014-03-25 13:10:26 -04:00
John Szakmeister
1eed86883b Deal with the missing dependencies for libuv.
Since libuv.pc is broken at the moment, try to determine libuv's
dependencies ourselves.  This ports most of the checks from libuv into
our CMake build, and fixes the build on other unix platforms.
2014-03-21 15:22:00 -04:00
John Szakmeister
0b2f6a0cf4 Revamp the build system.
This achieves several goals:

 * Less reliance on scripts so we have better portability to Windows
   (though we still have a ways to go for proper Windows support).
   Luajit, luarocks, moonscript, and busted are all installed via CMake
   now.
 * Trying to make use of pkg-config to get the correct libraries.  The
   latest libuv is still broken in this regard, but we'll at least be in
   a position to use it.
 * Allow the use of Ninja or make.  The former runs faster in many
   environments, and automatically makes use of parallel builds.

This also allows for system installed dependencies--though not through
the Makefile just yet--and adds support for FreeBSD.

This also make us build libuv and luajit as static libraries only, since
we're only concerned about having static libraries for our bundled
dependencies.
2014-03-21 15:22:00 -04:00
Alexis Hildebrandt
05b9e11584 CMakeLists: Improve handling of libintl
by refactoring it into a separate CMake module
2014-02-27 19:11:48 +00:00
Rich Wareham
970be6d977 CMake: add LibUV_USE_STATIC configuration variable
If LibUV_USE_STATIC is set then the static libuv library will be
preferred to the shared library. This is useful when building with the
bundled libuv but is less useful when building with a system libuv.
2014-02-26 17:36:06 +00:00
Rich Wareham
c3ff8cbb7c prefer linking to static libuv
Explicitly try to find the static libuv library first.

This might be considered a hack and if it weren't a single-use module it
might be preferable to control static versus shared preferences with a
configuration variable.
2014-02-26 07:09:11 -03:00
Rich Wareham
00ca93fb50 automatically discover libuv in CMake
Idiomatically discover if libuv is installed.
2014-02-26 07:08:44 -03:00
Rich Wareham
e10290c3ea add LibFindMacros CMake macro library 2014-02-26 07:08:26 -03:00