Commit Graph

5251 Commits

Author SHA1 Message Date
Jukka Laurila 2fcd9d35c5 Add test for bug https://github.com/mesonbuild/meson/issues/3185 2018-03-09 01:32:22 +01:00
Jukka Laurila 31df4ae164 Default run_project_tests backend to ninja instead of xcode on OS X.
The xcode backend is still incomplete and fails many tests.
2018-03-09 00:26:14 +02:00
Jukka Laurila 58ce5fe62d Fix xcode backend to run "meson test" instead of the nonexistent meson_test.py. 2018-03-09 00:26:14 +02:00
Dylan Baker 1ea96b710b setup.py: set the python_requires field
This instructs tools like pip that meson requires python 3.5 or greater,
so if one tries to install on an older version pip will fall back to an
older version of meson.

This won't fix 0.45 since it's already in the wild (unless someone wants
to delete and re-upload the version on pypi). But it should fix future
versions.

Retain the hand rolled version check, but update it to enforce our
actual requirements.
2018-03-07 22:54:01 +02:00
Jussi Pakkanen 8bd33ab981
Merge pull request #3195 from sarum9in/link_whole-generators
Get generated headers from link_whole_targets as meson does for link_targets
2018-03-07 21:05:24 +02:00
Eduardo Lima (Etrunko) ccd198a849 Gnome-module.md: Add information about output files to mkenums()
[skip ci]
2018-03-07 19:57:47 +02:00
Jon Turney ffe6ed2a47 doc: Tweak text about get_option('foodir') in reference manual [skip ci]
* The example for executable()'s install_dir: should use join_paths()

* Clarify how to use directory options which are potentially not prefix
relative

This is mentioned in https://github.com/mesonbuild/meson/issues/1637 and see
also https://patchwork.freedesktop.org/patch/200373/ for an example of this
usage, and the possible confusion that can arise.
2018-03-07 19:57:20 +02:00
Aleksey Filippov c03a2fd283 Add indentation to 'common/64 custom header generator' test case 2018-03-07 19:56:49 +02:00
Mathieu Duponchelle 9f7bdedc94 mesonlib: fix meson detection (again)
Starting from 8fc4244187, tests
failed on my system (python 3.6 arch) because
shutil.which('meson.py') returns 'meson.py', not './meson.py'.

Refactor that codepath by using os.path.isabs instead of
"m_dir == '.'", also remove the adjacent comment because
it doesn't make much sense.
2018-03-07 19:56:24 +02:00
Aleksey Filippov 9b6d2f8a25 Skip whole_archive test for VS older than 2015 2018-03-07 15:25:28 +00:00
Aleksey Filippov bf0e01d779 Get generated headers from link_whole_targets as meson does for link_targets 2018-03-07 12:48:35 +00:00
Aleksey Filippov bcd076276e Add 'common/180 generator link whole' test case
This test covers usage of generated files in static_library
that is later linked into shared_library.
2018-03-07 00:44:44 +00:00
Jussi Pakkanen e98ae58d0e
Merge pull request #3086 from sarum9in/declare-link-whole
Add declare_dependency() link_whole parameter
2018-03-06 21:08:54 +02:00
Evgenii Shatokhin 19718a8d9c Allow passing a compiler object to run_command()
Sometimes it is needed to run the current compiler with specific options
not to compile a file but rather to obtain additional info. For example,
GCC has several -print-* options to query it about the paths to
different libraries and development files. One use case is to get the
location of development files for GCC plugins, which is not easily
obtainable by other means:

  gcc -print-file-name=plugin

For this purpose, it would be convenient if the compiler object returned
by meson.get_compiler(lang) could be used in run_command() directly.
This commit implements it.

Signed-off-by: Evgenii Shatokhin <eshatokhin@virtuozzo.com>
2018-03-06 21:07:16 +02:00
Jukka Laurila 048508c989 Make "meson help" and "meson help <subcommand>" do the expected thing. 2018-03-06 14:02:55 +02:00
Jussi Pakkanen fa1401bec1 Verify that snippets conform to expected format. 2018-03-06 14:02:22 +02:00
Nirbheek Chauhan 9e18e4c703
Improve vcs_tag documentation [skip ci]
Document that dependencies must be explicitly signalled, just like with a custom target.
2018-03-06 15:33:00 +05:30
Aleksey Filippov 4de02cb5b0 Document declare_dependency() link_whole parameter 2018-03-06 01:44:26 +00:00
Aleksey Filippov 9f1d4c0dbe Add declare_dependency() test for transitive link_whole 2018-03-06 01:44:26 +00:00
Aleksey Filippov cd245eccbd Add declare_dependency() test for link_whole 2018-03-06 01:44:26 +00:00
Aleksey Filippov 077d59daa4 Add link_whole argument to declare_dependency() 2018-03-06 01:44:26 +00:00
Jussi Pakkanen 7842bc03dd
Merge pull request #3165 from jon-turney/run-unittests
Enable linux-like unit tests on all posix-like platforms
2018-03-06 00:05:33 +02:00
Jukka Laurila 8f340ffb8d Generate meson.build based on existing source files when meson init is run in a non-empty directory. 2018-03-06 00:05:17 +02:00
Jukka Laurila fcb95847ed Fix the C and C++ project template options, they were reversed before. 2018-03-06 00:05:17 +02:00
Jussi Pakkanen 9819bc9c56 Add Python minimum version requirement in release notes. [skip ci] 2018-03-05 20:34:07 +02:00
TÖRÖK Attila 3e92a86db4 doc: Fix a syntax error in an example in 'Generating sources'. [skip ci] 2018-03-05 05:51:41 -08:00
Alexis Jeandet d10b836155 Activate Qt5 tests on OSX CI
v2:
Qt5 only
Fix Qt PATH

Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2018-03-05 13:14:25 +00:00
Jon Turney ac256cb665 Enable linux-like unit tests on all posix-like platforms
Enable linux-like unit tests on all posix-like platforms, not just linux,
skipping tests where appropriate.  This enables these tests for OSX and
Cygwin in CI.

