Commit Graph

6226 Commits

Author SHA1 Message Date
Will Thompson 6a46ce4845 Builtin-options.md: fix "erros" typo [skip ci] 2018-09-13 06:33:03 -07:00
Martin Kelly e22b69bd17 Minor typo fix 2018-09-12 14:01:07 -04:00
Alexey Rochev 0667e8494c Qt: set QT_<MODULE>_LIB defines when using qmake detection 2018-09-11 20:22:37 +03:00
Nirbheek Chauhan 1af704a509 Sprinkle functools.lru_cache() in a few more places
This improves the backend generation time for gst-build from 7.4s to
6.6s. This is probably all the low-hanging fruit we can get, further
improvements will probably require refactoring, moving to pathlib.Path
or reimplementing CompilerArgs:

   222045    0.551    0.000    1.324    0.000 compilers.py:666(__iadd__)
     3691    0.230    0.000    0.885    0.000 ninjabackend.py:99(write)
   233560    0.441    0.000    0.701    0.000 posixpath.py:75(join)
      882    0.141    0.000    0.636    0.001 backends.py:509(generate_basic_compiler_args)
   256301    0.248    0.000    0.576    0.000 compilers.py:562(_can_dedup)
    37369    0.035    0.000    0.466    0.000 compilers.py:652(extend_direct)
    74650    0.067    0.000    0.431    0.000 compilers.py:641(append_direct)
   158153    0.089    0.000    0.405    0.000 ninjabackend.py:129(<lambda>)
      845    0.064    0.000    0.391    0.000 ninjabackend.py:279(get_target_generated_sources)
    58161    0.070    0.000    0.317    0.000 backends.py:217(get_target_generated_dir)
   216825    0.175    0.000    0.275    0.000 ninjabackend.py:48(ninja_quote)
      845    0.058    0.000    0.255    0.000 ninjabackend.py:2289(guess_external_link_dependencies)
      845    0.068    0.000    0.239    0.000 backends.py:793(get_custom_target_provided_libraries)
    52101    0.030    0.000    0.237    0.000 compilers.py:716(append)
  1319326    0.231    0.000    0.231    0.000 {built-in method builtins.isinstance}
  1189117    0.229    0.000    0.229    0.000 {method 'startswith' of 'str' objects}
     3235    0.102    0.000    0.228    0.000 compilers.py:614(to_native)

Note: there are 845 build targets.
2018-09-11 10:19:42 -07:00
grooveadelic d67ec95b50 Quick Guide add step for python3-pip install
On Deban, and assuming now on Ubuntu as well, pip3 is only available after installing the python3-pip package. For that case explicitly specified the package during the system installation.
2018-09-11 19:08:59 +03:00
Nirbheek Chauhan 1819dc851a
Document version when both_libraries() was added [skip ci] 2018-09-11 19:38:06 +05:30
Marcel Hollerbach 7ae3fbf88d mesonbuild: move subdir generation along link dep generation
The problem with the earlier position of the generation code was, that
the results could not be cached, because the list of all link_deps was
overall different. However, it shared a special kind of subsets with
other build build targets.

Generating the set of subdirs that are required for linking, alongside
with the link dependencies brings the possibility of caching this.
This reduces the buildting from 1 min. in efl down to 20 sec. And
reduces the amount of 30872534 calls down.

this saves ~40 sec.
2018-09-11 03:03:30 -07:00
Marcel Hollerbach c68460e2ee backends: save up the dylib generated names
this saves about 6 sec.
2018-09-11 03:03:30 -07:00
Marcel Hollerbach be1003a8e9 build: try to cache the result of the link deps
this safes in the efl meson build about 20 sec.
2018-09-11 03:03:30 -07:00
Jussi Pakkanen c486670e56 Skip some SDL tests when using an OSX framework version. 2018-09-10 13:06:30 -07:00
Jon Turney 654101414c Improve windows resource compiler executable selection
Always honour any windres setting in cross-file (we can't be compiling with
msvc, but this should apply when cross-compiling using gcc or clang)

Always honour WINDRES environment variable

Otherwise look for the resource compiler which is part of the same toolset
as the C or C++ compiler.

