aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/xcodebackend.py
AgeCommit message (Collapse)AuthorFilesLines
2021-02-04xcode-backend: add implicit includesJeff Moguillansky1-3/+7
Move helper functions get_source_dir_include_args and get_build_dir_include_args to backend base class
2021-02-04xcode-backend: set global link argsJeff Moguillansky1-0/+3
2021-02-04xcode-backend: fix include pathsJeff Moguillansky1-1/+2
Add project directory as include path Add include paths from dependencies for all languages (c, c++, objc, objc++)
2021-01-30build: add function get_build_targets to Build classJeff Moguillansky1-33/+33
Add function to Build class to get targets of type BuildTarget Update xcode backend to call get_build_targets when iterating over targets. This resolves crash in xcode backend when using custom targets: AttributeError: ‘CustomTarget’ object has no attribute ‘objects’
2021-01-28xcode-backend: fix include pathsJeff Moguillansky1-0/+3
Add include paths from dependencies
2021-01-23split mesonlib into a packageDylan Baker1-1/+1
Currently mesonlib does some import tricks to figure out whether it needs to use windows or posix specific functions. This is a little hacky, but works fine. However, the way the typing stubs are implemented for the msvcrt and fnctl modules will cause mypy to fail on the other platform, since the functions are not implemented. To aleviate this (and for slightly cleaner design), I've split mesonlib into a pacakge with three modules. A universal module contains all of the platform agnositc code, a win32 module contains window specific code, a posix module contains the posix specific code, and a platform module contains no-op implementations. Then the package's __init__ file imports all of the universal functions and all of the functions from the approriate platform module, or the no-op versions as fallbacks. This makes mypy happy, and avoids `if`ing all over the code to switch between the platform specific code.
2021-01-04Use a single coredata dictionary for optionsDylan Baker1-1/+1
This patches takes the options work to it's logical conclusion: A single flat dictionary of OptionKey: UserOptions. This allows us to simplify a large number of cases, as we don't need to check if an option is in this dict or that one (or any of 5 or 6, actually).
2020-10-04Fixed using files object in subdir with xcode backendOskar Sigvardsson1-1/+1
Fixes bug #589. When generating string from file object, it didn't take subdir into account.
2020-01-28backend: refactor: set self.interpreter in the constructorDaniel Mensinger1-4/+5
2019-10-18xcode 64 bit for catalina [skip ci]Michael Hirsch, Ph.D1-1/+1
2019-06-30xcodebackend: Fix iterating compilers after host/build changesDylan Baker1-1/+1
Fixes #5570
2019-06-09Purge `is_cross` and friends without changing user interfacesJohn Ericson1-2/+2
In most cases instead pass `for_machine`, the name of the relevant machines (what compilers target, what targets run on, etc). This allows us to use the cross code path in the native case, deduplicating the code. As one can see, environment got bigger as more information is kept structured there, while ninjabackend got a smaller. Overall a few amount of lines were added, but the hope is what's added is a lot simpler than what's removed.
2019-04-29Fixed unnecessary .items()Daniel Mensinger1-2/+2
2019-04-29Fix unused variables warningsDaniel Mensinger1-2/+2
2019-04-25Don't use len() to test for container emptinessDylan Baker1-2/+2
I ran the numbers once before (it's in the meson history) but it's *much* faster to *not* use len for testing if a container is empty or not.
2019-02-24xcode backend: Add target dependency link argsDavid Vanderson1-0/+2
2018-10-08Pass arguments from in xcode projectsGuillermo Ignacio Enriquez Gutierrez1-4/+7
2018-10-08Xcode project now supports assembly filesGuillermo Ignacio Enriquez Gutierrez1-1/+7
2018-10-01Fix Xcode backend: Add build dir to SYSTEM_HEADER_SEARCH_PATHS so generated ↵Guillermo Ignacio Enriquez Gutierrez1-8/+22
headers can be included/imported in sources
2018-09-25Fix Xcode backend: support for precompiled headers. Only one header per ↵Guillermo Ignacio Enriquez Gutierrez1-6/+11
target is supported
2018-09-24Partially fix targets that use precompiled header with --backend=xcode. ↵Guillermo Ignacio Enriquez Gutierrez1-0/+15
Various compiled headers are not working yet [skip ci]
2018-09-24Sort some objects before writing as Xcode expects [skip ci]Guillermo Ignacio Enriquez Gutierrez1-38/+45
2018-09-19Fix `build --backend=xcode` (#4220)Guillermo Ignacio Enriquez Gutierrez1-23/+33
* Fix exception when running * Fix xcode project typos, indentation and other minor aesthetics diffs * Use tab code \t instead of real tab
2018-03-12Fix shared library building on xcode.Jukka Laurila1-1/+1
2018-03-09Fix xcode backend to run "meson test" instead of the nonexistent meson_test.py.Jukka Laurila1-3/+1
2018-03-03Fix flake8 'imported but unused' reportsJon Turney1-1/+1
$ flake8 | grep F401 ./meson.py:17:1: F401 'mesonbuild.mesonlib' imported but unused ./meson.py:18:1: F401 'locale' imported but unused ./run_unittests.py:24:1: F401 'sys' imported but unused ./mesonbuild/minit.py:2:1: F401 'pyclbr.Function' imported but unused ./mesonbuild/minit.py:18:1: F401 'os' imported but unused ./mesonbuild/backend/vs2010backend.py:15:1: F401 'sys' imported but unused ./mesonbuild/backend/xcodebackend.py:19:1: F401 'sys' imported but unused ./mesonbuild/dependencies/ui.py:20:1: F401 'shutil' imported but unused ./mesonbuild/modules/python3.py:15:1: F401 'sys' imported but unused ./mesonbuild/modules/unstable_icestorm.py:15:1: F401 '..compilers' imported but unused ./mesonbuild/modules/unstable_icestorm.py:15:1: F401 '..mlog' imported but unused ./test cases/common/98 gen extra/srcgen3.py:3:1: F401 'os' imported but unused
2018-01-30Use os.path: basename() and dirname() instead of split()Aleksey Filippov1-1/+1
According to Python documentation[1] dirname and basename are defined as follows: os.path.dirname() = os.path.split()[0] os.path.basename() = os.path.split()[1] For the purpose of better readability split() is replaced by appropriate function if only one part of returned tuple is used. [1]: https://docs.python.org/3/library/os.path.html#os.path.split
2017-11-21Review fixes.Jussi Pakkanen1-1/+1
2017-11-20Replaced sys.executable use with the mesonlib equivalent.Jussi Pakkanen1-1/+1
2017-07-16Removed consecutive identical variable assignments.Jussi Pakkanen1-1/+0
2017-05-29Whitespace tweaks to reduce Flake8 warningsAlistair Thomas1-3/+3
2017-05-23xcode-backend framework fixesblackbox1-28/+28
- frameworks-per-target ( each needs its own uid )
2017-05-23codestyleblackbox1-13/+10
2017-05-23remove debug-markerblackbox1-1/+1
2017-05-23XCode frameworks supportblackbox1-2/+82
- supported as "Link with Libraries". - Frameworks added as a group to the project - no need to specify custom linker flags anymore, xcodeproj works just like ninja example mason.build file : dep_main += [dependency('appleframeworks', modules : ['Foundation', 'AppKit', 'IOKIT', 'QuartzCore', 'OpenGL', 'GLUT', 'OpenAL'], required : true)]
2017-05-04Use American English - 'ise' -> 'ize' where applicablePeter Hutterer1-1/+1
2017-01-11style: [E502] the backslash is redundant between bracketsMike Sinkovsky1-1/+1
2017-01-01style: fix E124 violationsIgor Gnatenko1-1/+1
E124: closing bracket does not match visual indentation Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01style: fix E226 violationsIgor Gnatenko1-1/+1
E226: missing whitespace around arithmetic operator Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-01-01style: fix E225 violationsIgor Gnatenko1-67/+67
E225: missing whitespace around operator Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2016-12-31Fix space before :.Jussi Pakkanen1-20/+21
2016-12-07Skip shared module test on VS because it fails for some reason nobody ↵Jussi Pakkanen1-0/+1
understands.
2016-08-27Use context manager for file I/O.Elliott Sales de Andrade1-20/+16
There are a few cases where a context manager cannot be used, such as the logger.
2016-07-01Overhaul versioning and naming of librariesNirbheek Chauhan1-5/+3
This commit contains several changes to the naming and versioning of shared and static libraries. The details are documented at: https://github.com/mesonbuild/meson/pull/417 Here's a brief summary: * The results of binary and compiler detection via environment functions are now cached so that they can be called repeatedly without performance penalty. This is necessary because every build.SharedLibrary object has to know whether the compiler is MSVC or not (output filenames depend on that), and so the compiler detection has to be called for each object instantiation. * Linux shared libraries don't always have a library version. Sometimes only soversions are specified (and vice-versa), so support both. * Don't use versioned filenames when generating DLLs, DLLs are never versioned using the suffix in the way that .so libraries are. Hence, they don't use "aliases". Only Linux shared libraries use those. * OS X dylibs do not use filename aliases at all. They only use the soversion in the dylib name (libfoo.X.dylib), and that's it. If there's no soversion specified, the dylib is called libfoo.dylib. Further versioning in dylibs is supposed to be done with the -current_version argument to clang, but this is TBD. https://developer.apple.com/library/mac/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryDesignGuidelines.html#//apple_ref/doc/uid/TP40002013-SW23 * Install DLLs into bindir and import libraries into libdir * Static libraries are now always called libfoo.a, even with MSVC * .lib import libraries are always generated when building with MSVC * .dll.a import libraries are always generated when building with MinGW/GCC or MinGW/clang * TODO: Use dlltool if available to generate .dll.a when .lib is generated and vice-versa. * Library and executable suffix/prefixes are now always correctly overriden by the values of the 'name_prefix' and 'name_suffix' keyword arguments.
2016-04-15backends: Don't duplicate test setup data file nameNirbheek Chauhan1-4/+3
Instead, return the values of the test and benchmark setup data files so that the ninja/osx/vs backends can use those filenames instead of hard-coding them.
2016-04-01Move MesonException from coredata to mesonlib.Hemmo Nieminen1-1/+1
2016-02-25Fix Xcode backendRogiel Sulzbach1-14/+21
This makes the following changes: * Explicitly closes the file for force flushing (this fixes an issue on which the last 2 or 3 lines weren't being written to disk) * Adds another check on the PBXBuildFile stage to get the file name if the returned source type is a File instead of a string Fixes issue #337
2016-01-23Moved backends to their own module.Jussi Pakkanen1-0/+776