aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
AgeCommit message (Collapse)AuthorFilesLines
2018-07-02added cuda test caseflobBeau Johnston1-0/+3
2018-07-02fixed file extensions for cudaBeau Johnston1-2/+2
2018-07-02added check to see if cuda was detectedBeau Johnston2-1/+27
2018-06-10fixed sideci for cuda compilation fixBeau Johnston3-12/+7
2018-06-10Merge branch 'cuda_compiler'Beau Johnston5-2/+216
2018-06-10added cuda compilerBeau Johnston5-2/+216
2018-06-09Add file encoding to configure_fileSander Sweers2-7/+13
Input files can be in any file encoding, not just utf-8 or isolatin1. Meson should not make assumptions here and allow for the user to specify the encoding to use.
2018-06-09Fix options being reset to default on reconfigureXavier Claessens1-4/+14
Closes: #3712
2018-06-09Refine cross file checking to ignore directoriesJon Turney1-2/+2
e.g. 'meson x86_64-w64-mingw32 --cross-file x86_64-w64-mingw32' currently fails with an IsADirectoryError exception. Cross files must be files, so when searching, only accept a candidate path which is an existing file, not just an existing path.
2018-06-08gdbus_codegen: Support --c-generate-autocleanupRobert Ancell1-2/+7
2018-06-08mintro: Fix introspecting installation pathsThibault Saunier1-2/+2
A new custom_install_mode element was added in 05c43cdcd
2018-06-07gdbus_codegen: Support arbitrary extra argumentsRobert Ancell1-1/+4
2018-06-07backends: Don't exclude system libraries for PATHNirbheek Chauhan1-3/+3
We reuse the same function for generating PATH, and we don't want to exclude system paths there for obvious reasons.
2018-06-07find_library: Add a cache for library searchingNirbheek Chauhan2-7/+27
Otherwise we can end up searching for the same library tens of times, because pkg-config does not de-duplicate -lfoo args before returning them. We use -Wl,--start-group/end-group, so we do not need to worry about ordering issues in static libraries.
2018-06-07backends: Don't hardcode system library pathsNirbheek Chauhan1-5/+12
Lookup the library paths using the available compilers instead. This makes the code work on non-Linux platforms too.
2018-06-07Install shared_module implibsJon Turney2-2/+1
On Windows, if we are going to link with a shared module, we need the implib. Use case: The Xorg server builds some X protocol extensions as modules. The implibs for these modules need to be shipped as part of the SDK, to enable building of 3rd party extensions which reference symbols in (and hence on Windows, need to be linked with) these modules.
2018-06-07More clearly explain portability issues with linking to a moduleJon Turney1-2/+6
Refine #3277 According to what I read on the internet, on OSX, both MH_BUNDLE (module) and MH_DYLIB (shared library) can be dynamically loaded using dlopen(), but it is not possible to link against MH_BUNDLE as if they were shared libraries. Metion this as an issue in the documentation. Emitting a warning, and then going on to fail during the build with mysterious errors in symbolextractor isn't very helpful, so make attempting this an error on OSX. Add a test for that. See also: https://docstore.mik.ua/orelly/unix3/mac/ch05_03.htm https://stackoverflow.com/questions/2339679/what-are-the-differences-between-so-and-dylib-on-osx
2018-06-07dependencies/qt: fix debugoptimized builds with qtMatthew Waters1-1/+1
debugoptimized builds building against Qt would ultimately link against both the debug and non-debug msvcrt, ntdll, etc libraries which causes crashes in weird places and is very much not recommended by Microsoft. This changes the selected Qt library(ies) correctly to not uses the debug variants for debugoptimized builds. https://github.com/mesonbuild/meson/pull/3680
2018-06-07Interpreter: Fix subdir_done() to exit from inside if/foreach blocksXavier Claessens2-4/+8
Closes: #3700.
2018-06-07gettext: Install .mo files atomicallyPhilip Chimento1-2/+4
Without this, building a module in a Flatpak app manifest that is a newer version of a module already present in the Flatpak runtime will fail. (The Flatpak file system is a bunch of hard links to readonly files, which can be replaced but not written to.) This instead creates a temporary file in the same directory as the destination (to avoid cross-device renaming errors) and atomically renames the temporary file to the destination, replacing it instead of rewriting it as shutil.copyfile() would do.
2018-06-06compilers: Use RUSTFLAGS from the env as default rust_args valueXavier Claessens1-1/+2
2018-06-06mesonmain: Take only 2 optional directoriesXavier Claessens1-19/+4
If only 1 dir is provided, the 2nd defaults to '.' and if none is provided they default to '.' and '..'. It should be builddir first, followed by sourcedir, but validate_core_dirs() will still swap them if builddir contains a meson.build file.
2018-06-06mconf: Take only one optional builddir arg that defaults to '.'Xavier Claessens1-11/+2
2018-06-06environment: copy self.cmd_line_options to not modify original optionsXavier Claessens1-1/+1
That dict gets modified when adding default_options, but mesonmain will need to keep the original values.
2018-06-06wraptool: Convert to argparseXavier Claessens1-62/+39
2018-06-06Convert args.projectoptions into a dictXavier Claessens4-155/+75
This simplifies a lot of code, and centralize "key=value" parsing in a single place. Unknown command line options becomes an hard error instead of merely printing warning message. It has been warning it would become an hard error for a while now. This has exceptions though, any unknown option starting with "<lang>_" or "b_" are ignored because they depend on which languages gets added and which compiler gets selected. Also any option for unknown subproject are ignored because they depend on which subproject actually gets built. Also write more command line parsing tests. "19 bad command line options" is removed because bad cmd line option became hard error and it's covered with new tests in "30 command line".
2018-06-06Remove had_argument_for() it is not used anymoreXavier Claessens2-18/+4
This also means we don't need to keep original command line arguments anymore.
2018-06-06coredata: Stop setting default option values as argparse attributeXavier Claessens4-68/+29
All options are now the projectoptions list, regardless of how they got defined in the command line. This also delays setting builtin option values until the main project() default options are parsed to simplify the code. This is possible because we already delayed setting the backend after parsing main project() in a previous commit.
2018-06-06mconf: Special case UserUmaskOption to print value in octal notationXavier Claessens1-0/+2
2018-06-06UserUmaskOption: Add 'preserve' in choices and use octal notationXavier Claessens1-0/+1
2018-06-06UserUmaskOption: Implement validate_value instead of set_valueXavier Claessens1-5/+4
set_value() is implemented by the base class, subclasses only need to override validate_value().
2018-06-06mconf: Reduce code duplication and avoid missing builtin optionsXavier Claessens1-81/+42
This ensure all option groups are printed the same way. Also ensure that we cannot miss some builtin options by taking the list of all builtin options and excluding only directories/testing options.
2018-06-06mconf: Fix print when choices is a string instead of listXavier Claessens1-1/+4
2018-06-06mconf: Set prefix first because other options depends on itXavier Claessens2-9/+32
2018-06-06dependencies: Take options from coredata instead of cmd lineXavier Claessens2-3/+2
These are the last remaining places where attributes set by argparse for "--builtin-option" are used.
2018-06-06mconf: Report all unknown cmd line options instead of aborting on firstXavier Claessens1-2/+8
This is also more consistent with the error message returned by optinterpreter when it finds unknown command line options.
2018-06-06Move to coredata some methods handling optionsXavier Claessens4-32/+35
Those methods only use coredata object, so better just move them as a coredata method.
2018-06-06mconf: Small tweaks when printing configurationXavier Claessens1-1/+2
2018-06-06Delay backend creation until project() is parsedXavier Claessens3-31/+46
The project() function could have a different value for the backend option in its default_options kwargs. Also set backend options, passing them in command line had no effect previously.
2018-06-06optinterpreter: Remove duplicated list of languagesXavier Claessens3-13/+5
It is important to keep the list of languages up to date in optinterpreter, otherwise we could have conflicting options when adding new languages.
2018-06-06Fix issues found by flake8Xavier Claessens10-11/+5
2018-06-06Move <lang>_args to coredata.compiler_optionsXavier Claessens10-77/+60
2018-06-06UserArrayOption: Small cleanup in value parsingXavier Claessens1-13/+12
It is nicer to early raise exception if the value from meson_options.txt is not a string in "[]" format than duplicating the parser code for both cases. Also it was checking for duplicated items only in the user_input case, but we should also check for dups in the default value from meson_options.txt.
2018-06-06UserArrayOption: Add support for splitting on space instead of comaXavier Claessens1-2/+6
2018-06-06Move get_args_from_envvars() from environment to compilersXavier Claessens3-55/+53
2018-06-06Compilers: Chain-up to parent class in get_options()Xavier Claessens2-52/+65
Parent class could have common options for all compilers, and we'll soon add some.
2018-06-06environment.py: Properly check platform on MSVC 2008Chun-wei Fan1-3/+11
The 'Platform' envvar may not be set on Visual Studio 2008, at least when using the SDK 7.0 compilers, so check the 'BUILD_PLAT' envvar so that we do not mis-detect x64 build environments as x86.
2018-06-06Revert "really switch to qmake automatically if pkg-config fails"Nirbheek Chauhan1-1/+1
This reverts commit 0045d95a16be18092adfb40a9a5df944bcb99aea. <jeandet> nirbheek, it seems 0045d95a16be18092adfb40a9a5df944bcb99aea is really wrong, I've tested on Ubuntu. While writing this line I was thinking that you can't have Qt without a working qmake in the path. On Ubuntu you have that qtchooser stuff which is misleading.
2018-06-06Warn when Apple bitcode support is enabled and in-useNirbheek Chauhan1-1/+11
We have to disable some options, so tell the user about them and point to the documentation so they can read more about it.
2018-06-06Add a new option for building with Apple bitcode supportNirbheek Chauhan3-17/+38
Normally, people would just pass -fembed-bitcode in CFLAGS, but this conflicts with -Wl,-dead_strip_dylibs and -bundle, so we need it as an option so that those can be quietly disabled.