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

fixing docstrings for cppstd #16341

Merged
merged 1 commit into from
May 27, 2024
Merged
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
22 changes: 4 additions & 18 deletions conan/tools/build/cppstd.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@ def check_min_cppstd(conanfile, cppstd, gnu_extensions=False):
In case the current cppstd doesn't fit the minimal version required
by cppstd, a ConanInvalidConfiguration exception will be raised.

1. If settings.compiler.cppstd, the tool will use settings.compiler.cppstd to compare
2. It not settings.compiler.cppstd, the tool will use compiler to compare (reading the
default from cppstd_default)
3. If not settings.compiler is present (not declared in settings) will raise because it
cannot compare.
4. If can not detect the default cppstd for settings.compiler, a exception will be raised.
settings.compiler.cppstd must be defined, otherwise ConanInvalidConfiguration is raised

:param conanfile: The current recipe object. Always use ``self``.
:param cppstd: Minimal cppstd version required
Expand All @@ -31,12 +26,7 @@ def check_max_cppstd(conanfile, cppstd, gnu_extensions=False):
In case the current cppstd doesn't fit the maximum version required
by cppstd, a ConanInvalidConfiguration exception will be raised.

1. If settings.compiler.cppstd, the tool will use settings.compiler.cppstd to compare
2. It not settings.compiler.cppstd, the tool will use compiler to compare (reading the
default from cppstd_default)
3. If not settings.compiler is present (not declared in settings) will raise because it
cannot compare.
4. If can not detect the default cppstd for settings.compiler, a exception will be raised.
settings.compiler.cppstd must be defined, otherwise ConanInvalidConfiguration is raised

:param conanfile: The current recipe object. Always use ``self``.
:param cppstd: Maximum cppstd version required
Expand Down Expand Up @@ -126,12 +116,7 @@ def _check_cppstd(conanfile, cppstd, comparator, gnu_extensions):
In case the current cppstd doesn't fit the maximum version required
by cppstd, a ConanInvalidConfiguration exception will be raised.

1. If settings.compiler.cppstd, the tool will use settings.compiler.cppstd to compare
2. It not settings.compiler.cppstd, the tool will use compiler to compare (reading the
default from cppstd_default)
3. If not settings.compiler is present (not declared in settings) will raise because it
cannot compare.
4. If can not detect the default cppstd for settings.compiler, a exception will be raised.
settings.compiler.cppstd must be defined, otherwise ConanInvalidConfiguration is raised

:param conanfile: The current recipe object. Always use ``self``.
:param cppstd: Required cppstd version.
Expand Down Expand Up @@ -257,6 +242,7 @@ def _mcst_lcc_supported_cppstd(version):

return ["98", "gnu98", "11", "gnu11", "14", "gnu14", "17", "gnu17", "20", "gnu20"]


def _qcc_supported_cppstd(version):
"""
[98, gnu98, 11, gnu11, 14, gnu14, 17, gnu17]
Expand Down