Skip to content

Commit

Permalink
make tbb respect the tbbmalloc and tbbproxy conan options
Browse files Browse the repository at this point in the history
also, now that these options can actually do something, they should be
included in the package_id

Signed-off-by: Paul Molodowitch <paul@molodowitch.com>
  • Loading branch information
pmolodo authored and jfpanisset committed Jun 26, 2023
1 parent 43b5442 commit e1b8287
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/conan/recipes/tbb/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ class TBBConan(ConanFile):
default_options = {
"shared": True,
"fPIC": True,
"tbbmalloc": False,
"tbbproxy": False,
"tbbmalloc": True,
"tbbproxy": True,
}

@property
Expand All @@ -50,13 +50,9 @@ def configure(self):
not self.options.shared or not self.options.tbbmalloc
):
raise ConanInvalidConfiguration(
"tbbproxy needs tbbmaloc and shared options"
"tbbproxy needs tbbmalloc and shared options"
)

def package_id(self):
del self.info.options.tbbmalloc
del self.info.options.tbbmalloc_proxy

def build_requirements(self):
if tools.os_info.is_windows:
if "CONAN_MAKE_PROGRAM" not in os.environ and not tools.which("make"):
Expand Down Expand Up @@ -200,7 +196,11 @@ def add_flag(name, value):
add_flag("CFLAGS", "-mrtm")
add_flag("CXXFLAGS", "-mrtm")

targets = ["tbb", "tbbmalloc", "tbbproxy"]
targets = ["tbb"]
if self.options.tbbmalloc:
targets.append("tbbmalloc")
if self.options.tbbproxy:
targets.append("tbbproxy")
context = tools.no_op()
if self.settings.compiler == "intel":
context = tools.intel_compilervars(self)
Expand Down

0 comments on commit e1b8287

Please sign in to comment.