* Allow in-process (as well as out of process) tests to be skipped by
returning MESON_SKIP_TEST

This is needed to allow test_old_gnome_module_codepaths to be skipped when
'test cases/frameworks/7 gnome' is missing it's pre-prequisites

* Skip PIC tests on platforms where it's irrelevant

* Apple Clang reports the XCode version number, not the LLVM version number,
so the check for stdc(|++)17 needs adjusting

* Skip tests that only pertain to ELF or RPATH mechanics when irrelevant

* Skip tests that require valac if missing

* Skip asan test on Cygwin
2018-03-05 13:14:13 +00:00
Jon Turney daaa49c622 Fix "meson 'test cases/frameworks/4 qt master' _build -Dmethod=qmake" on OSX
ExtraFrameworkDependency doesn't support any method: other than auto, so
handing down the method: used from QtBaseDependency leads to (sic):

meson.build:13:2: ERROR: Unsupported detection method: qmake, allowed methods are auto and auto
2018-03-04 22:28:47 +00:00
Jon Turney 590b6dec97 Fix reporting of Qt detection method used on OSX
Ensure that from_text is set to the name of the qmake executable we used,
rather than the return value of _framework_detect(), which is always 'None'
2018-03-04 22:28:47 +00:00
Jon Turney 02def38741 Fix QtBaseDependency._framework_detect
At the moment, QtBaseDependency._framework_detect sets is_found if at least
one module is found.  This gives the incorrect result in the case where both
found and not-found modules are given.

Fix it so it only sets is_found if all the modules given are found.
2018-03-04 22:28:47 +00:00
Jon Turney 610e5d4a71 Invoke 'qmake --version' correctly in test_qt5dependency_qmake_detection
subprocess.getoutput() takes a string, not a list.  I'm going to guess this
is the cause of the mysterious behaviour alluded to in the comment...
2018-03-04 22:28:47 +00:00
Jon Turney 0eade4f3c6 Fix dependency('qt4|5', method: 'qmake') for Cygwin
Fix dependency('qt4|5', method: 'qmake') detection when shared library
extension isn't .so

Note that OSX already has a special case to look for .framework
2018-03-04 22:28:46 +00:00
Jussi Pakkanen 7e52ba05ad
Merge pull request #3177 from infirit/consistant_config_outpu
mconf: re-implement print_aligned fixes #3149
2018-03-05 00:06:31 +02:00
Alicia Boya García 70270d874d meson test: let gdb handle ^C instead of us
Fixes https://github.com/mesonbuild/meson/issues/3156
2018-03-05 00:04:28 +02:00
Jussi Pakkanen 0744601fda
Merge pull request #3171 from jon-turney/flake8
Fix flake8 issues
2018-03-05 00:03:34 +02:00
Jussi Pakkanen 80b101d5f3 Bumped version number for new development. 2018-03-04 21:14:03 +02:00
Jussi Pakkanen 2521e43baf Add missing code block end marker. 2018-03-04 21:11:53 +02:00
Sander Sweers 3a0ab6a2bc mconf: Make it pep8 compliant 2018-03-04 19:56:53 +01:00
Sander Sweers 9bafde953a mconf: make print_aligned static 2018-03-04 19:54:50 +01:00
Sander Sweers 9d31c751b6 mconf: Do not store dict keys for no reason
If a dict is empty it will evaluate to False
2018-03-04 19:54:50 +01:00
Sander Sweers 84d382f963 mconf: User newline instead of printing empty string 2018-03-04 19:54:50 +01:00
Sander Sweers f805f8e109 mconf: Replace usage of keys() on dicts with direct call by sorted
Calling sorted or list on a dictionary will return the keys.
2018-03-04 19:54:50 +01:00
Sander Sweers 41b5983823 Re-implement function print_aligned
It is now more readable, more pythonic and fixes #3149
2018-03-04 19:54:50 +01:00
Sander Sweers ae90b6586f mconf: Do not turn opt.choices into a string
It is inconsistent with other option groups. It also breaks
print_aligned as it handles lists.
2018-03-04 19:54:50 +01:00
Jussi Pakkanen daaae647d7 Updated information for new release. 2018-03-04 20:27:34 +02:00
Jussi Pakkanen 06dadfc45f Make gtkdoc test pass on Debian unstable. 2018-03-04 20:04:20 +02:00
Jussi Pakkanen a8da0e25ea Skip test that requires mocking when using an external exe. Also logging. 2018-03-04 19:08:37 +02:00
Jussi Pakkanen f53e8b8812 Explain change of default better. [skip ci] 2018-03-04 18:25:36 +02:00
Tim Ansell 69ff980fbc Fixing broken language arguments [skip ci]
Missing ending pipe was causing it to fail to render.
2018-03-04 14:45:44 +02:00