aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/vs2010backend.py
AgeCommit message (Collapse)AuthorFilesLines
2018-07-18Can upgrade build directory from an old version.builddirupgradeJussi Pakkanen1-1/+2
2018-06-10Visual Studio: Implement startup projectNiklas Claesson1-2/+11
2018-06-06Move <lang>_args to coredata.compiler_optionsXavier Claessens1-4/+5
2018-06-06Add a new option for building with Apple bitcode supportNirbheek Chauhan1-1/+2
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.
2018-04-26Merge pull request #3372 from NickeZ/vs-sol-foldersJussi Pakkanen1-20/+68
Use visual studio solution directories
2018-04-18Fix using object extracted from a unity buildXavier Claessens1-1/+1
- determine_ext_objs: What matters is if extobj.target is a unity build, not if the target using those objects is a unity build. - determine_ext_objs: Return one object file per compiler, taking into account generated sources. - object_filename_from_source: No need to special-case unity build, it does the same thing in both code paths. - check_unity_compatible: For each compiler we must extract either none or all its sources, taking into account generated sources.
2018-04-17Use visual studio solution directoriesNiklas Claesson1-17/+65
This implements support for visual studio solution directories. Projects will by default be put into directories that map their sub-directory name in the source folder. No directories are created if `--layout=flat` is used. Fixes: #2524
2018-04-17Fix vs flat layout bugNiklas Claesson1-4/+4
2018-04-17Merge pull request #1852 from QuLogic/openmpJussi Pakkanen1-3/+12
Add an OpenMP dependency.
2018-04-17Open build files with utf-8Nirbheek Chauhan1-3/+3
2018-04-17Add an OpenMP dependency.Elliott Sales de Andrade1-3/+12
This works similarly to the thread dependency which stores the various inconsistent flags in each compiler.
2018-04-08VS backend: dedup AdditionalDependenciesPaul I1-1/+2
2018-03-25Merge pull request #2976 from dzabraev/fix-reversed-orderJussi Pakkanen1-1/+2
Fix bug include_directories(['p1','p2']) add -Ip2 -Ip1 (reversed order)
2018-03-23Enable b_ndebug on VisualStudioCCompilerAleksey Filippov1-1/+1
2018-03-15Use target.get_id() instead of basename and type_suffix concatenation at ↔Aleksey Filippov1-0/+1
call site Fixes the bug with flat layout and identical target names in subprojects. Without this change directories are not created with subproject prefix and they can collide. Remove dead makedirs code in Backend.__init__(), during initialization of backend build.targets is empty. Create output directories in Vs2010Backend.generate_projects() instead. Also use double blank line in run_unittests.py according to https://www.python.org/dev/peps/pep-0008/#blank-lines.
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-02-11keep include paths orderMaxim Dzabraev1-1/+2
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
2018-01-13Merge pull request #2764 from mesonbuild/generatorpathJussi Pakkanen1-2/+3
Generator outputs can have path segments
2018-01-07Modify exception raised when msvc pch is badly specifiedChristophe Gouiran1-1/+1
2018-01-06Fix MSVC backend crashes when `c_pch` or `cpp_pch` is not an arrayChristophe Gouiran1-14/+22
2017-12-30Fail Visual Studio version detection if VSINSTALLDIR is not setGabrĂ­el ArthĂșr PĂ©tursson1-4/+3
The Visual Studio Developer Command Prompt always sets the VSINSTALLDIR environment variable. If not, we probably have a broken environment and won't get very far anyway.
2017-12-21Fix Windows.Jussi Pakkanen1-2/+3
2017-12-18Can declare file generation in one dir and use the output in another.Jussi Pakkanen1-1/+1
2017-12-02custom target: Consider all build depends while serializingNirbheek Chauhan1-0/+3
Currently, we only consider the build depends of the Executable being run when serializing custom targets. However, this is not always sufficient, for example if the executable loads modules at runtime or if the executable is actually a python script that loads a built module. For these cases, we need to set PATH on Windows correctly or the custom target will fail to run at build time complaining about missing DLLs.
2017-11-30VS: Add /DEBUG to linker to generate debug informationNiklas Claesson1-3/+7
2017-11-21Review fixes.Jussi Pakkanen1-2/+2
2017-11-20Replaced sys.executable use with the mesonlib equivalent.Jussi Pakkanen1-4/+5
2017-10-01Merge pull request #2313 from dcbaker/fix-2180Jussi Pakkanen1-11/+30
link_whole should be considered a source for targets
2017-09-30vs: Fix link_whole usage with the vs backendNirbheek Chauhan1-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.
2017-09-30vs: Fix detection of options vs libraries in link argsNirbheek Chauhan1-0/+2
2017-09-30vs: Add a helper for adding a project referenceNirbheek Chauhan1-3/+7
2017-09-29Implement capture for generatorsNiklas Claesson1-0/+10
2017-09-27Allow CustomTarget's to be indexedDylan Baker1-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
2017-09-22Merge pull request #2357 from LukeShu/flake8Jussi Pakkanen1-5/+2
Bring into compliance with flake8
2017-09-21flake8: Clean up complained-about unused importsLuke Shumaker1-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 ".".
2017-09-21flake8: Perform suggested whitespace/formatting changesLuke Shumaker1-4/+2
This only touches newlines, spaces, and (occaisionally) commas. Anything else is left for another commit.
2017-09-20Add @PLAINNAME@ and @BASENAME@ to arguments argument for GeneratorNiklas Claesson1-1/+1
Fixes #1282
2017-09-12Merge pull request #1943 from QuLogic/duplicate-namesJussi Pakkanen1-33/+1
Fix creation of objects with duplicate names
2017-09-11backends: Add custom target inc dirs before target inc dirsNirbheek Chauhan1-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.
2017-08-18Make all functionality invokable via the main Meson binary,Jussi Pakkanen1-13/+6
which can be a Windows .exe file.
2017-08-14Remove VS implementation of object name resolver.Elliott Sales de Andrade1-33/+1
The upstream one should work properly now, one hopes.
2017-08-14Use "meson test" in test invocations so it will not print the deprecation ↔Jussi Pakkanen1-1/+2
warning.
2017-08-05Add option to disable implicit include directories. Closes #2139.Jussi Pakkanen1-3/+7
2017-07-20Support implibs for executables on WindowsJon Turney1-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)
2017-06-12Preserve -L -l pairings fetched from external depsNirbheek Chauhan1-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
2017-06-09vs: Always check VSINSTALLDIR in case VisualStudioVersion is unsetNirbheek Chauhan1-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
2017-06-08fix WarningLevel in vcxproj #1913Bug1-3/+3
- VS 2010-2015 expect <WarningLevel> to be inside <ClCompile> - WarningLevel now correctly reflects VisualStudioCCompiler.get_warn_args
2017-05-21Fix cross environment pollution.Ole André Vadla RavnÄs1-8/+10
Environment variables like CFLAGS and LDFLAGS should not affect the cross environment. Fixes #1772
2017-05-09vs: surround project guid with '{}'Nicolas Schneider1-4/+4
Closes #1672.