Commit Graph

306 Commits

Author SHA1 Message Date
Dylan Baker e182dba61f dependencies/base: Set PKG_CONFIG_SYSROOT_DIR from cross file
In some cases it may be necessary to set PKG_CONFIG_SYSROOT_DIR, like
when you've mounted a host architecture system in an arbitrary path.
Meson will now check the cross files for a [properties]:sys_root
variable and set the PKG_CONFIG_SYSROOT_DIR environment variable based
on that variable.

Fixes #3801
Fixes #4057
2019-06-26 23:28:33 +03:00
Dylan Baker e2039da5d9 Split attribute visibility
* c_function_attributes: remove 'protected' from 'visibility'

This doesn't exist on macos with the apple compiler, which always causes
failures.

Fixes #5530

* compilers: Add split visibility checks to has_function_attribute

These check for a single visibility at a time, rather than all four at
once. This allows for finer grained searches, and should make using
these checks safer across operating systems.
2019-06-25 00:02:26 +03:00
Michael Hirsch, Ph.D 40a3a6c3d0 only --only option to run_project_tests, add type hints, improve variable name use 2019-06-23 18:22:43 +03:00
Jussi Pakkanen 5ecab57667 Update things for new release. 2019-06-16 22:03:29 +03:00
Dylan Baker 15ab1f64f9 modules/python: add a modules keyword argument
This mirrors the modules keyword argument that some dependencies (such
as qt and llvm) take. This allows an easier method to determine if
modules are installed.
2019-06-12 14:13:20 +03:00
Daniel Mensinger 438ee6b01d
cmake: updated docs 2019-06-06 18:27:05 +02:00
Daniel Mensinger 6cb904de7b
cmake: Added docs 2019-06-06 18:27:03 +02:00
John Ericson af2d7af998 Per machine do 'build.' and '' option prefixes
See the docs/ changes for details.
2019-06-05 23:05:34 -04:00
Mathieu Duponchelle 12a82e763d interpreter: add fallback argument to subproject.get_variable() 2019-05-28 20:26:54 +03:00
Dylan Baker 0714ba58c7 coredata: add cmake_prefix_path option 2019-05-27 01:24:08 +03:00
Paolo Bonzini d894c48660 new module "sourceset" to match source file lists against configuration data
In QEMU a single set of source files is built against many different
configurations in order to generate many executable.  Each executable
includes a different but overlapping subset of the source files; some
of the files are compiled separately for each output, others are
compiled just once.

Using Makefiles, this is achieved with a complicated mechanism involving
a combination of non-recursive and recursive make; Meson can do better,
but because there are hundreds of such conditional rules, it's important
to keep meson.build files brief and easy to follow.  Therefore, this
commit adds a new module to satisfy this use case while preserving
Meson's declarative nature.

Configurations are mapped to a configuration_data object, and a new
"source set" object is used to store all the rules, and then retrieve
the desired set of sources together with their dependencies.

The test case shows how extract_objects can be used to satisfy both
cases, i.e. when the object files are shared across targets and when
they have to be separate.  In the real-world case, a project would use
two source set objects for the two cases and then do
"executable(..., sources: ... , objects: ...)".  The next commit
adds such an example.
2019-05-22 12:09:09 +02:00
Jussi Pakkanen e9bd7d49bd
Merge pull request #5372 from dcbaker/get_variable
Dependency.get_variable method
2019-05-21 21:57:05 +03:00
Jussi Pakkanen 79d530e325 Generators can have extra target dependencies. Closes #4131. 2019-05-20 23:38:13 +03:00
Dylan Baker c890c947fa fixup! tests: Add test for Dependency.get_variable 2019-05-20 10:41:26 -07:00
Dylan Baker ffe2a678d5 docs: Add docs for Dependency.get_variable 2019-05-20 10:41:11 -07:00
Dylan Baker 523c7beefc docs/markdown: add snippet for intel-cl support 2019-05-13 11:22:31 -07:00
Daniel Eklöf c2ee82cc41 add support for "target_type: 'shared_module'" in build_target() 2019-05-09 22:43:10 +03:00
Michael Hirsch, Ph.D 06bfc2dab6 per-target manual specification of link_language 2019-05-02 23:26:51 +03:00
TheQwertiest 68a8481a05 Updated docs with information about `custom_target[i]` 2019-04-29 16:07:50 +03:00
Fernando Ramos d81dfcba74 Add support for the Xtensa toolchain
From (almost) all points of view, the Xtensa toolchain can be treated as
a regular GCC toolchain.

