MCPcopy Create free account
hub / github.com/dmlc/xgboost / get_cmake_args

Method get_cmake_args

python-package/packager/build_config.py:41–50  ·  view source on GitHub ↗

Convert build configuration to CMake args

(self)

Source from the content-addressed store, hash-verified

39 self._set_config_setting(config_settings)
40
41 def get_cmake_args(self) -> List[str]:
42 """Convert build configuration to CMake args"""
43 cmake_args = []
44 for field_name in [x.name for x in dataclasses.fields(self)]:
45 if field_name in ["use_system_libxgboost"]:
46 continue
47 cmake_option = field_name.upper()
48 cmake_value = "ON" if getattr(self, field_name) is True else "OFF"
49 cmake_args.append(f"-D{cmake_option}={cmake_value}")
50 return cmake_args

Callers 1

_buildFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected