diff --git a/conan/cli/cli.py b/conan/cli/cli.py index 27b2f90b714..1b71c0e599d 100644 --- a/conan/cli/cli.py +++ b/conan/cli/cli.py @@ -179,8 +179,7 @@ def _conan2_migrate_recipe_msg(exception): error = "*********************************************************\n" \ f"Recipe '{pkg}' seems broken.\n" \ f"It is possible that this recipe is not Conan 2.0 ready\n"\ - "If the recipe comes from ConanCenter check: \n" \ - "https://github.com/conan-io/conan-center-index/blob/master/docs/v2_migration.md\n" \ + "If the recipe comes from ConanCenter check: https://conan.io/cci-v2.html\n" \ "If it is your recipe, check it is updated to 2.0\n" \ "*********************************************************\n" ConanOutput().writeln(error, fg=Color.BRIGHT_MAGENTA) @@ -190,8 +189,7 @@ def _conan2_migrate_recipe_msg(exception): error = "*********************************************************\n" \ f"Recipe '{pkg}' cannot build its binary\n" \ f"It is possible that this recipe is not Conan 2.0 ready\n" \ - "If the recipe comes from ConanCenter check: \n" \ - "https://github.com/conan-io/conan-center-index/blob/master/docs/v2_migration.md\n" \ + "If the recipe comes from ConanCenter check: https://conan.io/cci-v2.html\n" \ "If it is your recipe, check it is updated to 2.0\n" \ "*********************************************************\n" ConanOutput().writeln(error, fg=Color.BRIGHT_MAGENTA) diff --git a/conan/cli/commands/profile.py b/conan/cli/commands/profile.py index 8779b6de43f..2d3b67c4d71 100644 --- a/conan/cli/commands/profile.py +++ b/conan/cli/commands/profile.py @@ -67,8 +67,11 @@ def profile_detect(conan_api, parser, subparser, *args): detected_profile_cli_output(detected_profile) contents = detected_profile.dumps() ConanOutput().warning("This profile is a guess of your environment, please check it.") + if detected_profile.settings.get("os") == "Macos": + ConanOutput().warning("Defaulted to cppstd='gnu17' for apple-clang.") ConanOutput().warning("The output of this command is not guaranteed to be stable and can " - "change in future Conan versions") + "change in future Conan versions.") + ConanOutput().warning("Use your own profile files for stability.") ConanOutput().success(f"Saving detected profile to {profile_pathname}") save(profile_pathname, contents) diff --git a/conans/client/conf/detect.py b/conans/client/conf/detect.py index 543fad274ff..2be8f4e133c 100644 --- a/conans/client/conf/detect.py +++ b/conans/client/conf/detect.py @@ -228,6 +228,9 @@ def _detect_compiler_version(result): if compiler != "msvc": cppstd = _cppstd_default(compiler, version) + if compiler == "apple-clang" and version >= "11": + # forced auto-detection, gnu98 is too old + cppstd = "gnu17" result.append(("compiler.cppstd", cppstd)) @@ -375,7 +378,7 @@ def _cppstd_default(compiler, compiler_version): assert isinstance(compiler_version, Version) default = {"gcc": _gcc_cppstd_default(compiler_version), "clang": _clang_cppstd_default(compiler_version), - "apple-clang": "gnu98", # Confirmed in apple-clang 9.1 with a simple "auto i=1;" + "apple-clang": "gnu98", "msvc": _visual_cppstd_default(compiler_version), "mcst-lcc": _mcst_lcc_cppstd_default(compiler_version)}.get(str(compiler), None) return default