This patch adds very basic support so that, at least, meson does not
fail when trying to use "xt-xcc" (which makes it possible to use it
without problems).
2019-04-22 18:24:47 +03:00
Jussi Pakkanen 91654674f0
Merge pull request #5289 from mesonbuild/fixxpass
Report xpass results as failures.
2019-04-21 15:15:19 +03:00
Jussi Pakkanen dc2044c56d Report xpass results as failures. 2019-04-21 03:01:04 +03:00
Eli Schwartz f5bc0ab44a fix gpgme support by preferring pkg-config where possible
Since gpgme 1.13.0, pkg-config files are available and this is the
preferred way to detect the dependency. Without this, projects that wish
to generate pkg-config files that Requires.private on gpgme, now have
their custom dependency() fallbacks overridden with an incorrect
configtool dependency.
2019-04-15 11:09:49 -07:00
jrl64 a2d222c383 Update Built-in Option c_std for C17. Closes #4842. 2019-04-10 23:14:51 +03:00
Daniel Mensinger d72d98d3af mintro: removed deprecated --target-files API 2019-04-08 21:06:15 +03:00
Jussi Pakkanen 93f756ec25
Merge pull request #5176 from ao2/add-subproject-foreach-command
Add 'meson subprojects foreach' command
2019-04-08 20:42:03 +03:00
Jan Tojnar e8a688428d Add gpgme-config support
GPGME does not support pkg-config so we need config-tool support if
we do not want projects like Almanah and Seahorse to parse the values
manually.
2019-04-06 22:35:10 +03:00
Jussi Pakkanen 75219989ca
Merge pull request #5128 from Ericson2314/sanity-check-with-flags
Sanity check with external args
2019-04-02 00:40:05 +03:00
Antonio Ospite e680dbe065 Add 'meson subprojects foreach' command
Sometimes it is convenient to run an arbitrary command (e.g. 'git diff')
on all subprojects.

Add a 'meson subprojects foreach' command to take care of that.

For this command the common argument 'subprojects' does not make sense,
so only add '--sourcedir' and cover the case of a missing
options.subprojects in run().
2019-04-01 11:51:02 +02:00
Jussi Pakkanen 5905533fcd
Merge pull request #5103 from mesonbuild/linkcustom
Can link against custom targets
2019-04-01 01:29:51 +03:00
Jussi Pakkanen 2259db2683 Add documentation. 2019-03-28 23:11:30 +02:00
John Ericson 8c3d24e9de release note snippet for user flags in sanity checks [skip ci] 2019-03-27 10:54:56 -04:00
John Ericson b565eff084 Add release note snippit for CPPFLAGS handing [skip ci] 2019-03-27 14:45:42 +00:00
Dylan Baker d88bf0eb80 compilers: n_debug=if-release and buildtype=plain should not enable assertions
It's a bit odd that it doesn't, and has resulted in bugs in distro
packaging.

Fixes #5141
2019-03-26 22:17:27 +02:00
Jussi Pakkanen ed5992a10d
Merge pull request #5031 from bonzini/kconfig
Kconfig Module
2019-03-20 22:03:47 +02:00
Ross Burton 65e59c84a1 mesonbuild: allow multiple --cross-file options
Just like --native-file, allow multiple --cross-file options.  This is mostly
unifying the logic between cross_files and config_files.
2019-03-20 10:06:17 +00:00
Mark Schulte 647bd2839e [modules] Add kconfig module
Add a kconfig module to allow meson to integrate with existing projects
that use kconfig.
2019-03-15 11:42:36 +01:00
Michael Hirsch, Ph.D e491792a95
docs 2019-03-14 02:04:25 -04:00
Niklas Claesson dd2c44cdf6 Add static as keyword to find_library 2019-03-11 20:56:52 +02:00
Jussi Pakkanen 9f48f5fe94 Update everything for new release. 2019-03-10 19:25:09 +02:00
Dylan Baker e42e19702c docs: Add snippet for python module path method [skip ci]
Which somehow wasn't included in the original pull request.
2019-03-09 19:01:57 +02:00
Daniel Mensinger d4fe805a51
rewriter: Added docs 2019-03-04 13:00:06 +01:00
Daniel Mensinger 7074f12644
mintro: Renamed --dependencies --> --scan-dependencies 2019-03-03 23:19:04 +01:00
Daniel Mensinger f29f854861
Added docs 2019-03-03 23:19:03 +01:00
Daniel Schulte f0b0bcf86d mintro: Add subproject_dir to --projectinfo 2019-03-01 23:40:33 +02:00
Daniel Schulte 924cf5e622 mintro: Add name of subproject the target is contained in to --target output 2019-03-01 22:29:52 +02:00
Michael Hirsch, Ph.D 71cffa67fa add NetCDF 2019-02-28 22:13:38 +02:00
Maarten ter Huurne 37a962e90c Allow File arguments in extract_objects() arguments
Passed strings are converted to Files, but passing a File directly
wasn't supported yet.
2019-02-19 10:02:30 -05:00
jml1795 a9e63568fe Add warning level zero 2019-02-19 00:06:27 +02:00
jml1795 80f16cac8f Fix console log from generator with multiple output nodes 2019-02-18 22:02:15 +02:00
Michael Hirsch, Ph.D ebfb09f5d6 Fortran 2008/2018 Coarray support 2019-02-13 21:09:18 +02:00
Jussi Pakkanen 82e4cb7731
Merge pull request #4743 from dcbaker/native-file-extended
Extend native files to store install path information
2019-02-12 20:04:23 +02:00
Jussi Pakkanen a32f31fdfa
Merge pull request #4826 from mensinda/confDefOpts
mconf: Use introspection to print the project default options (fixes #2543)
2019-02-12 20:00:34 +02:00
Dylan Baker b5d847e38c allow paths to be set in the cross file
Just like the previous patch, but for cross files

Fixes #1433
2019-02-11 12:50:32 -08:00
Dylan Baker 5b896ed70b allow setting directory locations in a native file
This allows the person running configure (either a developer, user, or
distro maintainer) to keep a configuration of where various kinds of
files should end up.
2019-02-11 12:50:32 -08:00
Michael Hirsch, Ph.D 70e6f4198c Fortran 2008 submodule (#4874) 2019-02-05 22:41:44 +01:00
Daniel Mensinger e1a83793ae CMake: Added support for CMAKE_MODULE_PATH and extra CMake args (closes #4779) 2019-02-01 00:25:21 +02:00
Michael Hirsch, Ph.D 1ebaeadf60
initial HDF5 pkg-config fortran works 2019-01-30 06:38:29 -05:00
Jan Tojnar 33d82201bd run_command: add env kwarg 2019-01-27 19:24:15 +02:00
Daniel Mensinger 90bc125d29
mconf: Use introspection to print the project default options (fixes #2543) 2019-01-25 12:21:32 +01:00
Daniel Mensinger ded59c0819 Fixed spelling [skip ci] 2019-01-24 23:03:05 +02:00
Jussi Pakkanen 43147c2594 Add release note snippet. 2019-01-22 00:02:25 +02:00
Michael Hirsch, Ph.D 72486afd08 Add PGI C and C++ compilers (#4803) 2019-01-21 20:09:36 +02:00
Michael Hirsch, Ph.D 5c00751515
doc 2019-01-17 15:12:02 -05:00
Daniel Mensinger 609ecba37f mintro: Added `defined_in` key in the targets introspection 2019-01-15 20:28:12 +02:00
Daniel Mensinger 5c139032b8
Deprecated --target-files API 2019-01-07 22:35:56 +01:00
Daniel Mensinger 1c92b7d225
Added release snippet 2019-01-07 22:26:09 +01:00
Daniel Mensinger 7ec609425a Added release snippet 2019-01-06 22:03:40 +01:00
Daniel Mensinger 52071c6d4e
Fixed missing dots [skip ci] 2019-01-06 12:19:35 +01:00
Daniel Mensinger 0b0ec5895c
Fixed typo [skip ci] 2019-01-06 12:19:35 +01:00
Daniel Mensinger bcb8146280
Indent flag only toggles 2019-01-06 12:19:35 +01:00
Daniel Mensinger bd8bad46c3
Code cleanup and renamed variables 2019-01-06 12:19:33 +01:00
textshell 248adbab9a
Update docs/markdown/snippets/introspect_multiple.md
Co-Authored-By: mensinda <daniel@mensinger-ka.de>
2019-01-06 12:19:33 +01:00
Daniel Mensinger 02734cc5c3
Better documentation 2019-01-06 12:19:31 +01:00
Daniel Mensinger 84948ea6cd
Renamed `--force-new` to `--force-dict-output` 2019-01-06 12:19:31 +01:00
Daniel Mensinger 2e81631d0c
Keep 'filename' and 'install_filename' as strings 2019-01-06 12:19:31 +01:00
textshell c1838d9e4c
Update docs/markdown/snippets/introspect_multiple.md
Co-Authored-By: mensinda <daniel@mensinger-ka.de>
2019-01-06 12:19:30 +01:00
textshell eb2cc9eccd
Update docs/markdown/snippets/introspect_multiple.md
Co-Authored-By: mensinda <daniel@mensinger-ka.de>
2019-01-06 12:19:30 +01:00
Daniel Mensinger b9c4913cf0
Updated documentation 2019-01-06 12:19:30 +01:00
Daniel Mensinger b11df88395
Documentation and unit test update 2019-01-06 12:19:29 +01:00
Daniel Mensinger b034f52656
Filenames are now lists 2019-01-06 12:19:29 +01:00
Daniel Mensinger b91c5aad85
Update intro dump on meson configure 2019-01-06 12:19:29 +01:00
Daniel Mensinger 8288555aa1
mintro: Added option to introspect multiple parameters at once 2019-01-06 12:15:10 +01:00
Daniel Mensinger 80ee0f85f9
Added release snippet 2019-01-06 12:15:09 +01:00
Jussi Pakkanen 3a6e2aeed9 Can use plain strings for include_directories. 2019-01-02 22:29:08 +02:00
Daniel Mensinger e5099357c2
Tests and docs 2018-12-29 23:56:21 +01:00
Jussi Pakkanen da5da5977a Default libdir is "lib" when cross compiling. Closes #2535. 2018-12-30 00:51:19 +02:00
Jussi Pakkanen 1fca654055 Add a clang-format target. 2018-12-30 00:50:00 +02:00
Xavier Claessens b6cede2928 find_library: Add 'has_headers' kwarg
A library without its headers is often useless, so it is common to check
them together.
2018-12-27 23:06:28 -05:00
Jussi Pakkanen 4df9006ca4 Can specify a string to print when dep not found. Closes #2407. 2018-12-22 19:00:40 +02:00
Jussi Pakkanen 51aaa15bda Update everything for release 0.49.0 2018-12-09 21:58:12 +02:00
Nirbheek Chauhan 5f8aedfa8b
Fix typos in kwargdict snippet [skip ci] 2018-12-05 08:20:09 +05:30
Jussi Pakkanen 58b838a80b Can specify keyword arguments with a dict. 2018-12-04 23:44:17 +02:00
Xavier Claessens 8612f1543f pkgconfig: Improve and document generator behaviour
- Add libraries from InternalDependency.libraries
- Deprecate association of libraries from the "libraries" keyword
argument to the generated pkg-config file.
2018-12-04 06:49:02 -05:00
Xavier Claessens 2efedf80e0 Add documentation for 'meson subprojects' command line 2018-12-02 08:37:32 -05:00
Daniel Schulte 0e62193730 mintro: Allow introspect --projectinfo without build directory.
This variant was added to allow introspection before configuring a build
directory. This is useful for IDE integration to allow displaying and/or
setting options for the initial configuration of the build directory.

It also allows showing basic information about the project even if it's
not yet configured or configuring failed.

The project 'name' field in --projectinfo is used inconsistently:
For the top level project it always shows the name configured in
the top level meson.build file. For subprojects it's referring to the
name of the directory the subproject's meson.build is contained in.

To have a consistent output and preserve the existing behavior this adds
the 'descriptive_name' field which always shows the name set in the
project.

To be consistent the 'descriptive_name' field was also added to the
--projectfiles variant that uses an already configured build.

It also extends the information shown with the list of buildsystem-files.
This is currently only implemented in the variant for unconfigured
projects.
2018-11-26 23:12:00 +01:00
Daniel Mensinger ceb5e9f042
Updated docs [skip ci] 2018-11-24 11:19:13 +01:00
Daniel Mensinger a0175ecb14 CMake find_package dependency backend (#4444) 2018-11-22 22:30:12 +02:00
Dylan Baker 0ab27add49 docs: Add documentation for Native Files 2018-11-14 15:57:37 -08:00
Stian Selnes 0821462ce3 Add kwarg is_default to add_test_setup()
is_default may be used to set the name of the test setup that will be
used by default whenever the option --setup is not given.

Fixes #4430
2018-11-12 16:23:59 +05:30