Skip to content

Commit

Permalink
xgboost: fix option handling
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Apr 20, 2024
1 parent 68c4c80 commit ef76066
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions recipes/xgboost/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def requirements(self):
self.requires("llvm-openmp/17.0.6")
if self.options.plugin_rmm:
self.requires("rmm/24.04.00")
if self.options.plugin_federated:
if self.options.get_safe("plugin_federated"):
self.requires("grpc/1.54.3")
self.requires("protobuf/3.21.12")

Expand All @@ -108,12 +108,12 @@ def validate(self):
raise ConanInvalidConfiguration("`nccl` must be enabled with `cuda` option.")
if self.options.cuda and not self.options.plugin_rmm:
raise ConanInvalidConfiguration("`plugin_rmm` must be enabled with `cuda` option.")
if self.options.plugin_federated and not self.options.shared:
if self.options.get_safe("plugin_federated") and not self.options.shared:
raise ConanInvalidConfiguration("Cannot build static lib with federated learning support")

def build_requirements(self):
self.tool_requires("cmake/[>=3.18 <4]")
if self.options.plugin_federated:
if self.options.get_safe("plugin_federated"):
self.tool_requires("protobuf/<host_version>")

def source(self):
Expand Down

0 comments on commit ef76066

Please sign in to comment.