aboutsummaryrefslogtreecommitdiff
path: root/cmake
Commit message (Collapse)AuthorAge
...
* refactor(build): include lpeg as a librarybfredl2023-04-27
|
* build: find system luv on ubuntudundargoc2023-04-19
| | | Also use the system luv in CI for the with-external-deps job.
* build: cmake cleanupdundargoc2023-04-04
| | | | | | | - Change libtermkeyCMakeLists.txt to LibtermkeyCMakeLists.txt - Remove duplicate mark_as_advanced calls in FindLibuv.cmake - Fix "Enabling Clang sanitizer" messages as it's no longer clang-only - Simplify parser installation syntax - Rename tree-sitter to treesitter
* refactor(build): make installation of runtime/ more effectivebfredl2023-03-07
| | | | | | | | | | | | | | | | | | | Currently files to install in runtime/ is detected by recursive glob pattern which has two problems: - cmake needs to do a of work at config time and build/runtime/cmake_install.cmake becomes HUGE (2.5MB, biggest config file) - we need to explicitly specify each file suffix used in the entire runtime, which is duplication of information. These globs specify every single file in a subdirectory. Thus, we can just install every runtime/ subdirectory as a single install command. Furthermore, at the top-level, only .vim and .lua files need to be installed. Further possible refactor: we could move files which does not belong in $PREFIX/runtime out of $REPO/runtime. Then runtime could be installed with a single install_helper(DIRECTORY ...) command.
* build: remove workaround for incorrectly packaged libluvdundargoc2023-03-05
| | | | | | This removes a workaround for incorrectly packaged libluv in 90e44ecf1144cb32195da00e24d23afb111ea680 as it should not be needed anymore.
* build: silence git describe error outputBiswapriyo Nath2023-03-05
| | | | | This change will silence the warning from git describe command when the project is built using source tarball. The warning is fatal: not a git repository: 'neovim/.git'
* build(deps): bump msgpack-c to v6.0.0 (#22522)Christian Clason2023-03-04
| | | | | * Remove C++ requirement if test is disabled * Change CMake package name of C library to msgpack-c * Unified all C package, library, cmake, tarball name become msgpack-c.
* refactor(build): graduate unibilium VAR_FROM feature from 2017bfredl2023-03-03
|
* refactor(build): graduate msgpack-c FLOAT32 "feature" since foreverbfredl2023-03-03
|
* refactor(build): graduate libtreesitter features which are 1+ years oldbfredl2023-03-03
|
* build: cmake cleanup (#22251)dundargoc2023-03-02
| | | | | | | | - Remove unused code - Use consistent casing. Variable names such as LibLuV_LIBRARIES is needlessly jarring, even if the name might be technically correct. - Use title casing for packages. find_package(unibilium) requires the find_module to be named "Findunibilium.cmake", which makes it harder to spot when scanning the files. Instead, use "Unibilium".
* build: remove libfindmacros library (#22423)dundargoc2023-03-02
| | | | | | Large parts the library weren't being used, and the parts that were was overly abstracted for our use case. Additionally, part of its use case was to abstract pkgconfig boilerplate, which is no longer needed as pkgconfig has been removed in favor of relying on cmake alone in 09118052cee5aef978d6075db5287c1b6c27381a.
* build: remove pkgconfig-related code (#22422)dundargoc2023-02-26
| | | Cmake should already be able to find everything on its own.
* docs: fix typos (#21961)dundargoc2023-02-20
| | | Co-authored-by: Ben Morgan <cassava@iexu.de>
* build: use libuv config file (#22209)ii142023-02-16
| | | | | | | | | Libuv's recent changes in their pc file breaks cmake; they are using -l:libuv.a for the linker, and it seems cmake can't resolve that. Prefer using their cmake config file instead instead, and use the find module as a fall-back in case it fails. Closes https://github.com/neovim/neovim/issues/22271.
* ci: print DLL copy messages only in CI environment (#22260)Enan Ajmain2023-02-14
| | | In Windows, library DLL's are copied in the building process, and a message for each copy is printed. This is useful to have in the log of CI, but annoying to see when you're building and rebuilding nvim constantly. Work around this issue by only enabling the messages on CI.
* build: don't check environment variable to detect CI (#22234)dundargoc2023-02-12
| | | | Instead use the cmake option, which should act as the definitive source to determine whether we use CI or not.
* Merge pull request #22077 from bfredl/neolua_clientbfredl2023-02-10
|\ | | | | refactor(tests): integrate lua-client into core and use core for functionaltests
| * refactor(tests): move lua-client into core and use it for functionaltestsbfredl2023-02-10
| | | | | | | | | | | | | | | | Eliminates lua-client and non-static libluv as test time dependencies Note: the API for a public lua-client is not yet finished. The interface needs to be adjusted to work in the embedded loop of a nvim instance (to use it to talk between instances)
* | build: mark uninteresting variables as advanced (#22208)dundargoc2023-02-10
|/ | | Only the most important variables should be shown by default.
* build(deps): bump libuv to HEAD - 62c2374a8 (#22166)Christian Clason2023-02-08
|
* build: prefer -D <variable>=<value> over -D<variable>=<value> (#22164)dundargoc2023-02-08
| | | | | This makes it easier to see that -D is referring to the entire "<variable>=<value>", rather than only <variable>. It also help syntax highlighters highlight built-in variables.
* build: remove duplicate INTERFACE keyword (#22106)dundargoc2023-02-07
|
* build: stop relying on CMAKE_BUILD_TYPE to determine the build type (#22051)dundargoc2023-02-03
| | | | | | | | | | | | Any logic involving CMAKE_BUILD_TYPE is automatically broken as it won't work with multi-config generators. The only exception is if we explicitly check whether the current generator is single-config as well. Instead, use generator expressions or cmake variables that allows to set options for certain build types only such as INTERPROCEDURAL_OPTIMIZATION_<CONFIG>. Opt to generate all headers with optimization level O2 with no debug information for all build types as that is the simplest way to make it behave the same for all generators.
* refactor(tests): run unittests using main nvim binary in interpreter modebfredl2023-01-31
| | | | This allows us to get rid of the separate "nvim-test" target
* build: fix dependencies in find modules (#22017)dundargoc2023-01-27
| | | | Find modules should only link to libraries defined in the find module, and not the main project. This helps the find modules be more self-contained and easier to understand.
* build: find unibilium without relying on libfindmacros (#22015)dundargoc2023-01-27
| | | | This will remove the warning about the find module not providing a version.
* build: check if libvterm version meets requirement (#22010)dundargoc2023-01-26
| | | | The vterm.h file only specifies major and minor version, but not patch, meaning that requiring a specific patch number isn't currently possible.
* build: various cmake fixes (#21902)dundargoc2023-01-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * build: various cmake refactors and simplifications - Add STATUS keyword to message to ensure messages are shown in the correct order. - Remove DEPS_CXX_COMPILER as we don't rely on C++ for any of our dependencies. - Simplify how msgpack and luv configure options are constructed. - Rely on the default installation for luv instead of manually passing configure, build and install commands. - Simplify return code conditional. * build: remove CMAKE_OSX_ARCHITECTURES_ALT_SEP workaround CMAKE_OSX_ARCHITECTURES_ALT_SEP was defined as a workaround to prevent the shell from interpreting `;`, which CMake uses as a list separator. However, the same thing can be achieved by instead passing CMAKE_OSX_ARCHITECTURES as a cache variable instead, which is a more idiomatic way of achieving the same thing. * build: define CMAKE_BUILD_TYPE before adding it to BUILD_TYPE_STRING The problem with the current setup is that CMAKE_BUILD_TYPE is defined after BUILD_TYPE_STRING. BUILD_TYPE_STRING will then be empty on the first run, meaning that dependencies are built without a build type. However, since CMAKE_BUILD_TYPE is a cache variable its value will persist in subsequent runs. On the second run BUILD_TYPE_STRING will have the correct value, but it's a different value from the ones the dependencies were built with. This will force some dependencies to be built again. Fixes https://github.com/neovim/neovim/issues/21672.
* build(Windows): fix redoing version generation (#21880)Enan Ajmain2023-01-18
| | | | | | | | | Problem: On Windows, neovim's version is generated every time nvim is built, even if code hasn't been changed. That is because version generation is done based on a hash matching of a file and the content of the file. And in Windows they don't match, because of the DOS line-endings. Solution: Write the file containing nvim version with UNIX line-endings.
* build: exclude tui/terminfo_defs.h from lintc-clint (#21822)dundargoc2023-01-15
| | | | | | | | clint takes around 5-10 seconds to lint tui/terminfo_defs.h. For CI this is negligible, but it's annoying for local development as touching terminfo_defs.h will skyrocket lint times. Furthermore, we have no reason to touch or modify terminfo_defs.h as it's a generated file, so linting it shouldn't be necessary. This should speed up "make lint" by the same amount, so around 5-10 seconds.
* build: remove clint error suppression #21782dundargoc2023-01-13
| | | | | | | | | | | | | | | Fix remaining clint errors and remove error suppression completely. Rename the lint targets to align with the established naming convention: - lintc-clint lints with clint.py. - lintc-uncrustify lints with uncrustify. - lintc runs both targets. lintc is also provided as a make target for convenience. After this change we can remove these files: https://github.com/neovim/doc/tree/gh-pages/reports/clint https://github.com/neovim/doc/blob/main/ci/clint-errors.sh
* build: use modern cmake (#21589)dundargoc2023-01-10
| | | | | | | | | | | | | | | | | | | | | Replace old-school cmake with the so-called "Modern CMake", meaning preferring using targets and properties over directory settings and variables. This allows greater flexibility, robustness and clarity over how the code works. The following deprecated commands will be replaced with their modern alternatives that operates on a specific target, rather than all targets in the current directory: - add_compile_options -> target_compile_options - include_directories -> target_include_directories - link_libraries -> target_link_libraries - add_definitions -> target_compile_definitions There are mainly four main targets that we currently use: nvim, libnvim, nvim-test (used by unittests) and ${texe} (used by check-single-includes). The goal is to explicitly define the dependencies of each target fully, rather than having everything be dependent on everything else.
* build: restrict `git describe` to top level source directory (#20993)Jan Palus2022-12-02
| | | | fix version determination when building neovim from release tarball extracted within another git repository
* Merge pull request #20858 from dundargoc/build/lintshdundargoc2022-11-05
|\ | | | | build: add more shell scripts to the `lintsh` target
| * build: add EXCLUDE option to add_glob_targetdundargoc2022-11-01
| | | | | | | | | | | | | | | | EXCLUDE filters out all elements containing regex, meaning it works on both files and directories. Also rename add_glob_targets to add_glob_target since only one target is being created.
* | build: give example on complex regexesdundargoc2022-10-21
|/ | | | | This is just to allow the reader to get a quick understanding without necessarily needing to know all the regex intricasies.
* fix(build): duplicate version string "v0.8.0-v0.8.0" #20578dundargoc2022-10-20
| | | | | | | | | | - Prevent duplicate version strings such as v0.8.0-v0.8.0. - Change the format for git releases from v0.9.0-dev-67-g625ba79be to v0.9.0-dev-67+g625ba79be. Nvim versions are now: release : v0.9.0 prerelease without git info: v0.9.0-dev prerelease with git info : v0.9.0-dev-67+g625ba79be
* ci: add cirrus to isCI function to skip tests (#20526)dundargoc2022-10-17
| | | | The environment variable CIRRUS_CI is manually passed to RunTests.cmake as it doesn't get passed when using cmake script mode.
* build: remove unnecessary translation-related codedundargoc2022-10-02
| | | | | The commands run in cmake script mode (-P) can simply be run in the main cmake run instead.
* build: remove unused variable CMAKE_C_COMPILER_ARG1dundargoc2022-10-02
| | | | | It was set in file cmake/i386-linux-gnu.toolchain.cmake which has been removed since we don't use Travis anymore.
* revert: "build: remove unnecessary policy related code" #20289dundargoc2022-09-23
| | | | | | | | | This partially reverts commit 42aeb5c5b18af1362362a2e6bdf10a2a4ec70f0f. Setting cmake policies is normally not required as cmake_minimum_required automatically sets these. One exception is cmake script mode (-P) since it automatically resets all policy changes. Closes: https://github.com/neovim/neovim/issues/20286
* build: ensure version generation always succeeds (#19515)dundargoc2022-09-10
| | | | | Add --always flag to `git describe` so version generation succeeds if current directory is in a git repo. If not in git repo, fall back to a default version in the format vx.y.z-dev
* build: remove unnecessary policy related codedundargoc2022-09-08
| | | | | Having cmake version 3.10 as the required minimum version ensures these are set to new by default.
* build: consistently set build type regardless of generator or platform #19760dundargoc2022-09-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the default build type to always be Debug, and allow only four predefined build types: Debug, Release, RelWithDebInfo and MinRelSize. Furthermore, flags meant for single-configuration generator (make, ninja) will not be used for multi-configuration generators (visual studio, Xcode), and flags meant for multi-configuration generators will not be used for single-configuration generators. This will allow Debug builds to be built with MSVC which requires that all dependencies are also built with the Debug build type to avoid runtime library mismatch. The correct way to specify build type (for example Release) for single-configuration generators (Make and Ninja) is to run cmake -B build -D CMAKE_BUILD_TYPE=Release cmake --build build while for multi-configuration generators (Visual Studio, Xcode and Ninja Multi-Config) is to run cmake -B build cmake --build build --config Release Passing CMAKE_BUILD_TYPE for multi-config generators will now not only not be used, but also generate a warning for the user. Co-authored-by: dundargoc <gocundar@gmail.com>
* build libuv cmake (#19632)Lewis Russell2022-08-12
| | | Co-authored-by: Daniel Hahler <git@thequod.de>
* build: remove InstallClintErrors.cmakeDundar Goc2022-08-03
| | | | | Replace its functionality by copying the entire directory where the reports are instead.
* build: remove unused file i386-linux-gnu.toolchain.cmakeDundar Goc2022-08-03
| | | | It was used in .travis.yml which has been removed.
* build: replace deprecated cmake features with their modern alternativesDundar Goc2022-08-03
| | | | | | | - Use DIRECTORY instead of PATH in get_filename_component - Use COMPILE_OPTIONS instead of COMPILE_FLAGS. COMPILE_FLAGS is treated as a single string while COMPILE_OPTIONS is a list, meaning that cmake will take care of any escaping and quoting automatically.
* build: add formatting targets for c and lua files (#19488)dundargoc2022-08-02
| | | | | | | | | | | | The targets will only format files that have been changed in current branch compared to the master branch. This includes unstaged, staged and committed files. Add following make and cmake targets: formatc - format changed c files formatlua - format changed lua files format - run formatc and formatlua Remove scripts/uncrustify.sh as this deprecates it.