Nirbheek Chauhan
7aa24c7d0a
compilers: Fix header stub change that broke has_function checks on Windows ( #559 )
...
Fixes https://github.com/mesonbuild/meson/issues/558
9 years ago
Jussi Pakkanen
2a3a1ce8e0
Join() convenience method for strings. Closes #552 .
9 years ago
Nirbheek Chauhan
0ac33b8857
tests/common/43: Better, more descriptive error messages
9 years ago
Jussi Pakkanen
48e678db76
Strip leading source tree dir name from install files if it exists.
9 years ago
Tim-Philipp Müller
1934ddfc5b
Improve cc.has_function() check to not require any includes and detect stubs
...
We now use .links() to detect if a C compiler function is available
or not, that way the user doesn't need to specify all the possible
includes for the check, which simplifies things considerably.
Also detect glibc stub functions that will never work and return
false for them.
Closes #437
9 years ago
Nirbheek Chauhan
700010e452
New API: cc.has_header_symbol to check if a header defines a specific symbol
...
Also supports a 'prefix' keyword argument for feature checks such as _GNU_SOURCE
or for headers that need to be included first
9 years ago
Jussi Pakkanen
26f647d728
And private libraries.
9 years ago
Jussi Pakkanen
c0c9a96c36
Can set requires manually into generated pc files.
9 years ago
Nicolas Schneider
3de7c34714
add test for extracting two objects with the same source file name
9 years ago
Tim-Philipp Müller
3eea1703ff
Add bool to_string() and to_int() methods
...
bool to_int() will return 0 or 1, useful if one wants to set
a define to 0 or 1 based on a boolean result instead of having
it just defined or undefined.
bool to_string() will return 'true' or 'false' by default same
as when using it to format a string, but with the additional
possibility to specify two extra string arguments to be returned
as true/false values, e.g. to_string('yes', 'no'). This can be
useful when outputting messages to be shown to the user.
9 years ago
Tim-Philipp Müller
fcbd60c291
Add += support for strings and integers
9 years ago
Nicolas Schneider
246d9f4564
test24: check that a target extra_arg is not applied to other targets
9 years ago
Jussi Pakkanen
f3e20b2570
Use assert instead of if/error.
9 years ago
Nicolas Schneider
5482a23936
enhance test framework to read meson arguments from a file per test
...
A 'test_args.txt' file in the same directory as the test case will be
parsed by the test framework and the content will be passed as arguments
to meson during configuration. The arguments are put before any
'extra_args' to make them overwritable from the command line.
9 years ago
Tim-Philipp Müller
3c8468cd4d
Add string underscorify() function
...
So we can easily construct the defines for include headers and
struct checks and such.
9 years ago
Tim-Philipp Müller
02e84df010
Add more string functions: contains(), to_upper() and to_lower()
9 years ago
Nicolas Schneider
ed1732d9c4
fix test error message
9 years ago
Nicolas Schneider
749aeefe0c
pass meson source and build dirs as env variables for postconf scripts
9 years ago
Nicolas Schneider
5e1fdb8b97
use positional instead of keyword args for add_postconf_script
9 years ago
Nicolas Schneider
9f9f73fa52
add args support for add_postconf_script
9 years ago
Nicolas Schneider
92187501ed
Can add postconfigure script.
9 years ago
Jussi Pakkanen
52b66edb6c
Can specify compile and link args for internal deps.
9 years ago
Jussi Pakkanen
2d32c39471
Handle built targets in custom rules. Closes #411 .
9 years ago
Nicolas Schneider
6de2fd6ab5
vs2010: fix target_to_build_root method
...
Python's os.path.split() does not split the path into its components.
Instead, split the path with str.split() using the OS's file system
separator.
9 years ago
Nicolas Schneider
1196532c0b
fix 'object generator' test case for ninja
...
The ninja backend uses the '/MDd' switch when the tests are run, which
results in LNK4098 error, because the generator does not use the same
version of the Windows runtime library.
9 years ago
Jussi Pakkanen
e96359df70
Only support Python 3.
9 years ago
Nirbheek Chauhan
fabb49773e
Add a test for getting the path of a found program
9 years ago
Jussi Pakkanen
8cd3c8124a
Can add languages only if they are available. Closes #365 .
9 years ago
Jussi Pakkanen
4cd671e69e
More comparison operators. Closes #363 .
9 years ago
Jussi Pakkanen
0c96dbff3a
String to int conversion. Closes #362 .
9 years ago
Jussi Pakkanen
b91134b806
Better error message when failing to run install script. Closes #361 .
9 years ago
Jussi Pakkanen
670d0ed929
Print output of failed tests. Closes ##347.
9 years ago
Jussi Pakkanen
edaf663ee2
By default do not specify language version but instead use the compiler's default.
9 years ago
Jussi Pakkanen
6830f3e147
Forbid backslashes on compiler command lines. It is unfortunately the only reliable way.
9 years ago
Jussi Pakkanen
f1bf87ec8a
Added test to check that backslashes are passed properly through the pipeline.
9 years ago
Jussi Pakkanen
ec0a73b1e2
Fix manygen to work with msvc.
9 years ago
Jussi Pakkanen
9bf641e545
Fix path generation so generations in subdirs work.
9 years ago
Jussi Pakkanen
7e1df7540d
Handle custom targets that produce static libraries that are then linked to other targets.
9 years ago
Jussi Pakkanen
7cad8a1bfb
Fixed some tests for new stricter options and OSX.
9 years ago
Jussi Pakkanen
aa1fc44aca
Fixing threading problems by reordering lines at random. It is the only true way.
9 years ago
Jussi Pakkanen
489ca238c5
Test threads with both C and C++.
9 years ago
Jussi Pakkanen
6a5ec36aeb
Made thread test work on Windows.
9 years ago
Jussi Pakkanen
10acaffde7
Added explicit thread dependency.
9 years ago
Jussi Pakkanen
d64211f570
Moved pkg-config to a module so we no longer need special case code in core for it.
9 years ago
Jussi Pakkanen
b3d61beb2d
A test can be part of multiple suites.
9 years ago
Jussi Pakkanen
70695bead4
Added possibility to have multiple test suites so you can run only a subset of tests. Closes #325 .
9 years ago
Jussi Pakkanen
23c6de3461
Can specify a working directory for tests. Closes #326 .
9 years ago
Jussi Pakkanen
b167f3a56f
Renamed new test dir.
9 years ago
Jussi Pakkanen
913963d608
Can specify extra arguments to generator commands. Closes #315 .
9 years ago
Jussi Pakkanen
278339855d
Projects can specify a license which is written to the dep manifest.
9 years ago