Skip to content

Commit

Permalink
(conan-io#23231) Add use_sse option to pcl recipe
Browse files Browse the repository at this point in the history
Add use_sse option to pcl recipe to be able to disable in case of cross-compilation as for arm64.
  • Loading branch information
EstebanDugueperoux2 authored and Ahajha committed Apr 6, 2024
1 parent e685804 commit f8b9b13
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions recipes/pcl/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ class PclConan(ConanFile):
"precompile_only_core_point_types": [True, False],
# Whether to append a ''/d/rd/s postfix to executables on Windows depending on the build type
"add_build_type_postfix": [True, False],
"use_sse": [True, False],
}
default_options = {
"shared": False,
Expand Down Expand Up @@ -151,6 +152,7 @@ class PclConan(ConanFile):
# Enabled to avoid excessive memory usage during compilation in CCI
"precompile_only_core_point_types": True,
"add_build_type_postfix": False,
"use_sse": True,
}

short_paths = True
Expand Down Expand Up @@ -333,6 +335,8 @@ def export_sources(self):
def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
if self.settings.arch not in ["x86", "x86_64"]:
del self.options.use_sse

def configure(self):
if self.options.shared:
Expand Down Expand Up @@ -477,6 +481,8 @@ def generate(self):
for comp in disabled:
tc.cache_variables[f"BUILD_{comp}"] = False

tc.cache_variables["PCL_ENABLE_SSE"] = self.options.get_safe("use_sse", False)

tc.generate()

deps = CMakeDeps(self)
Expand Down

0 comments on commit f8b9b13

Please sign in to comment.