Skip to content

Commit

Permalink
samarium: add non-x86 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Nov 13, 2024
1 parent 0238f37 commit 7f582db
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion recipes/samarium/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from conan.errors import ConanInvalidConfiguration
from conan.tools.build import check_min_cppstd
from conan.tools.cmake import CMake, cmake_layout, CMakeToolchain, CMakeDeps
from conan.tools.files import copy, get, save
from conan.tools.files import copy, get, save, replace_in_file
from conan.tools.scm import Version

required_conan_version = ">=1.47.0"
Expand Down Expand Up @@ -97,6 +97,10 @@ def generate(self):
def _patch_sources(self):
# Force-disable all tests
save(self, os.path.join(self.source_folder, "test", "CMakeLists.txt"), "")
# Disable SSE4.1 for non-x86 architectures
if self.settings.arch not in ["x86", "x86_64"]:
replace_in_file(self, os.path.join(self.source_folder, "src", "CMakeLists.txt"),
"-msse4.1;-mpclmul;", "")

def build(self):
self._patch_sources()
Expand Down

0 comments on commit 7f582db

Please sign in to comment.