Skip to content

Commit

Permalink
docs for new msbuilddeps transitivity (#2052)
Browse files Browse the repository at this point in the history
* docs for new msbuilddeps transitivity

* fix ci

Co-authored-by: czoido <mrgalleta@gmail.com>
  • Loading branch information
memsharded and czoido committed Mar 30, 2021
1 parent 9b7a9cf commit efef620
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions reference/conanfile/tools/microsoft.rst
Expand Up @@ -64,13 +64,15 @@ above:
This is a multi-configuration generator, and will generate different files for the different Debug/Release
configuration. The above commands the following files will be generated:

- *conan_zlib_release_x64.props*: Properties file for the ``zlib`` dependency, Release config
- *conan_zlib_debug_x64.props*: Properties file for the ``zlib`` dependency, Debug config
- *conan_zlib_vars_release_x64.props*: ``Conanzlibxxxx`` variables definitions for the ``zlib`` dependency, Release config, like ``ConanzlibIncludeDirs``, ``ConanzlibLibs``, etc.
- *conan_zlib_vars_debug_x64.props*: Same ``Conanzlib``variables for ``zlib`` dependency, Debug config
- *conan_zlib_release_x64.props*: Activation of ``Conanzlibxxxx`` variables in the current build as standard C/C++ build configuration, Release config. This file contains also the transitive dependencies definitions.
- *conan_zlib_debug_x64.props*: Same activation of ``Conanzlibxxxx`` variables, Debug config, also inclusion of transitive dependencies.
- *conan_zlib.props*: Properties file for ``zlib``. It conditionally includes, depending on the configuration,
one of the above Release/Debug properties files.
- Same 3 files will be generated for every dependency in the graph, in this case ``conan_bzip.props`` too, which
one of the two immediately above Release/Debug properties files.
- Same 5 files will be generated for every dependency in the graph, in this case ``conan_bzip.props`` too, which
will conditionally include the Release/Debug bzip properties files.
- *conan_deps.props*: Properties files including all direct dependencies, in this case, it includes ``conan_zlib.props``
- *conandeps.props*: Properties files including all direct dependencies, in this case, it includes ``conan_zlib.props``
and ``conan_bzip2.props``

You will be adding the *conan_deps.props* to your solution project files if you want to depend on all the declared
Expand Down Expand Up @@ -109,6 +111,21 @@ This will manage to generate new properties files for this custom configuration,
in the IDE allows to be switching dependencies configuration like Debug/Release, it could be also
switching dependencies from static to shared libraries.

Included dependencies
+++++++++++++++++++++

``MSBuildDeps`` uses the new experimental ``self.dependencies`` access to dependencies. The following
dependencies will be translated to properties files:

- All direct dependencies, that is, the ones declared by the current ``conanfile``, that lives in the
host context: all regular ``requires``, plus the ``build_requires`` that are in the host context,
for example test frameworks as ``gtest`` or ``catch``.
- All transitive ``requires`` of those direct dependencies (all in the host context)

Then, the ``build_requires`` of build context (like ``cmake`` packages as build_requires), plus the
transitive ``build_requires`` (irrespective of the context) are not translated to properties files,
as they shouldn't be necessary for the build.


MSBuildToolchain
----------------
Expand Down

0 comments on commit efef620

Please sign in to comment.