Add some commentary on why the conventions for compiled resource file
extensions differ between RC and windres

Also don't try to report non-existent path when we couldn't find the
resource compiler.
2018-09-10 21:03:41 +03:00
Jon Turney 39d87269b3 Add missing reporting of some methods tried to find the dependency
Make us report 'system' and 'framework' when we tried those methods to
locate the dependency.
2018-09-10 21:02:18 +03:00
Jon Turney 593de37474 Fix duplicate PKGCONFIG case in VulkanDependency
A mistake in 82bdf07a
2018-09-10 21:02:18 +03:00
Jon Turney 1768b09a12 Improve formatting of dependency details
Also use a more consistent format for qmake details, and adjust a test case
which relies on the specific output
2018-09-10 21:02:18 +03:00
Thibault Saunier bd26c71845 hotdoc: Make project_version mandatory as it should always have been 2018-09-10 21:01:01 +03:00
Thibault Saunier 1ace8d8985 hotdoc: Handle IncludeDirs to specify directories 2018-09-10 21:01:01 +03:00
Alexey Rochev 929fbb9353 Qt: add main argument to Qt dependency object to link with qtmain library on Windows (#2327) 2018-09-10 21:00:36 +03:00
Dylan Baker 51e9db370a Add method to check for C/C++ function attributes
It's fairly common on Linux and *BSD platforms to check for these
attributes existence, so it makes sense to me to have this checking
build into meson itself. Autotools also has a builtin for handling
these, and by building them in we can short circuit cases that we know
that these don't exist (MSVC).

Additionally this adds support for two common MSVC __declspec
attributes, dllimport and dllexport. This implements the declspec
version (even though GCC has an __attribute__ version that both it and
clang support), since GCC and Clang support the MSVC version as well.
Thus it seems reasonable to assume that most projects will use the
__declspec version over teh __attribute__ version.
2018-09-07 11:52:15 -07:00
Jussi Pakkanen 8ca463f9f1 Guard against the process redirecting stdout. Closes #3967. 2018-09-06 19:19:32 +03:00
Jussi Pakkanen 7e75451867 Try to kill processes even more thoroughly. Closes #4127. 2018-09-06 19:19:32 +03:00
Jussi Pakkanen f2bde320ad
Merge pull request #4132 from GoaLitiuM/d-manyfixes
D: Various improvements to argument translation
2018-09-06 19:18:43 +03:00
Jussi Pakkanen 68f669bd2b Condense test dirs. 2018-09-06 19:09:35 +03:00
GoaLitiuM 644809fe59 Make sure static library files are passed properly to the linker 2018-09-06 05:18:08 +03:00
GoaLitiuM 040dd03a7a Fix remaining soname and rpath issues on OSX 2018-09-06 05:18:08 +03:00
GoaLitiuM fd4c996a67 Remove translation of file paths
This would also pass all the source and object files to linker, which is not desirable.
2018-09-06 05:18:07 +03:00
GoaLitiuM d2483d4412 Refactor D argument translation function 2018-09-06 05:18:00 +03:00
GoaLitiuM 6e160995b0 Improve D link argument handling 2018-09-06 03:57:45 +03:00
GoaLitiuM 289c1bf919 D: Fix linking errors with static D libraries on Windows 2018-09-05 20:27:47 +03:00
GoaLitiuM a45be05a7e D: Fix dub dependency handling on Windows 2018-09-05 20:26:51 +03:00
GoaLitiuM 5240b26fb8 D: Use the documented syntax for various arguments 2018-09-05 20:26:11 +03:00
Xavier Claessens b3a35f92b4
Merge pull request #4006 from xclaesse/fatal-warnings
Add --fatal-meson-warnings command line option
2018-09-05 10:36:42 -04:00
Nirbheek Chauhan 226eaba369 Reference-manual: Clarify fallback dependency types [skip ci] 2018-09-04 22:50:17 -07:00
Nirbheek Chauhan 68cfe1bb52 Test + fix for not-found dependency fallback version comparison
Fixes:
meson.build:6:0: ERROR:  Uncomparable version string 'unknown'.

This was previously partially fixed in a8694f4b, which only fixed it
for cached fallback dependencies.
2018-09-04 22:50:17 -07:00
Jakub Wilk 73cbf4113a llvm: fix build flags with older llvm versions
Fix fallback code for older (<= 3.8) llvm versions to not be dependent
on readdir() order.

Fixes #4102
2018-09-04 22:46:01 -07:00
Xavier Claessens ef231d3edd Add --fatal-meson-warnings command line option
This makes any warning message printed by meson raise an exception,
intended to be used by CI and developpers to easily catch deprecation
warnings and other potential issues.
2018-09-04 09:01:39 -04:00
Corentin Noël b350c74386 i18n: add release note snippet 2018-09-03 22:34:22 -07:00
Corentin Noël 176af2c8c3 i18n: respect variable substitution for the target name when merging translations
Previously it wasn't possible to use twice @BASENAME@ as the targets would then be named @BASENAME@_merge
2018-09-03 22:34:22 -07:00
Jon Turney c54cd69015 Modernize Python3Dependency
Somehow I overlooked this class when adjusting everything else in c59ec874
et seq.

Update Python3Dependency so it has a _factory() method which returns a list
of constructors, depending on the method: kwarg, which integrates better
with the reporting in find_external_dependency()

This ensures the return of a PkgConfigDependency object, if the dependency
is found with pkgconfig, so we don't have to specifically implement
get_pkgconfig_variable() ourselves.
2018-09-03 21:59:10 -07:00
Rafael Ávila de Espíndola 07d2d88fa9 Allow override_find_program to use an executable.
With this it is now possible to do

foobar = executable('foobar', ...)
meson.override_find_program('foobar', foobar)

Which is convenient for a project like protobuf which produces both a
dependency and a tool. If protobuf is updated to use
override_find_program, it can be used as

protobuf_dep = dependency('protobuf', version : '>=3.3.1',
                          fallback : ['protobuf', 'protobuf_dep'])
protoc_prog = find_program('protoc')
2018-09-03 21:24:01 +03:00
Alexey Rochev 862019e6de Qt: Allow passing dependency objects to preprocess method (#3470, #3875) 2018-09-03 21:13:03 +03:00
Nirbheek Chauhan e7b25018c4 wrap: Redirect git's stdin to DEVNULL
Otherwise, git fiddles with the cmd.exe console's color behaviour and
disables it, which causes it to stop interpreting ANSI color codes
outputted by meson for colored output.

Effectively, as soon as any subproject is initialized, cmd.exe goes
nice coloured output to ugly raw ANSI codes.
2018-09-03 21:12:09 +03:00
Jussi Pakkanen fb2d2b6eab
Merge pull request #4114 from SoapGentoo/gtest-pkgconfig
GTest & GMock pkgconfig fallback
2018-09-03 21:11:44 +03:00
Luca Weiss da7a3d5331 Change ninja.exe download URL [skip ci] 2018-09-03 21:11:22 +03:00
Luca Weiss 9c55bda56e Update appveyor example [skip ci]
Also add, how to make meson find Qt5 & Boost
2018-09-03 21:11:22 +03:00
Jussi Pakkanen 9bcd498a2f
Merge pull request #4084 from FFY00/pr-fix-dub-dependencies
dub: enhance dependency handling
2018-09-03 19:30:52 +03:00
FFY00 a5742f1852
tests: add dub (failing/85) 2018-09-02 21:59:53 +01:00
David Seifert c427f8cc9c
Pull in GTest as a dependency of GMock
* WrapDB already unconditionally includes GTest,
  and using GMock without GTest is extremely hard
  and definitely not the default setup.
2018-09-02 22:03:07 +02:00
David Seifert 5242241f5e
Prefer pkgconfig for `GMockDependency`
* Also bring `main` semantics in line with `GTestDependency`
2018-09-02 22:03:05 +02:00
David Seifert 0aa973777f
Prefer pkgconfig for `GTestDependency` 2018-09-02 22:03:02 +02:00
Jussi Pakkanen 3d86a24b55 Remove unnecessary -lquadmath from FORTRAN flags. 2018-09-02 18:25:09 +03:00