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 build modules per generator in cpp_info #1986

Merged
merged 1 commit into from
Jan 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions reference/conanfile/attributes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -939,8 +939,9 @@ This object should be filled in ``package_info()`` method.
+--------------------------------------+---------------------------------------------------------------------------------------------------------+
| self.cpp_info.system_libs | Ordered list with the system library names. Defaulted to ``[]`` (empty) |
+--------------------------------------+---------------------------------------------------------------------------------------------------------+
| self.cpp_info.build_modules | | List of relative paths to build system related utility module files created by the package. Used by |
| | | CMake generators to export *.cmake* files with functions for consumers. Defaulted to ``[]`` (empty) |
| self.cpp_info.build_modules | | Dictionary of lists per generator containing relative paths to build system related utility module |
| | | files created by the package. Used by CMake generators to export *.cmake* files with functions for |
| | | consumers. Defaulted to ``{}`` (empty) |
+--------------------------------------+---------------------------------------------------------------------------------------------------------+
| self.cpp_info.components | | **[Experimental]** Dictionary with different components a package may have: libraries, executables... |
| | | **Warning**: Using components with other ``cpp_info`` non-default values or configs is not supported |
Expand Down
6 changes: 3 additions & 3 deletions reference/conanfile/methods.rst
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ The :ref:`cpp_info_attributes_reference` attribute has the following properties
self.cpp_info.resdirs = ['res'] # Directories where resources, data, etc. can be found
self.cpp_info.bindirs = ['bin'] # Directories where executables and shared libs can be found
self.cpp_info.srcdirs = [] # Directories where sources can be found (debugging, reusing sources)
self.cpp_info.build_modules = [] # Build system utility module files
self.cpp_info.build_modules = {} # Build system utility module files
self.cpp_info.defines = [] # preprocessor definitions
self.cpp_info.cflags = [] # pure C flags
self.cpp_info.cxxflags = [] # C++ compilation flags
Expand Down Expand Up @@ -249,8 +249,8 @@ The :ref:`cpp_info_attributes_reference` attribute has the following properties
- **srcdirs**: List of relative paths (starting from the package root) of directories in which to find sources (like
.c, .cpp). By default it is empty. It might be used to store sources (for later debugging of packages, or to reuse those sources building
them in other packages too).
- **build_modules**: List of relative paths to build system related utility module files created by the package. Used by CMake generators to
include *.cmake* files with functions for consumers. e.g: ``self.cpp_info.build_modules.append("cmake/myfunctions.cmake")``. Those files
- **build_modules**: Dictionary of lists per generator containing relative paths to build system related utility module files created by the package. Used by CMake generators to
include *.cmake* files with functions for consumers. e.g: ``self.cpp_info.build_modules["cmake_find_package"].append("cmake/myfunctions.cmake")``. Those files
will be included automatically in `cmake`/`cmake_multi` generators when using `conan_basic_setup()` and will be automatically added in
`cmake_find_package`/`cmake_find_package_multi` generators when `find_package()` is used.
- **defines**: Ordered list of preprocessor directives. It is common that the consumers have to specify some sort of defines in some cases,
Expand Down