diff --git a/conan/tools/build/cppstd.py b/conan/tools/build/cppstd.py index 01ef4d71f45..bf66fc62435 100644 --- a/conan/tools/build/cppstd.py +++ b/conan/tools/build/cppstd.py @@ -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 @@ -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 @@ -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. @@ -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]