aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
AgeCommit message (Collapse)AuthorFilesLines
2017-03-03gnome.genmarshal: Use --output when availablePatrick Griffis1-1/+7
This is just cleaner and works around #1417
2017-03-01Graceful fallback when printing messages with characters not understood by ↵Jussi Pakkanen1-2/+13
stdout.
2017-02-27Use cross stripper when cross compiling and allow overriding native strip ↵Jussi Pakkanen5-4/+29
executable. Closes #1414.
2017-02-27Fix directory context for git wrap checkMarc Becker1-1/+1
2017-02-27Force log file to UTF-8.Jussi Pakkanen1-1/+1
2017-02-26gnome: Pass ExternalProgram objects to CustomTargetNirbheek Chauhan1-7/+7
There is no need to do obj.get_command() and in fact it's wrong because the VS backends need to resolve each object to absolute paths and get_command() does not do that. This should fix invocation of GNOME module helpers with the VS backends For the record, absolute paths for programs are needed because the same PATH environment won't necessarily be available to Visual Studio when it builds the generated solution. Related to https://github.com/mesonbuild/meson/issues/1419
2017-02-26Raise if gobject-introspection is not found.Elliott Sales de Andrade1-5/+1
This used to produce a warning, but then would crash anyway. It's simpler if we just error out and have the user disable gir generation or install gobject-introspection.
2017-02-26Fix undefined variables in ObjC/C++ detectionNirbheek Chauhan1-6/+8
Pointed out by Mike Sinkovsky
2017-02-26ninjabackend: generate "compile_commands.json" even for cross compileFabio Porcedda1-1/+3
Just add 'c_CROSS_COMPILER' and 'cpp_CROSS_COMPILER' to the 'ninja -t compdb' command.
2017-02-21Detect GCC type on macOS for ObjC/C++ tooNirbheek Chauhan2-12/+10
These compilers are available in MinGW and can be built on macOS. More interestingly, `gcc` is a wrapper around `clang` on macOS, so we will detect the compiler type incorrectly on macOS without this.
2017-02-21Support passing of options to compilers and linkersNirbheek Chauhan1-4/+2
If you pass options, the last element in the array won't be the compiler basename, so just check if the basename is in the exelist somewhere. Includes a test.
2017-02-21Use the same function for detection of C and C++ compilersNirbheek Chauhan1-46/+16
The mechanism is identical which means there's a high likelihood of unintended divergence. In fact, a slight divergence was already there.
2017-02-21Fix static linker exelist in cross-info and environmentNirbheek Chauhan1-9/+11
https://github.com/mesonbuild/meson/pull/1406 had an incomplete fix for this. The test case caught it. Note: this still doesn't test that setting it in the cross-info works, but it's the same codepath as via the environment so it should be ok.
2017-02-21Fix compiler exelist in cross-info and the environmentNirbheek Chauhan1-2/+2
https://github.com/mesonbuild/meson/pull/1406 had an incomplete fix for this. The test case caught it. Note: this still doesn't test that setting it in the cross-info works, but it's the same codepath as via the environment so it should be ok.
2017-02-21environment: Use shlex.split() to get AR from the envNirbheek Chauhan1-1/+1
That way if the path has spaces, it won't get messed up.
2017-02-21Detect (non-Apple) clang as objc/c++ compilerHase Bastian1-0/+4
See https://github.com/mesonbuild/meson/pull/1388
2017-02-21Factor out common code in compiler detectionNirbheek Chauhan1-117/+65
This was being duplicated across C/C++/ObjC/ObjC++/Fortran and hence was behaving slightly differently in each.
2017-02-20Merge pull request #1402 from centricular/test-setup-fixesJussi Pakkanen2-1/+9
Various fixes to how mesontest handles test setups.
2017-02-20Merge pull request #1403 from centricular/compile_resourcesJussi Pakkanen5-56/+248
Make configure_file() great again
2017-02-20Merged clang color.Jussi Pakkanen1-1/+9
2017-02-20gnome: Support configure_file() output in compile_resourcesNirbheek Chauhan1-3/+10
We can't support generated XML files with custom_target() because the dependency scanning happens at configure time, but we *can* support generating them with configure_file(). Closes https://github.com/mesonbuild/meson/issues/1380
2017-02-20configure_file: Substitute @INPUT@/@OUTPUT@/etc in commandNirbheek Chauhan1-8/+25
The same substitutions and rules as custom_target(). Also generally fix it to actually work when run in a subdir and with anything other than absolute paths for input and output files. We now also log a message when configuring files. Includes tests for all this.
2017-02-20gnome: Document why we need absolute paths for mkenumsNirbheek Chauhan1-0/+1
I forgot why this was needed and had to dig through the git logs. Link to the GitHub issue for future reference.
2017-02-20custom_target: Substitute input into outputNirbheek Chauhan1-2/+18
This means replacing @PLAINNAME@ and @BASENAME@ in the outputs. This is the same feature as generator(). This is only allowed when there is only one input file for obvious reasons + failing test for this.
2017-02-20Rewrite custom_target template string substitutionNirbheek Chauhan3-43/+183
Factor it out into a function in mesonlib.py. This will allow us to reuse it for generators and for configure_file(). The latter doesn't implement this at all right now. Also includes unit tests.
2017-02-20configure_file: Don't allow both command and configuration kwargsNirbheek Chauhan1-1/+5
2017-02-20gnome: Print an error message when generated files are passed to ↵Nirbheek Chauhan1-1/+8
compile_resources
2017-02-20Add auto option to b_colored when using Clang. Remove Clang version check ↵Rodrigo Lourenço1-4/+3
when enabling colored output.
2017-02-20rpm: Fix missing parenthesis and quotation markNirbheek Chauhan1-1/+1
Pointed out by Mike Sinkovsky
2017-02-20Update minimum Clang version for colored outputRodrigo Lourenço1-1/+1
2017-02-19Merge pull request #1406 from mesonbuild/fixdetectionJussi Pakkanen1-39/+43
Fix compiler detection + cross when envvar not set.
2017-02-19Fix the rest of them.Jussi Pakkanen1-18/+20
2017-02-19Fix compiler detection + cross when envvar not set.Jussi Pakkanen1-21/+23
2017-02-19Merge pull request #1400 from centricular/fix-gresource-versionJussi Pakkanen1-18/+21
gnome: Fix minimum gresource dependency required
2017-02-19add_test_setup: Treat no env as empty envNirbheek Chauhan1-1/+1
Otherwise env is {} and we get a traceback trying to use the setup: $ /home/cassidy/dev/meson/mesontest.py -C build --setup valgrind ninja: Entering directory `/home/cassidy/dev/gst/master/gst-build/build' ninja: no work to do. Traceback (most recent call last): File "/home/cassidy/dev/meson/mesontest.py", line 579, in <module> sys.exit(run(sys.argv[1:])) File "/home/cassidy/dev/meson/mesontest.py", line 575, in run return th.doit() File "/home/cassidy/dev/meson/mesontest.py", line 337, in doit self.run_tests(tests) File "/home/cassidy/dev/meson/mesontest.py", line 485, in run_tests self.drain_futures(futures, logfile, jsonlogfile) File "/home/cassidy/dev/meson/mesontest.py", line 504, in drain_futures self.print_stats(numlen, tests, name, result.result(), i, logfile, jsonlogfile) File "/usr/lib64/python3.5/concurrent/futures/_base.py", line 398, in result return self.__get_result() File "/usr/lib64/python3.5/concurrent/futures/_base.py", line 357, in __get_result raise self._exception File "/usr/lib64/python3.5/concurrent/futures/thread.py", line 55, in run result = self.fn(*self.args, **self.kwargs) File "/home/cassidy/dev/meson/mesontest.py", line 216, in run_single_test child_env.update(self.options.global_env.get_env(child_env)) AttributeError: 'dict' object has no attribute 'get_env' There is no harm in doing this, and this is the simplest fix for this. Closes https://github.com/mesonbuild/meson/issues/1371
2017-02-19Add repr() for EnvironmentVariables{,Holder}Nirbheek Chauhan2-0/+8
Makes it easier to debug issues with it
2017-02-19Merge pull request #1356 from centricular/cross-platform-unit-testsJussi Pakkanen9-73/+119
Run unit tests on more platforms, and more
2017-02-19Merge pull request #1396 from fabio-porcedda/cross-ccacheJussi Pakkanen1-5/+8
cross_file: add support for "ccache"
2017-02-19Add b_colorout option for Clang compilers.Rodrigo Lourenço1-1/+10
2017-02-19gnome: Fix minimum gresource dependency requiredNirbheek Chauhan1-1/+1
This is the latest release of glib that exists and has the required dependency-generation fixes. Without this GNOME Recipes cannot even configure.
2017-02-19gnome: Only check gresource version with CustomTargetsNirbheek Chauhan1-17/+20
We don't need dependencies to work correctly to use the output of configure_file in the dependencies: kwarg. This allows GNOME Recipes to built without the latest glib git.
2017-02-19run_command: Fix error message on incorrect argumentNirbheek Chauhan1-1/+2
Be more descriptive so people know what they can do.
2017-02-19rpm: We no longer provide the full path to a libraryNirbheek Chauhan3-6/+7
Ever since we changed how we do library searching, the full path to the library has not been available under `.fullpath`. This has been broken for at least a year...
2017-02-19dependencies: Remove useless and verbose dict.get() callNirbheek Chauhan1-2/+2
We already ensured that the cross-info binaries section has pkg-config in the if check above.
2017-02-19find_program: Fix implementation of .path()Nirbheek Chauhan7-39/+46
And actually test that prog.path() works. The earlier test was just running the command without checking if it succeeded. Also make everything use prog.get_command() or get_path() instead of accessing the internal member prog.fullpath directly.
2017-02-19find_program: Support passing mesonlib.File objectsNirbheek Chauhan1-2/+14
This means you can pass files() and the return value of configure_file() to find_program() now.
2017-02-18find_program: Correctly use scripts found in PATHNirbheek Chauhan1-12/+38
We also need to check whether the program found in PATH can be executed directly by Windows or if we need to figure out what the interpreter is and add it to the list. Also add `msc` to the list of extensions that can be executed natively Includes a project test and a unit test for this and all expected behaviours on Windows.
2017-02-18mesonintrospect: Normalize install_filename in the outputNirbheek Chauhan1-1/+4
Without this, we can output a mixture of '/' and '\' on platforms where os.path.sep is '\' and prefix or outdir uses '/'. Let's always return the path in the format of the platform we're running on. This is needed to make the test_install_introspection() unittest work properly on Windows.
2017-02-18ninja: Delete output static lib before calling `ar`Nirbheek Chauhan1-3/+11
Otherwise if the list of sources changes on reconfigure after building, the static library will contain both the old and new objects. Closes https://github.com/mesonbuild/meson/issues/1355
2017-02-18mesonintrospect: Also print builtins for --buildoptionsNirbheek Chauhan1-14/+2
This is needed to be able to introspect the value of xxxdir options such as libdir and prefix.