Commit Graph

18 Commits

Author SHA1 Message Date
Daniel Mensinger 45c5300496 cmake: Fix old style dependency lookup with imported targets
This also includes some refactoring, since the alternaticve would
have been to duplicate the huge traceparser target code block again.

fixes #9581
2021-12-01 21:03:36 +02:00
Crend King 809792c223 Support Visual Studio 2022 backend 2021-11-21 08:08:11 -05:00
fanc999 edfe24178d
Add Visual Studio 2012/2013 backends (#8803)
* backends: Add a Visual Studio 2013 backend

This is more-or-less a quick port from the VS2015 backend, except that
we update the Visual Studio version strings and toolset versions
accordingly.  Also correct the generator string for Visual Studio 2015
in mesonbuild/cmake/common.py.

* backend: Add VS2012 backend

Similar to what we did for Visual Studio 2013, add a Visual Studio 2012
backend.

* vs2010backend.py: Implement `link_whole:` if needed

We actually need Visual Studio 2015 Update 2 to use `/WHOLEARCHIVE:`,
which is what we are currently using for `link_whole:` on Visual Studio.
For Visual Studio versions before that, we need to expand from the
static targets that were indicated by `link_whole:`, and any of the
sub-dependent targets that were pulled in via the dependent target's
`link_whole:`.  This wil ensure `link_whole:` would actually work in
such cases.

* vs2010backend.py: Handle objects from generated sources

Unforunately, we can't use backends.determine_ext_objs() reliably, as
the Visual Studio backends handle this differently.

* vs2010backend.py: Fix generating VS2010 projects

Visual Studio 2010 (at least the Express Edition) does not set the envvar
%VisualStudioVersion% in its command prompt, so fix generating VS2010
projects by taking account into this, so that we can determine the location
of vcvarsall.bat correctly.

* whole archive test: Disable on vs2012/2013 backends too

The Visual Studio 2012/2013 IDE has problems handling the items that would be
generated from this test case, so skip this test when using
--backend=vs[2012|2013].  This test does work for the Ninja backend when
VS2012 or VS2013 is used, though.

Consolidate this error message with XCode along with the vs2010 backend.

* docs: Add the new vs2012 and vs2013 backends

Let people know that we have backends for vs2012 and 2013.  Also let
people know that generating Visual Studio 2010 projects have been fixed
and the pre-vs2015 backends now handle the `link_whole:` project option.
2021-06-22 21:00:23 +03:00
Daniel Mensinger 9b5463681e
cmake: select correct generator in toolchain.py 2021-05-30 16:33:09 +02:00
Eli Schwartz 6a0fabc647
mass rewrite of string formatting to use f-strings everywhere
performed by running "pyupgrade --py36-plus" and committing the results
2021-03-04 17:16:11 -05:00
Dylan Baker f6672c7a19 use real pathlib module
We added the _pathlib module to work around defeciencies in python 3.5's
implementation, since we now rely on 3.6 lets drop this
2020-11-20 15:08:40 -08:00
Daniel Mensinger 36cde6f91e
cmake: Ignore additional internal CMake variables 2020-10-16 22:43:20 +02:00
Daniel Mensinger 5f1da86a9b
cmake: ignore CMAKE_TOOLCHAIN_FILE and CMAKE_PROJECT_INCLUDE to avoid conflicts with the meson CMake logic 2020-10-16 20:44:04 +02:00
Daniel Mensinger 7e58f33376
cmake: Add cross compilation support 2020-10-13 17:04:19 +02:00
Daniel Mensinger 1dfaccfd91 pathlib: Fix resolve() by overriding it in Python 3.5 2020-10-04 10:45:48 +02:00
Daniel Mensinger 77b5c82d07 cmake: switch to pathlib (fixes #7322) 2020-10-04 10:45:48 +02:00
Daniel Mensinger 6a71391de6
typing: fully annotate cmake.common 2020-09-27 20:56:09 +02:00
Daniel Mensinger a2f94ca18b
cmake: Add more advanced subproject configuration options
This is done with the new cmake subprojects options object
that is similar to the already exisiting configuration data
object. It is consumed by the new `options` kwarg of the
cmake.subproject function.
2020-06-05 11:45:05 +02:00
Daniel Mensinger 09b53c534f types: import typing as T (fixes #6333) 2020-01-08 15:28:17 +01:00
Daniel Mensinger 3e1435a968
cmake: Handle CMake system include dirs (closes #6079) 2019-11-19 13:08:17 +01:00
Daniel Mensinger 4ec82040c8
cmake: Comment out unused variables 2019-10-20 12:04:15 +02:00
Daniel Mensinger b2c89e6f87
cmake: Move CMake API classes to common 2019-10-20 12:04:15 +02:00
Daniel Mensinger 8d3bd6eea8
cmake: Server handshake 2019-06-06 18:27:01 +02:00