summaryrefslogtreecommitdiff
path: root/mesonbuild/backend/vs2010backend.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Review fixes.Jussi Pakkanen2017-11-211-2/+2
|
* Replaced sys.executable use with the mesonlib equivalent.Jussi Pakkanen2017-11-201-4/+5
|
* Merge pull request #2313 from dcbaker/fix-2180Jussi Pakkanen2017-10-011-11/+30
|\ | | | | link_whole should be considered a source for targets
| * vs: Fix link_whole usage with the vs backendNirbheek Chauhan2017-09-301-8/+21
| | | | | | | | | | | | | | /WHOLEARCHIVE must go to AdditionalOptions, not AdditionalDependencies and we must add a project reference to trick msbuild/visual studio into building a target that is built from only libraries linked in via /WHOLEARCHIVE.
| * vs: Fix detection of options vs libraries in link argsNirbheek Chauhan2017-09-301-0/+2
| |
| * vs: Add a helper for adding a project referenceNirbheek Chauhan2017-09-301-3/+7
| |
* | Implement capture for generatorsNiklas Claesson2017-09-291-0/+10
| |
* | Allow CustomTarget's to be indexedDylan Baker2017-09-271-1/+3
| | | | | | | | | | | | | | | | | | | | | | This allows a CustomTarget to be indexed, and the resulting indexed value (a CustomTargetIndex type), to be used as a source in other targets. This will confer a dependency on the original target, but only inserts the source file returning by index the original target's outputs. This can allow a CustomTarget that creates both a header and a code file to have it's outputs split, for example. Fixes #1470
* | Merge pull request #2357 from LukeShu/flake8Jussi Pakkanen2017-09-221-5/+2
|\ \ | |/ |/| Bring into compliance with flake8
| * flake8: Clean up complained-about unused importsLuke Shumaker2017-09-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This also adds a "# noqa: F401" comment on an unused "import lzma", which we are using it in a try/except block that is being used to check if the lzma module is importable; of course it is unused. v2: This turned out to be a little tricky. mesonbuild/modules/__init__.py had the "unused" import: from ..interpreterbase import permittedKwargs, noKwargs However, that meant that the various modules could do things like: from . import noKwargs # "." is "mesonbuild.modules" Which breaks when you remove __init__.py's "unused" import. I could have tagged that import with "# noqa: F401", but instead I chose to have each of the module import directly from "..interpreterbase" instead of ".".
| * flake8: Perform suggested whitespace/formatting changesLuke Shumaker2017-09-211-4/+2
| | | | | | | | | | This only touches newlines, spaces, and (occaisionally) commas. Anything else is left for another commit.
* | Add @PLAINNAME@ and @BASENAME@ to arguments argument for GeneratorNiklas Claesson2017-09-201-1/+1
|/ | | | Fixes #1282
* Merge pull request #1943 from QuLogic/duplicate-namesJussi Pakkanen2017-09-121-33/+1
|\ | | | | Fix creation of objects with duplicate names
| * Remove VS implementation of object name resolver.Elliott Sales de Andrade2017-08-141-33/+1
| | | | | | | | The upstream one should work properly now, one hopes.
* | backends: Add custom target inc dirs before target inc dirsNirbheek Chauhan2017-09-111-3/+5
| | | | | | | | | | | | Custom target include dirs must be overridable by target-specific include dirs otherwise in case of header name collisions, the user has no way to override this behaviour.
* | Make all functionality invokable via the main Meson binary,Jussi Pakkanen2017-08-181-13/+6
|/ | | | which can be a Windows .exe file.
* Use "meson test" in test invocations so it will not print the deprecation ↵Jussi Pakkanen2017-08-141-1/+2
| | | | warning.
* Add option to disable implicit include directories. Closes #2139.Jussi Pakkanen2017-08-051-3/+7
|
* Support implibs for executables on WindowsJon Turney2017-07-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Add a boolean 'implib' kwarg to executable(). If true, it is permitted to use the returned build target object in link_with: On platforms where this makes sense (e.g. Windows), an implib is generated for the executable and used when linking. Otherwise, it has no effect. (Rather than checking if it is a StaticLibrary or SharedLibary, BuildTarget subclasses gain the is_linkable_target method to test if they can appear in link_with:) Also install any executable implib in a similar way to a shared library implib, i.e. placing the implib in the appropriate place Add tests of: - a shared_module containing a reference to a symbol which is known (at link time) to be provided by the executable - trying to link with non-implib executables (should fail) - installing the implib (This last one needs a little enhancement of the installed file checking as this is the first install test we have which needs to work with either MSVC-style or GCC-style implib filenames)
* Preserve -L -l pairings fetched from external depsNirbheek Chauhan2017-06-121-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | While adding link args for external deps, sometimes different libraries come from different prefixes, and an older version of the same library might be present in other prefixes and we don't want to accidentally pick that up. For example: /usr/local/lib/libglib-2.0.so /usr/local/lib/pkgconfig/glib-2.0.pc /usr/local/lib/libz.so /usr/local/lib/pkgconfig/zlib.pc /home/mesonuser/.local/lib/libglib-2.0.so /home/mesonuser/.local/lib/pkgconfig/glib-2.0.pc PKG_CONFIG_PATH="/home/mesonuser/.local/lib/pkgconfig/:/usr/local/lib/pkgconfig/" If a target uses `dependencies : [glib_dep, zlib_dep]`, it will end up using /usr/local/lib/libglib-2.0.so instead of /home/mesonuser/.local/lib/libglib-2.0.so despite using the pkg-config file in /home/mesonuser/.local/lib/pkgconfig because we reorder the -L flag and separate it from the -l flag. With this change, external link arguments will be added to the compiler list without de-dup or reordering. Closes https://github.com/mesonbuild/meson/issues/1718
* vs: Always check VSINSTALLDIR in case VisualStudioVersion is unsetNirbheek Chauhan2017-06-091-17/+15
| | | | | | | This happened on the CI, so it could happen on people's machines too: https://ci.appveyor.com/project/jpakkane/meson/build/2870/job/p2n70hg01vp3dkgl https://ci.appveyor.com/project/jpakkane/meson/build/2870/job/7ifh64mi1999guxt
* fix WarningLevel in vcxproj #1913Bug2017-06-081-3/+3
| | | | - VS 2010-2015 expect <WarningLevel> to be inside <ClCompile> - WarningLevel now correctly reflects VisualStudioCCompiler.get_warn_args
* Fix cross environment pollution.Ole André Vadla Ravnås2017-05-211-8/+10
| | | | | | | Environment variables like CFLAGS and LDFLAGS should not affect the cross environment. Fixes #1772
* vs: surround project guid with '{}'Nicolas Schneider2017-05-091-4/+4
| | | | Closes #1672.
* Add support for @CURRENT_SOURCE_DIR@ in generator argumentsAlberto Aguirre2017-05-081-0/+2
| | | | | | | | | | | | | Allow users to specify @CURRENT_SOURCE_DIR@ in generator arguments to specify the current target source directory. This is useful when creating protobuf generator objects in sub-directories because protoc will then generate files in the expected location. Fixes #1622. Remove stray semicolon Update documentation
* Use American English - 'ise' -> 'ize' where applicablePeter Hutterer2017-05-041-2/+2
|
* Store extra_files as file objects. Helps with #1686.Jussi Pakkanen2017-05-041-1/+1
|
* Don't use len() to test emptiness vs not emptinessDylan Baker2017-05-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Meson has a common pattern of using 'if len(foo) == 0:' or 'if len(foo) != 0:', however, this is a common anti-pattern in python. Instead tests for emptiness/non-emptiness should be done with a simple 'if foo:' or 'if not foo:' Consider the following: >>> import timeit >>> timeit.timeit('if len([]) == 0: pass') 0.10730923599840025 >>> timeit.timeit('if not []: pass') 0.030033907998586074 >>> timeit.timeit('if len(['a', 'b', 'c', 'd']) == 0: pass') 0.1154778649979562 >>> timeit.timeit("if not ['a', 'b', 'c', 'd']: pass") 0.08259823200205574 >>> timeit.timeit('if len("") == 0: pass') 0.089759664999292 >>> timeit.timeit('if not "": pass') 0.02340641999762738 >>> timeit.timeit('if len("foo") == 0: pass') 0.08848102600313723 >>> timeit.timeit('if not "foo": pass') 0.04032287199879647 And for the one additional case of 'if len(foo.strip()) == 0', which can be replaced with 'if not foo.isspace()' >>> timeit.timeit('if len(" ".strip()) == 0: pass') 0.15294511600222904 >>> timeit.timeit('if " ".isspace(): pass') 0.09413968399894657 >>> timeit.timeit('if len(" abc".strip()) == 0: pass') 0.2023209120015963 >>> timeit.timeit('if " abc".isspace(): pass') 0.09571301700270851 In other words, it's always a win to not use len(), when you don't actually want to check the length.
* Make it possible to only do unity builds on subprojects.Jussi Pakkanen2017-04-151-1/+1
|
* Merge pull request #1549 from mesonbuild/linkwholeJussi Pakkanen2017-04-151-0/+4
|\ | | | | Add option to link the entire contents of a static library to a target.
| * Fix link whole on VS backend.Jussi Pakkanen2017-04-081-0/+4
| |
* | vs: Fix depend_files support in custom targetsNirbheek Chauhan2017-04-101-1/+2
| | | | | | | | | | This was totally broken and we didn't notice because we had no tests for it at all.
* | vs: Pretty-print all vcxproj outputNirbheek Chauhan2017-04-101-24/+12
| | | | | | | | | | | | | | | | We were more hesitant to do this earlier because it might have messed up custom_target command lines, but since we always use a wrapper for that now, it should be ok to do this. Add a test in the form of a funky generator script.
* | vs: Pass absolute path of files to run_targetNirbheek Chauhan2017-04-091-0/+3
|/ | | | Fixes https://github.com/mesonbuild/meson/issues/957 for the VS backend
* Merge pull request #1518 from centricular/mesonintrospect-evarJussi Pakkanen2017-04-081-7/+6
|\ | | | | Export MESONINTROSPECT to postconf/install/run_command scripts
| * Export MESONINTROSPECT to postconf/install/run_command scriptsNirbheek Chauhan2017-03-281-7/+6
| | | | | | | | | | | | | | | | | | Points to the `mesonintrospect.py` script corresponding to the currently-running version of Meson. Includes a test for all three methods of running scripts/commands. Closes https://github.com/mesonbuild/meson/issues/1385
* | Review fixes.Jussi Pakkanen2017-04-021-1/+1
| |
* | Use get_option_for_target for builtins where sensible.Jussi Pakkanen2017-04-021-3/+3
| |
* | Use relative object file name for unity files everywhere.Jussi Pakkanen2017-04-021-1/+1
| |
* | Create unity files with the VS backend.Jussi Pakkanen2017-04-021-0/+2
| |
* | modules: Start using @SOURCE_ROOT@ and @BUILD_ROOT@Nirbheek Chauhan2017-03-281-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | First step in fixing https://github.com/mesonbuild/meson/issues/1419 Also works around an issue in the MinGW windres.exe that causes it to fail if any of the arguments passed to it contain a space. There seems to be no way to quote or escape the spaces in the path to make windres parse the path correctly, so we just warn about it instead. https://sourceware.org/bugzilla/show_bug.cgi?id=4933 https://github.com/mesonbuild/meson/pull/1346
* | vs: Fix custom target generated object pathsNirbheek Chauhan2017-03-261-1/+1
| | | | | | | | | | | | | | | | The paths are already relative to the target dir. Includes a test for this which generates and builds in subdirs. If all the generation and usage is done in the build root, this bug will obviously not be triggered.
* | Merge pull request #1496 from centricular/fix-internal-dep-orderJussi Pakkanen2017-03-251-3/+6
|\ \ | | | | | | Preserve internal-dep include order in build target dependencies
| * | Preserve the order of internal deps in a targetNirbheek Chauhan2017-03-231-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | We were adding them to the CompilerArgs instance in the order in which they are specified, which is wrong because later dependencies would override previous ones. Add them in the reverse order instead. Closes https://github.com/mesonbuild/meson/issues/1495
* | | Merge pull request #1491 from nioncode/vs2017Jussi Pakkanen2017-03-241-0/+32
|\ \ \ | |_|/ |/| | VS2017 backend
| * | add 'vs' backend that automatically chooses between the vs backendsNicolas Schneider2017-03-231-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | For newer VS versions, we can simply rely on 'VisualStudioVersion' being set in the environment. For VS2010, we fall back to check 'VSINSTALLDIR' for the version string. If the backend can not be auto detected, we raise an exception to make the user choose an explicit backend. We also print the detected backend to the meson log.
| * | add vs2017 backendNicolas Schneider2017-03-221-0/+9
| |/ | | | | | | | | | | VS2017 requires the 'WindowsTargetPlatformVersion' property to be set. We gather the version to use from the environment variable 'WindowsSDKVersion' that will be set by the VS developer command prompt.
* | vs: Always use a wrapper for custom target commandsNirbheek Chauhan2017-03-231-1/+10
|/ | | | | | | | Besides fixing output capture, it also fixes a strange bug in MSBuild where if the command list is too long, it will remove random characters from the command list before passing it to the command. Closes https://github.com/mesonbuild/meson/issues/1417
* vs: do not add generated objects to projectNicolas Schneider2017-03-201-4/+4
| | | | | | VS2015 automatically picks up outputs from CustomBuild commands, which we now use instead of CustomBuildStep commands, which do not get picked up automatically.
* vs: use regular quotes instead of '&quot;' in Generator commandsNicolas Schneider2017-03-201-7/+5
| | | | | Seems like CustomBuild does not like '&quot;', but works just fine with regular quotes.