Skip to content

Commit

Permalink
(conan-io#14834) opentelemetry-cpp: support arm architecture
Browse files Browse the repository at this point in the history
* relax validate logic for no intel arch

* add protobuf as tool_requires

* add grpc to build_requires

* use dependenies

Co-authored-by: Uilian Ries <uilianries@gmail.com>

Co-authored-by: Uilian Ries <uilianries@gmail.com>
  • Loading branch information
2 people authored and franramirez688 committed Jan 20, 2023
1 parent a28011f commit 731686d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions recipes/opentelemetry-cpp/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,20 @@ def requirements(self):
self.requires("boost/1.80.0")

def validate(self):
if self.info.settings.arch != "x86_64":
raise ConanInvalidConfiguration(f"{self.ref} doesn't support architecture : {self.info.settings.arch}")

if self.info.settings.compiler.cppstd:
check_min_cppstd(self, self._minimum_cpp_standard)
check_min_vs(self, "192")

if self.settings.os != "Linux" and self.options.shared:
raise ConanInvalidConfiguration(f"{self.ref} supports building shared libraries only on Linux")

if not self.dependencies["grpc"].options.cpp_plugin:
raise ConanInvalidConfiguration(f"{self.ref} requires grpc with cpp_plugin=True")

def build_requirements(self):
self.tool_requires("protobuf/3.21.4")
self.tool_requires("grpc/1.50.1")

def _create_cmake_module_variables(self, module_file):
content = textwrap.dedent("""\
set(OPENTELEMETRY_CPP_INCLUDE_DIRS ${opentelemetry-cpp_INCLUDE_DIRS}
Expand Down

0 comments on commit 731686d

Please sign in to comment.