aboutsummaryrefslogtreecommitdiff
path: root/cmake/Util.cmake
Commit message (Collapse)AuthorAge
* docs: small fixes (#26154)dundargoc2023-11-27
|
* ci: introduce CI_LINT optiondundargoc2023-06-24
| | | | | | This will abort if lint programs are not found, and is meant primarily for the lint job in CI. Supersedes the REQUIRED argument in add_glob_target as it's a superior replacement by being a built-in solution.
* build: cmake cleanupdundargoc2023-05-13
| | | | | | | | | | - Simplify error checking when using execute_process. - Set BUILD_SHARED_LIBS to OFF when building dependencies. This is normally not needed, but msgpack interprets an unset BUILD_SHARED_LIBS to build a shared library, which is the opposite of the cmake behavior. - Move function check_lua_module to Util.cmake. - Remove unnecessary code. - Make variable naming more consistent
* 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: 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: 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>
* feat(build): add_glob_target runs only on changed files #19070dundargoc2022-06-30
The general idea is that add_glob_targets creates a "touch file", a dummy file that acts as a dependency in order to check which files are outdated since the last time the target was run. Remove RunUncrustify.cmake as it's no longer necessary. It was initially introduced to silence its noisy output. The per-file targets will suppress the noisy output from uncrustify, except for the very first run. Also remove DefCmdTarget.cmake since add_glob_target already incorporates its functionality.