aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-09-11parser: preserve escape chars in stringsCharles Brunet13-49/+74
use separate Node for multiline strings
2023-09-11parser: remove useless __str__ methods on nodesCharles Brunet1-8/+4
2023-09-11parser: preserve number baseCharles Brunet3-4/+12
2023-09-11parser: more specific error for float numbersCharles Brunet1-0/+3
2023-09-11Add ParenthesizedNodeJCWasmx864-1/+18
2023-09-10Recognise more include search path opts when populating ↵Dan Hawson1-40/+33
'NMakeIncludeSearchPath' to help intellisense Added to existing '/I' and '-I' extraction with '-isystem', '/clang:-isystem', '/imsvc', '/external:I', which are forms of 'system' header include search path options for gcc, clang, clang-cl, and cl (msvc). Factored 3 separate 'extract_...(...)' functions into one since they were always called together on the same args; a new combined '_extract_nmake_fields(...)' func avoids repeated iterations and checks.
2023-09-09gnome.mkenum_simple(): Fix include path when header is in subdirXavier Claessens6-9/+47
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() methodNomura4-5/+49
2023-09-09Add macro_name option to configure_fileNicholas Vinson7-6/+63
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 Liu3-5/+31
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-08dependencies: fix crash in Qt if private_headers dir not foundEli Schwartz1-1/+1
You cannot listdir() a directory that doesn't exist. This header directory may not exist if suitable devel packages in distros with split devel packages, aren't installed. In theory we could raise a suitable error here. But it would be inconsistent -- we don't otherwise validate that the Qt include directories exist, usually just assuming they do because the dependency was found. And this is niche code inside a non-default special kwarg. At least for pkg-config, it's probably a bug in the distro if pkg-config files exist but the headers don't. The qmake status is less clear. Avoiding a crash means that at the very least, if those headers are in fact directly used by the project, an obvious compiler error occurs instead of a noisy meson traceback. Fixes #12214
2023-09-08Override config-tool get_variable args for qmakeNirbheek Chauhan3-1/+10
2023-09-07Fix include_directories test for relative pathCharles Brunet4-3/+34
- On Windows, it was not detected if include directory was an absolute path to source directory, because of the mis of path separators. - In the edgecase the include directory begins with the exact same string as the source directory, but is a different directory, it was falsely reported as an error. Fixes #12217.
2023-09-07syntax-highlighting: vim: update builtin function listLiam Beguin3-24/+9
Update builtin function list using the refman python docs/genrefman.py \ -g vim \ -o data/syntax-highlighting/vim/syntax/ This also drops gettext() and find_library() from the list of builtin functions that have been deprecated since 2016. Changes are squashed here because test_vim_syntax_highlighting() would validate the file against the list of builtin functions that no longer matches the yaml documentation. Signed-off-by: Liam Beguin <liambeguin@gmail.com>
2023-09-07docs: refman: add vim syntax file generatorLiam Beguin3-1/+143
Signed-off-by: Liam Beguin <liambeguin@gmail.com>
2023-09-07gnome: Fix glib tool lookup consistencyXavier Claessens1-13/+31
It was not always using the pkg-config file.
2023-09-07Fix crash when installing a vala library and python sourcesXavier Claessens7-8/+21
Installing python sources causes the python module to call create_install_data() before Ninja backends adds extra outputs to Vala targets. Target objects are supposed to be immutable, adding outputs that late is totally wrong. Add extra vala outputs immediately, but be careful because the main output is only added later in post_init(). Luckily the base class already puts a placeholder item in self.outputs for the main filename so we can just replace self.outputs[0] instead of replacing the whole list which would contain vala outputs at that stage. This is surprisingly what SharedLibrary was already doing.
2023-09-07Compiler checks must use per-subproject optionsXavier Claessens2-1/+5
Fixes: #12202
2023-09-07Rename OptionOverrideProxy to OptionsView and move to coredataXavier Claessens4-58/+48
Coredata is where all option handling is done so it makes sense there. It is a view on a list of options for a given subproject and with optional overrides. This change prepare for using that view in a more generic way in the future.
2023-09-07Add compiler.has_defineMarvin Scholz5-49/+110
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-06Merge pull request #11422 from lukester1975/bash-completionJussi Pakkanen1-99/+269
Bash completion additions and fixes (fixes #9077)
2023-09-06completions: bash: don't show json errors when completing "meson test".Luke Elliott1-7/+24
E.g. "meson test<tab>" json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2023-09-06completions: bash: added "compile" (and "help") completion.Luke Elliott1-2/+63
2023-09-06completions: bash: fix -x<tab>.Luke Elliott1-48/+45
If x was a known short option, would complete to "-". If unknown, "--".
2023-09-06completions: bash: added a bunch of missing completion options.Luke Elliott1-42/+137
2023-09-06tests: Test extern'd globals on MacOS with the Apple ArchiverAilin Nemui5-0/+31
This forces the use of the Apple archiver, since that archiver doesn't add extern'd variables to the symbol table automatically, and instead requires that ranlib be used. A native file is used to ensure that Apple's ar is used even in the presence of llvm or gcc in the path with their superior archivers. Co-authored-by: Dylan Baker <dylan@pnwbakers.com>
2023-09-06backends/ninja: run `ranlib -c $out` when using the apple arDylan Baker2-1/+16
Apple's AR is old, and doesn't add externed symbols to the symbol table, instead relying on the user calling ranlib with -c. We need to do that for the user
2023-09-06qt module: add include_directories to moc compileCharles Brunet5-5/+20
Fixes #12182
2023-09-06qt module: fix substitution for depfile in mocCharles Brunet1-1/+1
2023-09-05wrap: Use MESON_PACKAGE_CACHE_DIR as default packagecache pathXavier Claessens9-2/+48
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-05wrap: Remove duplicated codeXavier Claessens1-12/+6
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-09-01tests: repeat the failure reason in the detailed logsEli Schwartz1-0/+3
2023-09-01tests: move a couple log files into collapsed github groups where possibleEli Schwartz1-8/+7
2023-09-01tests: move the newline to the right place in ci includesEli Schwartz1-3/+3
Make sure this is generic enough to be properly usable
2023-09-01tests: sync ninja stdout/stderr instead of listing them separatelyEli Schwartz1-2/+2
It is fairly confusing for all the "ninja explain" to be the last thing you see, instead of the compile error.
2023-09-01tests: make summary section for project tests more like pytestEli Schwartz1-5/+6
Logs for failing tests come first, then the list of pass/fail.
2023-09-01tests: make run_project_tests finish off the verbose logs with a summaryEli Schwartz1-0/+5
List each testcase name that failed so we can see at a glance which ones they are.
2023-09-01compilers: fix compiler detection when the "ccache" string is in the pathFilipe Laíns1-1/+1
Signed-off-by: Filipe Laíns <lains@riseup.net>
2023-08-31add json output format to configure fileCharles Brunet10-24/+121
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-30Re-enable "11 runpath rpath ldlibrarypath"Tristan Partin2-3/+1
The bug it was blocked on was fixed in a0514a7c4183a9e42d436865087d2f887d658d54.
2023-08-30Disable failing test on cygwin due to broken cmakeCharles Brunet1-1/+8
See https://gitlab.kitware.com/cmake/cmake/-/issues/25200.
2023-08-30ci: Skip gir test on cygwinXavier Claessens2-1/+7
2023-08-30Merge pull request #10332 from xclaesse/std-optJussi Pakkanen10-111/+240
c_std, cpp_std: Change to a list of desired versions in preference order
2023-08-29gnome: Fix crash in gtkdoc and generate_gir in C++ projectsXavier Claessens11-0/+85
gtkdoc() and generate_gir() methods assumes there is a C compiler, but pure C++ projects might not add it explicitly. Fixes: #12162
2023-08-28include_directories: Always add both source and build dirsXavier Claessens5-5/+17
Compiler checks were not adding build dir side, which prevents using headers generated with configure_file().
2023-08-28Add CUDA id and flags to reference tablesBruce Merry1-0/+3