Commit Graph

16 Commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks f249747ff0 Fix generate_compile_commands_json again 2022-06-11 04:09:33 +02:00
Michael Fabian 'Xaymar' Dirks 48516b3c0f Fix compile_commands.json for makefile generators 2022-06-11 02:48:34 +02:00
Michael Fabian 'Xaymar' Dirks c2f3d5e9e3 Upgrade to CMake 3.20 and add clang-tidy
- 'compile_commands.json' is now generated in less time, with way more content.
- Removed compiler restrictions which had no actual effect on users.
- Added very basic clang-tidy support for all compilers that can handle it.
2022-06-11 01:38:22 +02:00
Michael Fabian 'Xaymar' Dirks 5a1b0f9f0b Fix file() argument order to match expected order 2022-06-10 20:27:10 +02:00
Michael Fabian 'Xaymar' Dirks 9a30804065 Assign a target for file generation 2022-06-10 20:13:29 +02:00
Michael Fabian 'Xaymar' Dirks ca57d43562 Add support for C++20 and MSVC 2022 2022-06-10 20:07:33 +02:00
Michael Fabian 'Xaymar' Dirks f7e1554ec2 Don't search for extended binary names 2022-06-10 20:00:55 +02:00
Michael Fabian 'Xaymar' Dirks b2a06d8af0 Add names for clang-format and clang-tidy 10 to 3.5 2020-07-30 07:04:28 +02:00
Michael Fabian 'Xaymar' Dirks 18ba565ff8 compile-commands: Add AppleClang 2020-05-31 02:05:01 +02:00
Michael Fabian 'Xaymar' Dirks 58da85a255 compile-commands: Fix generation of include directories
For an unknown reason, multiple set() calls in a row with the same variable override previous attempts to set things, despite using the same variable. This completely breaks generated output as barely any include directories will be set.
2020-04-18 18:46:04 +02:00
Michael Fabian 'Xaymar' Dirks 4a7ca383b4 Adjust some error/warning messages and fix include directories 2020-04-18 16:38:31 +02:00
Michael Fabian 'Xaymar' Dirks 8746aa57ae clang-tidy: Compile Command Database generation and clang-tidy
Adds support for clang-tidy by the use of a manually generated compile command database. This is likely not full functional yet, so more tests might have to be done on different platforms and compilers.
2020-04-18 16:33:44 +02:00
Michael Fabian 'Xaymar' Dirks d2f9e32343 clang-format: Silence output from version check 2020-01-22 23:43:50 +01:00
Michael Fabian 'Xaymar' Dirks 9166c8a575 clang-format: Add version validation
Prevents corrupt or bad setups from suddenly failing by simply checking if the version is compatible.
2020-01-22 11:02:51 +01:00
Michael Fabian 'Xaymar' Dirks d42910da18 Add CLANG_PATH configuration option 2020-01-21 10:11:08 +01:00
Michael Fabian 'Xaymar' Dirks ca73d01a6f Add clang-format support
# clang_format([DEPENDENCY] [GLOBAL] [REGEX "..."] TARGETS "..." ["..."])
Adds a clang-format call target for each of the specified targets, which optionally filters files using a special regex (defaults to .c, .cpp, .h, .hpp), with an optional global target, and an optional dependency addition to ensure that formatting is applied before building any of the targets.

* DEPENDENCY: Add a dependency to each of the targets onto the clang-format target, to ensure that formatting is applied at build time.
* GLOBAL: Create a global target and add the clang-format target as a dependency to it.
* REGEX "...": Filter file by a custom regular expression instead of the default filter. Must be a regular expression.
* TARGETS "...": Specifies the targets that clang-format is used for.
2020-01-19 11:41:12 +01:00