aboutsummaryrefslogtreecommitdiff
path: root/docs
AgeCommit message (Collapse)AuthorFilesLines
2023-09-25Add clang-tidy-fix targetLei YU1-0/+9
Add the `clang-tidy-fix` target to apply clang-tidy fixes to the source code. This is done by calling `run-clang-tidy` with `-fix` argument. Add a test case to run `clang-tidy-fix` and verify the file is changed. Signed-off-by: Lei YU <yulei.sh@bytedance.com>
2023-09-22Allow to fallback to cmake subprojectXavier Claessens2-0/+36
The method can be overridden by setting the `method` key in the wrap file and always defaults to 'meson'. cmake.subproject() is still needed in case specific cmake options need to be passed. This also makes it easier to extend to other methods in the future e.g. cargo.
2023-09-22CPU family support 'sw_64' and remove the compile warning (#12273)Kunwu.Chan1-0/+2
add sw_64 to the list of known cpus
2023-09-19docs: fix `add_project_link_arguments` documentationBenoit Pierre1-3/+3
It should refer to `add_project_arguments`, not `add_global_arguments`.
2023-09-19Rust: Replace rust_crate_type with rust_abiXavier Claessens6-0/+51
Meson already knows if it's a shared or static library, user only need to specify the ABI (Rust or C).
2023-09-19Rust: Add a rust.proc_macro() methodDylan Baker1-0/+29
2023-09-18fix linksyyyyyiiiiii1-2/+2
Wayland, Weston, wlroots migrated to gitlab.freedesktop.org
2023-09-18Update link to lcovEberhard Beilharz1-1/+1
lcov moved from sourceforge to github, so this change updates the link.
2023-09-15reference tables: Document how to set compiler paths with spaces in ↵L. E. Segovia1-0/+20
environment variables See #11128
2023-09-13install_{data,headers,subdir}: implement follow_symlinksArsen Arsenović4-0/+31
This permits users who rely on following symlinks to stay on the old default of following them.
2023-09-11raw printerCharles Brunet1-1/+1
this printer preserves all whitespaces and comments in original meson.build file. It will be useful for rewrite and potential auto-formatter
2023-09-09gnome.mkenum_simple(): Fix include path when header is in subdirXavier Claessens1-0/+7
It was generating #include with the basename of every header file. That assumes that every directory where there are headers are also included into search path when compiling the .c file. Change to use path relative to current subdir, which can be both in build or source directory. That means that we assume that when the .c file is compiled, the target has a include_directories pointing to the directory where gnome.mkenum_simple() has been called, which is generally '.' and added automatically. Also fix type annotation to only allow str and File sources, other types have never been working, it would require to iterate over custom target outputs, etc. Fixes: #7582
2023-09-09Add support for padding zeroes in int.to_string() methodNomura2-0/+32
2023-09-09Add macro_name option to configure_fileNicholas Vinson2-0/+13
Allow macro_name to be speficied as a parameter to configure_file(). This allows C macro-style include guards to be added to configure_file()'s output when a template file is not given. This change simplifies the creation of configure files that define macros with dynamic names and want the C-style include guards.
2023-09-09clike compilers: fix cross_* functions' includeMoody Liu2-2/+26
A standard C library may not exist for cross-compile environments, thus the existence of <stdio.h> cannot be guaranteed. Use <stddef.h> instead, this header contains compiler-specific defines thus it usually comes from the compiler.
2023-09-07docs: refman: add vim syntax file generatorLiam Beguin3-1/+143
Signed-off-by: Liam Beguin <liambeguin@gmail.com>
2023-09-07Add compiler.has_defineMarvin Scholz2-0/+21
Adds a new method to the compiler object, has_define. This makes it possible to check if a preprocessor macro/define is set or not. This is especially helpful if the define in question is empty, for example: #define MESON_EMPTY_DEFINE This would yield the same results as a missing define with the existing get_define method, as it would return an empty string for both cases. Therefore this additional method is needed.
2023-09-05wrap: Use MESON_PACKAGE_CACHE_DIR as default packagecache pathXavier Claessens2-0/+13
Allow packagecache to contain already extracted directory to match what some distro does with Cargo source packages in /usr/share/cargo/registry. Note that there is no need to lock the cache directory because we download into a temporary name and atomically rename afterward. It means we could be downloading the same file twice, but at least integrity is guaranteed. Fixes: #12211
2023-09-04Adding Meson-UI back on IDE-integration.mdMichael Gene Brockus (Dreamer)1-0/+1
2023-09-04Add trilo xtest to usersMichael Gene Brockus (Dreamer)1-0/+1
2023-08-31add json output format to configure fileCharles Brunet2-1/+6
2023-08-31Document that dicts can be indexed with []Bruce Merry1-0/+9
2023-08-31Doc: fix type signature for add_languages.requiredBruce Merry1-1/+1
It was listed as `bool`, but it can be a `feature` too.
2023-08-30Merge pull request #10332 from xclaesse/std-optJussi Pakkanen2-0/+33
c_std, cpp_std: Change to a list of desired versions in preference order
2023-08-28Add CUDA id and flags to reference tablesBruce Merry1-0/+3
2023-08-27FAQ: MinGW UCRT are compatible with MSVC and also use libfoo.aXavier Claessens1-0/+3
Prior to Windows 10, libfoo.a were usually not usable with MSVC. This is not true any more since Autotools projects built with UCRT produce libfoo.a that are compatible with MSVC. This is another reason for using that naming convention in Meson.
2023-08-25msetup: Update options when builddir is already configuredXavier Claessens2-0/+24
`meson setup -Dfoo=bar builddir` command was returning success ignoring new option values. This now also update options. It is useful because it means `meson setup -Dfoo=bar builddir && ninja -C builddir` works regardless whether builddir already exists or not, and when done in a script, changing options in the script will automatically trigger a reconfigure if needed. This was already possible by always passing --reconfigure argument, but that triggers a reconfigure even when options did not change.
2023-08-23machine file: Add @GLOBAL_SOURCE_ROOT@ and @DIRNAME@Xavier Claessens2-0/+25
2023-08-18docs: use future annotations for genrefman types in typing_extensionsEli Schwartz2-67/+71
And in fact *use* typing_extensions, which is sometimes the only way to get access to TypedDict. Mostly, reindent almost but not quite an entire file to only define annotation classes under TYPE_CHECKING.
2023-08-18Revert "Revert "Add fs.relative_to()""Tristan Partin2-0/+31
This reverts commit 84c8905d527893bedc673e8a036b8b2ec89368b4. Fixed the cygwin failure...
2023-08-18Add more descriptive description to CustomTargetCharles Brunet1-0/+6
Allow modules using CustomTarget to modify the command description used by ninja backend. This result in more precise logs when building a project.
2023-08-18docs: Provide example for feature.disable_auto_ifJan Janssen1-0/+14
2023-08-17Revert "Add fs.relative_to()"Eli Schwartz2-31/+0
This reverts commit f52bcaa27fc125ab9ae583af466ba99c164169f3. It did not pass CI, and was merged anyway because there were two CI errors in the same cygwin job. The other error was not the fault of this commit, and since cygwin errors were glossed over because they were "expected", the presence of a new error *added* by this commit was overlooked. Per the meson development policy, PRs which result in CI errors can/should be reverted at will, no questions asked.
2023-08-17fix style errors in fs.relative_to implementationEli Schwartz1-1/+1
In commit f52bcaa27fc125ab9ae583af466ba99c164169f3 a few issues were added: - doc typo - imports for utils.universal are not intended to be directly used, it's an internal wrapper that exists solely to make mesonlib work well as it always did while simultaneously allowing `meson --internal` codepaths to avoid importing anything other than an extremely stripped down core - type annotation specific import was imported at runtime scope
2023-08-17Add fs.relative_to()Tristan Partin2-0/+31
Returns a relative path from arg 2 to arg 1 similar to os.path.relpath().
2023-08-17Replace deprecated GTK flagCharlie Ringström1-1/+1
2023-08-16Fix some random capitalization in feature.yamlTristan Partin1-3/+3
2023-08-14Python: Add 'limited_api' kwarg to extension_moduleAndrew McNulty3-6/+21
This commit adds a new keyword arg to extension_module() that enables a user to target the Python Limited API, declaring the version of the limited API that they wish to target. Two new unittests have been added to test this functionality.
2023-08-11docs: Add more feature truth tablesJan Janssen1-10/+28
These are much easier to understand at a glance than free-form text.
2023-08-07c_std, cpp_std: Change to a list of desired versions in preference orderXavier Claessens2-0/+33
Projects that prefer GNU C but can fallback to ISO C can now set for example `default_options: 'c_std=gnu11,c11'` and it will use gnu11 when available, fallback to c11 otherwise. It is an error only if none of the values are supported by the current compiler. This allows to deprecate gnuXX values from MSVC compiler, that means that `default_options: 'c_std=gnu11'` will now print warning with MSVC but still fallback to 'c11' value. No warning is printed if at least one of the values is valid, i.e. `default_options: 'c_std=gnu11,c11'`. In the future that deprecation warning will become an hard error because `c_std=gnu11` should mean GNU is required, for projects that cannot be built with MSVC for example.
2023-08-07Compiler: Add werror kwarg to compiles(), links() and run() methodsXavier Claessens2-0/+16
Fixes: #5399
2023-08-07docs: add missing punctuationSebastian Crane1-1/+1
2023-08-05fixup: since: 1.1.0 -> 1.3.0Milan Hauth1-1/+1
2023-08-05compiler: Add required keyword to has_* methodsXavier Claessens2-8/+54
add the "required" keyword to the functions has_function has_type has_member has_members has_argument has_multi_arguments has_link_argument has_multi_link_argument has_function_attribute Co-authored-by: Milan Hauth <milahu@gmail.com>
2023-08-04Add default_options argument to find_program()Nomura2-0/+14
2023-08-02Unify message(), format() and fstring formattingXavier Claessens2-0/+14
Share a common function to convert objects to display strings for consistency. While at it, also add support for formatting user options.
2023-08-02Fix syntax mistakes in two examplesVolker Weißmann2-2/+2
2023-08-02treewide: internally avoid deprecated machine file uses of "pkgconfig"Eli Schwartz1-3/+3
We support this in a machine file: ``` [binaries] pkgconfig = 'pkg-config' pkg-config = 'pkg-config' ``` and you can use either one, because internally we look up both. If you only set *one* of them, this plays awkwardly with setting $PKG_CONFIG, since we don't know which one you set in the machine file and the *other* one will be initialized from the environment instead. In commit 22df45a31981874310a78dde0df59a6a7c5ebb29 we changed program lookup of config-tool style dependencies to use the regular tool names and only fall back on the strange internal names. This affected the pkg-config class too. The result is that instead of preferring `pkgconfig =` followed by $PKG_CONFIG followed by `pkg-config =`, we inverted the lookup order. This is a good idea anyway, because now it behaves consistently with `find_program('pkg-config')`. Unfortunately, we documented the wrong name in a bunch of places, and also used the wrong name in various testsuite bits, which meant that if you set $PKG_CONFIG and then ran the testsuite, it would fail. Correct these references, because they are buggy. One test case expected to find_program() a native copy for convenience of testing against natively installed glib. Force it to resolve a native copy.
2023-08-01Fix typo in Cross-compilation.mdAlex Rao1-1/+1
2023-07-28ugh, fix typo in previous commitEli Schwartz1-1/+0