Skip to content

Commit 1a155e2

Browse files
(#14018) hdf5: allow usage of native built for cross
Signed-off-by: Pavel Boldin <[email protected]>
1 parent b41fefd commit 1a155e2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

recipes/hdf5/all/conanfile.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@ def requirements(self):
8080
self.requires("openmpi/4.1.0")
8181

8282
def validate(self):
83-
if hasattr(self, "settings_build") and tools.cross_building(self, skip_x64_x86=True):
84-
# While building it runs some executables like H5detect
85-
raise ConanInvalidConfiguration("Current recipe doesn't support cross-building (yet)")
8683
if self.options.parallel:
8784
if self.options.enable_cxx:
8885
raise ConanInvalidConfiguration("Parallel and C++ options are mutually exclusive")
@@ -92,6 +89,11 @@ def validate(self):
9289
not self.options["szip"].enable_encoding:
9390
raise ConanInvalidConfiguration("encoding must be enabled in szip dependency (szip:enable_encoding=True)")
9491

92+
def validate_build(self):
93+
if hasattr(self, "settings_build") and tools.cross_building(self, skip_x64_x86=True):
94+
# While building it runs some executables like H5detect
95+
raise ConanInvalidConfiguration("Current recipe doesn't support cross-building (yet)")
96+
9597
def source(self):
9698
tools.get(**self.conan_data["sources"][self.version], destination=self._source_subfolder, strip_root=True)
9799

0 commit comments

Comments
 (0)