Skip unused CMake argument in setup.py (#6611)
This commit is contained in:
parent
f0fd7629ae
commit
26982f9fce
@ -105,11 +105,12 @@ class BuildExt(build_ext.build_ext): # pylint: disable=too-many-ancestors
|
||||
for k, v in USER_OPTIONS.items():
|
||||
arg = k.replace('-', '_').upper()
|
||||
value = str(v[2])
|
||||
if arg == 'USE_SYSTEM_LIBXGBOOST':
|
||||
continue
|
||||
if arg == 'USE_OPENMP' and use_omp == 0:
|
||||
cmake_cmd.append("-D" + arg + "=0")
|
||||
continue
|
||||
cmake_cmd.append('-D' + arg + '=' + value)
|
||||
if k == 'USE-SYSTEM-LIBXGBOOST':
|
||||
continue
|
||||
if k == 'USE_OPENMP' and use_omp == 0:
|
||||
continue
|
||||
|
||||
self.logger.info('Run CMake command: %s', str(cmake_cmd))
|
||||
subprocess.check_call(cmake_cmd, cwd=build_dir)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user