Skip to content

Commit

Permalink
- add docs for tools.stdcpp_library (conan-io#1714)
Browse files Browse the repository at this point in the history
* - add docs for tools.stdcpp_library

Signed-off-by: SSE4 <[email protected]>

* Update tools.rst

* Update reference/tools.rst

Co-authored-by: Javier G. Sogo <[email protected]>

Co-authored-by: Javier G. Sogo <[email protected]>
  • Loading branch information
SSE4 and jgsogo authored Jun 2, 2020
1 parent 832915f commit 120b584
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions reference/tools.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1747,3 +1747,21 @@ for ``compiler.cppstd=17``, and so on.
Parameters:
- **settings** (Required): Conanfile settings. Use ``self.settings``.
.. _tools.stdcpp_library:
tools.stdcpp_library():
-----------------------
.. code-block:: python
def stdcpp_library(conanfile)
Returns the corresponding C++ standard library to link with based on the settings of the given conanfile. For instance, it may return ``c++`` for ``compiler.libcxx=libc++``,
and it may return ``stdc++`` for ``compiler.libcxx=libstdc++`` or ``compiler.libcxx=libstdc++11``. Returns ``None`` if there is no C++ standard library
need to be linked. Usually, this is required to populate ``self.cpp_info.system_libs`` for C++ libraries with plain C API, therefore such libraries might be
safely used in pure C projects (or in general, non-C++ projects capable of using C API, such as written in Objective-C, Fortran, etc.).
Parameters:
- **conanfile** (Required): ConanFile instance. Usually ``self``.

0 comments on commit 120b584

Please sign in to comment.