Matthias Klumpp
56823272ab
Implement D support
...
This patch adds support for the D programming language[1] to Meson.
The following compilers are supported:
* LDC
* GDC
* DMD
[1]: http://dlang.org/
8 years ago
Nirbheek Chauhan
a5e01fa155
Only append compile flags to the link flags when appropriate
...
We should only append the compiler flags to the link flags when the
compiler is used as a wrapper around the linker during the link process
8 years ago
Jussi Pakkanen
d90fcb4048
Created ternary operator. Closes #538 .
8 years ago
Nirbheek Chauhan
58ad092ff3
interpreter: Print what subproject dir could not be found
...
Fixes #655
8 years ago
Jussi Pakkanen
4a92b78e6e
A few error message fixes.
8 years ago
Nirbheek Chauhan
1459d18643
dependency: Better errors when fallbacks are not found
...
Otherwise the message is very cryptic and no one can figure out what Meson
actually wants
8 years ago
Nirbheek Chauhan
88aafd363e
Normalize the path of a configured file to avoid dupes ( #640 )
8 years ago
Nirbheek Chauhan
7217620e23
interpretor: Use the stdout/stderr locale to decode to string ( #638 )
...
Fixes a decode error with locales other than en_US on Windows
8 years ago
Jussi Pakkanen
c0057da133
Can get arbitrary data from cross file properties.
9 years ago
Jussi Pakkanen
0733c0f9a1
Changed run_target to take command as kwarg and add depends. This makes it behave the same as custom_target.
9 years ago
Jussi Pakkanen
ea4fe8e417
Run_target can run binaries obtained with find_program.
9 years ago
Nirbheek Chauhan
fe52feb47d
dependency: Fix version check for a not-found dependency
...
The check was wrong, and we were passing 'none' as the 'found' version
to the version compare if the cached dep was a not-found dependency
9 years ago
Nirbheek Chauhan
9e5a2c5e26
Use add_target() for adding targets returned from module functions
...
Without this, the target isn't added to self.coredata.target_guids and
the VS backends fail to parse the list of targets
9 years ago
Nirbheek Chauhan
abf81aab77
Use cross-info c_args, c_link_args, etc for all compiler checks
...
This allows the user to specify custom arguments to the compiler to be used
while performing cross-compiler checks. For example, passing a GCC specs file as
c_link_args so that a "prefix" filled with libraries that are to be compiled
against can be found with cc.find_library, or an `-mcpu` c_arg that is required
for compilation.
Also ensure that unix_link_flags_to_native() and unix_compile_flags_to_native()
always return a copy of the original arguments and not a reference to the
original arguments. We never want to modify the original arguments.
9 years ago
Martin Hostettler
4979b4c84f
compiler: Use cross tools args in sanity check.
9 years ago
Jussi Pakkanen
beef7cb291
Added functionality to pick the first supported argument from a list. Closes #583 .
9 years ago
Jussi Pakkanen
d8d989d9b8
Add a has_arg method to compiler to check whether it supports a given argument.
9 years ago
Jussi Pakkanen
177e286b3c
Can generate config headers without an input file. Closes #549 .
9 years ago
Jussi Pakkanen
144565fabf
Added method to get current project name.
9 years ago
Nirbheek Chauhan
8c34ea645d
interpreter: Compare the version of a cached dependency() before using it
...
Without this, checks with incompatible versions but the same library would
return true. Example:
dependency('zlib', version : '>=1.2')
dependency('zlib', version : '<1.0') # this will return the same dep again!
Example: https://github.com/mesonbuild/meson/issues/568
9 years ago
Nirbheek Chauhan
0096c51035
interpretor: Correctly check the version of a fallback dependency
...
Previously the check was always done with the project version--which is wrong.
It should always check against the version of the dependency requested.
9 years ago
Nirbheek Chauhan
acdd4bd523
interpreter: Set declare_dependency version from the project version if missing
...
This simply sets the default version to be the same as the project version.
Useful for dependency version checks when using fallback subproject internal
dependencies.
9 years ago
Nirbheek Chauhan
c33e7a68a1
Also reuse subproject-based fallback dependencies
...
This allows a project to use the same fallbacks dependency from the same
subproject multiple times in the same way that external dependencies can be.
Also change the format of the dependency identifier to ensure that fallback
checks with different dirname/varname aren't mistakenly reused. We now use
a tuple for this because the format is simpler to construct and it gives us the
same immutability guarantees as a string which is needed for using it as
a dictionary key.
9 years ago
Nirbheek Chauhan
f2256ba098
interpreter: Check if subproject version is defined before comparing
...
Without this Meson gives a cryptic error emitted from inside
mesonlib.version_compare()
9 years ago
Nirbheek Chauhan
065dcee7f3
interpreter: Switch to prev_subdir on non-existant subdir ( #571 )
9 years ago
Jussi Pakkanen
cff4e7d299
Can query version strings of dependencies.
9 years ago
Jussi Pakkanen
b5013a573a
Added semantic versioning comparison method to strings.
9 years ago
Jussi Pakkanen
28b555d2c8
Whitespace fix to test new Docker setup.
9 years ago
Jussi Pakkanen
7694321276
Renamed compile&link args and made them accessible from get_option.
9 years ago
Jussi Pakkanen
4377f773e0
Can set global linker arguments. Closes #536 .
9 years ago
Jussi Pakkanen
ac152a2282
Every target must have a non-empty name.
9 years ago
Jussi Pakkanen
3b3c05f6b1
Can pass extra args to xgettext. Closes #554 .
9 years ago
Jussi Pakkanen
2a3a1ce8e0
Join() convenience method for strings. Closes #552 .
9 years ago
Nirbheek Chauhan
7aad3ff658
interpretor: Fix typo in has_exe_wrapper
...
The function wasn't working at all because of this
9 years ago
Jussi Pakkanen
afe7252476
Can specify a stdlib subproject that is used implicitly on all targets with said language.
9 years ago
Jussi Pakkanen
dc148e0702
Remove all special casing for gettext and use elementary operations instead.
9 years ago
Hemmo Nieminen
7da51f3756
Do not append a period to test suite names.
9 years ago
Nirbheek Chauhan
2bdaa1f0c1
Separate out cpu_method to environment.py and add amd64 quirk
9 years ago
Nirbheek Chauhan
c0765b0e8d
Don't require an exe_wrapper when cross-compiling 32-bit on 64-bit
...
Almost all 64-bit x86 OSes can run 32-bit x86 binaries natively. Detect
that case and don't require an exe wrapper.
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
737fde65fa
Bring back the old manual search to cc.find_library.
9 years ago
Hemmo Nieminen
af6f4c9b9c
coredata: Centralize builtin option descriptions and definitions.
9 years ago
Hemmo Nieminen
336904b553
Move MesonException from coredata to mesonlib.
9 years ago
Jussi Pakkanen
12a4e7d7e7
Moved gettext into i18n module.
9 years ago
Jussi Pakkanen
8b619420f9
Open Meson and option files explicitly as utf-8. Closes #467 .
9 years ago
Jussi Pakkanen
a405f7a499
Grab base options from the command line.
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
Jussi Pakkanen
8b6848ebc3
Add dir support for find_library and remove deprecated standalone version. Closes #450 .
9 years ago
Jussi Pakkanen
19046fd854
Added new base options and some sample opts for gcc.
9 years ago