Skip to content

Commit 2ffc00b

Browse files
authored
azure-sdk-for-cpp: allow macos and clang in conanfile (#26911)
* allow macos and clang in conanfile * add appleclang separately after testing on mac
1 parent 62d2d8f commit 2ffc00b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

recipes/azure-sdk-for-cpp/all/conanfile.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,18 @@ def validate(self):
5151
check_min_cppstd(self, 14)
5252

5353
# Open to contributions for windows and apple
54-
if self.settings.os != "Linux":
54+
if self.settings.os != "Linux" and self.settings.os != "Macos":
5555
raise ConanInvalidConfiguration(
5656
f"{self.ref} Conan recipe in ConanCenter still does not support {self.settings.os}, contributions to the recipe welcome.")
5757

58-
if self.settings.compiler != "gcc":
58+
if self.settings.compiler != "gcc" and self.settings.compiler != "clang" and self.settings.compiler != "apple-clang":
5959
raise ConanInvalidConfiguration(
6060
f"{self.ref} Conan recipe in ConanCenter still does not support {self.settings.compiler}, contributions to the recipe welcome.")
6161

6262
if self.settings.compiler == 'gcc' and Version(self.settings.compiler.version) < "6":
6363
raise ConanInvalidConfiguration("Building requires GCC >= 6")
64+
if (self.settings.compiler == 'clang' or self.settings.compiler == "apple-clang") and Version(self.settings.compiler.version) < "10":
65+
raise ConanInvalidConfiguration("Building requires Clang >= 10")
6466

6567
def generate(self):
6668
tc = CMakeToolchain(self)
@@ -77,6 +79,7 @@ def generate(self):
7779
tc.cache_variables["BUILD_WINDOWS_UWP"] = "ON"
7880
tc.cache_variables["DISABLE_AZURE_CORE_OPENTELEMETRY"] = "ON"
7981
tc.cache_variables["BUILD_TRANSPORT_CURL"] = "ON"
82+
tc.cache_variables["WARNINGS_AS_ERRORS"] = "OFF"
8083
tc.generate()
8184

8285
deps = CMakeDeps(self)

0 commit comments

Comments
 (0)