Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs for new msbuilddeps transitivity #2052

Merged
merged 2 commits into from Mar 30, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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