summaryrefslogtreecommitdiff
path: root/mesonbuild/backend/vs2010backend.py
Commit message (Collapse)AuthorAgeFilesLines
* Visual studio: Generate vcxproj.filters files to adds filters to imitated ↵Renan Lavarec2023-05-031-0/+62
| | | | directories to navigate more easily in the source files.
* backend/vs: Fix OpenMPSupportJosh Soref2023-04-111-2/+2
| | | | | | | | https://learn.microsoft.com/en-us/visualstudio/msbuild/cl-task?view=vs-2022 Found by https://www.check-spelling.dev/ Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* fix various spelling issuesJosh Soref2023-04-111-1/+1
| | | | Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
* Change "can not" to "cannot" throughout projectHiPhish2023-04-111-1/+1
| | | | | The word "cannot" expresses inability to do something whereas "can not" expresses the ability to refrain from doing something.
* backend/vs: ensure that build dir is preferred to src dirBarnabás Pőcze2023-03-301-1/+2
| | | | | | | | | | | | Previously, the VS backend would add the the include directories in the reverse order that the Ninja backend does it, which means that the source directories would be preferred over the build directories. For example, this would cause the compiler to choose the file from the source directory if a file with the same name is found in both. Fixes 57ec097b5 ("vs: Use CompilerArgs() for compile and link args") Fixes #11630
* backends: simplify class setupEli Schwartz2023-03-201-1/+3
|
* backends: Stop passing generator exes to ExecutableSerialisation as stringsDylan Baker2023-01-101-4/+2
| | | | | | | | | | | | | | | | The code below this already handles being passed an Executable or ExternalProgram, and it does it correctly, since it handles host binaries that need an exe_wrapper correctly, while the code in the generator paths doesn't. The xcode backend is, like always, problematic, it doesn't handle things the same way as the ninja and vscode backends, and generates a shell script instead of using meson as a wrapper when needed (it seems likely that just forcing the meson path for xcode would be better). I don't have a working mac to develop a fix for, so I've left a todo comment there. Fixes: #11264
* pylint: enable the set_membership pluginDylan Baker2022-11-301-2/+2
| | | | | | | | | | | | Which adds the `use-set-for-membership` check. It's generally faster in python to use a set with the `in` keyword, because it's a hash check instead of a linear walk, this is especially true with strings, where it's actually O(n^2), one loop over the container, and an inner loop of the strings (as string comparison works by checking that `a[n] == b[n]`, in a loop). Also, I'm tired of complaining about this in reviews, let the tools do it for me :)
* Fix options overrides for vsbackendDenis Fortin2022-11-101-1/+1
| | | | | Use OptionOverrideProxy instead of pure options. Closes #10393
* vs backend: Add support for CompileTargetXavier Claessens2022-10-231-0/+19
| | | | | | | Since vs backend only support the C compiler, everything else are custom targets. Convert CompileTarget into a Generator to reuse existing code. This will be useful in the future to support transpilers, and assemblers.
* fix: don't set FavorSizeOrSpeed in vs backend if optimization disabled (/Od ↵Luke Elliott2022-10-131-1/+2
| | | | | | set). Debugging is broken with clang-cl when FavorSizeOrSpeed is set.
* pylint: enable consider-merging-isinstanceDylan Baker2022-10-041-1/+1
|
* Add cross-compile support for Microsoft GDK platformsCaleb Cornett2022-09-291-2/+9
|
* compilers: Cleanup a bit languages/suffixes listsXavier Claessens2022-09-271-2/+2
| | | | | Use set where order does not matter, fix is_source() to really mean only source suffixes.
* Fix including headers from another drive on VS backendVili Väinölä2022-09-201-2/+6
| | | | | | Include paths to different drives as absolute paths fixes #8329
* pylint: enable consider-using-inDylan Baker2022-09-191-4/+4
|
* pylint: enable consider-using-dict-itemsDylan Baker2022-09-191-5/+4
| | | | Which found a couple of places where we could write better code.
* vs: Fix CustomBuild contents.Andres Freund2022-09-091-9/+9
| | | | | | | %% survived into the output since 038b31e72bc02f0a9b. That failed to fail, at least in the common cases, because the whole command sequence is unnecessary / redundant - it appears to come from cmake, which executes multiple commands within a single CustomBuild element.
* backend/ninja: properly track objects extracted from fortran sourcesDylan Baker2022-08-241-1/+1
| | | | | | We need this to ensure that .mod files are created before we start compiling, and to ensure that the proper include directory arguments are generated.
* add missing lower() to fix msvc backend platform detectionTad Young2022-06-261-1/+1
| | | | | | | | | | Regardless of which MachineChoice we base the platform on, we compare its value to lowercased identifiers. So we need to lowercase the targetplatform too... but we only did so sometimes. This broke e.g. on "Win32", but only when *not* doing a cross build. Fixes #10539
* take override_option('unity=...') into account when allowing extract_objects()Paolo Bonzini2022-06-141-1/+1
| | | | | | | | | A single target could be picked for unity build, and in that case extract_objects() should not be allowed. Likewise for the opposite case, where extract_objects() should be allowed if unity build is disabled for a single target. A test that covers that case is added later.
* ninja backend: generate additional meta-rules for test/benchmarks targetsEli Schwartz2022-06-131-0/+1
| | | | | | | | | | 'meson-test-prereq' now depends on any targets that were formerly added directly to 'all'. Behavior is not changed -- the all target still depends on this other meta-rule, and thus indirectly depends on all targets it used to depend on. It is now possible to build just the targets needed for the testsuite and then e.g. run `meson test --no-rebuild`.
* treewide: various cleanups to move imports for mypy into typechecking blocksEli Schwartz2022-06-101-1/+3
| | | | Along the way, add __future__ annotations where lacking.
* build: Store depends in GeneratedList instead of GeneratorDylan Baker2022-06-081-2/+6
| | | | | | | | | | | Since they are actually dependencies out the output not the Generator itself. This fixes dependency issues in the ninja backend, allowing Meson to rebuild more accurately. It also does sometimes in the vs backend, but there are problems in the vs backend I'm not sure how to solve. The vsbackend is, itself, so fragile looking I don't want to get too involved with it.
* backend/vs: "fix" handling of CustomTarget dependenciesDylan Baker2022-06-081-3/+6
| | | | | | | This doesn't actually fix the problem, but it provides parity with what is currently happening. I don't have access to a Windows machine to further debug, however, so not breaking anything is the best I can do ATM.
* Fix that VS backend respects "console" keyword in custom_targetVili Väinölä2022-05-311-1/+2
| | | | | Previously the output of the custom target was always captured and it was not possible to see the output unless build failed.
* Replace backend.get_option_for_target() with target.get_option()Xavier Claessens2022-03-291-3/+3
| | | | | | That method had nothing specific to the backend, it's purely a Target method. This allows to cache the OptionOverrideProxy object on the Target instance instead of creating a new one for each option lookup.
* backends: Stop separating base and compiler optionsXavier Claessens2022-03-221-1/+1
| | | | | Since OptionKey is used we can mix all options together in a single dictionary. That's already what we do in coredata.options.
* Fix '# Visual Studio <>' comment in sln files with VS backendLuke Elliott2021-11-271-4/+7
| | | | such that Visual Studio Version Selector works.
* Stop backend_startup_project from erasing the last project in a VS solutionLuke Elliott2021-11-251-1/+1
| | | | if it is not the specified project.
* Support Visual Studio 2022 backendCrend King2021-11-211-0/+4
|
* Run pylintGustavoLCR2021-11-211-28/+36
|
* Fix vs backend cross compilation regressionGustavoLCR2021-11-211-6/+15
|
* Move language standard in separate method within vsbackendMoroz Oleg2021-11-021-9/+4
|
* Fixes .vcxproj for vs2017 vs2019Олег Мороз2021-11-021-0/+9
| | | | | | fixes #6314 in case of backend is vs2017 or vs2019 place LanguageStandard tag with stdcpp version and LanguageStandard_C tag with stdc version in .vcxproj file
* various manual conversion of percent-formatted strings to f-stringsEli Schwartz2021-11-011-11/+10
|
* fix typoed vs backend tokenEli Schwartz2021-11-011-1/+1
|
* Fix typos discovered by codespellChristian Clauss2021-10-101-1/+1
|
* backend/vs: Parallelize compilation inside one project.Andres Freund2021-10-081-0/+1
| | | | | | | | | | UseMultiToolTask allows parallelism inside a project, without requiring cl.exe internal multi-threading (which meson generated projects currently can't use, mainly due to specifying output filenames for each object). TODO: - think about making behaviour conditional on msbuild version / add comment why not
* backend/vs: Deduplicate basic project template.Andres Freund2021-10-081-171/+61
| | | | | Note that a few minor details of the output changed for some target types. I think I called them out with XXXs in the code for now.
* backend/vs: Name pch pdb files to avoid naming & lock conflicts.Andres Freund2021-10-081-0/+7
|
* backend/vs: Move Microsoft.Cpp.props to before ItemDefinitionGroup.Andres Freund2021-10-081-2/+3
| | | | | | | | | The main reason for this move is to make it easier to merge the copies of project generation. But as far as I can tell, the Microsoft.Cpp.props import also belongs before the ItemDefinitionGroup. Originally the order seems to have been that way, but 431a9ea664 changed it in the course of other changes.
* backend/vs: process link dependencies.Andres Freund2021-10-041-0/+10
| | | | Partially-Fixes: #1799
* remove useless variables that are no longer or were never usedEli Schwartz2021-10-041-1/+0
|
* backends/vs: Set ObjectFileName for generated sources.Andres Freund2021-09-201-0/+3
| | | | | | | | | When a static library B to a static library A with generated sources, B directly references the object file corresponding to the generated source in A. For that reference in B object_filename_from_source() is used. But A did not specify the object file name, ending up with cl.exe's default. Fixes: #9235
* backends/vs: Do not emit dummy command for alias_command().Andres Freund2021-09-141-11/+19
| | | | | | | | | Alias commands did not work with the vs backend, due to trying to access target.command[0] with an empty command. Fix this by just not emitting a CustomBuild node for alias targets - the project references are enough to trigger the necessary actions. Fixes: #9247
* pyllint: enable consider-user-enumerateDylan Baker2021-08-311-2/+1
| | | | | | | | | | | | | | | | | | | | | | This caught a couple of cases of us doing: ```python for i in range(len(x)): v = x[i] ``` which are places to use enumerate instead. It also caught a couple of cases of: ```python assert len(x) == len(y) for i in range(len(x)): xv = x[i] yv = y[i] ``` Which should instead be using zip() ```python for xv, yv in zip(x, y): ... ```
* pylint: turn on superflous-parensDylan Baker2021-08-311-1/+1
| | | | | | | | We have a lot of these. Some of them are harmless, if unidiomatic, such as `if (condition)`, others are potentially dangerous `assert(...)`, as `assert(condtion)` works as expected, but `assert(condition, message)` will result in an assertion that never triggers, as what you're actually asserting is `bool(tuple[2])`, which will always be true.
* backends: remove unused name parameter from as_meson_exe_cmdlineDylan Baker2021-08-201-3/+2
| | | | This parameter isn't used, at all, so just remove it
* backends/vs: add a missing annotationDylan Baker2021-08-201-1/+1
|