pass cmake argments
This commit is contained in:
9
setup.py
9
setup.py
@@ -18,8 +18,13 @@ class CMakeBuild(build_ext):
|
|||||||
os.chdir(build_dir)
|
os.chdir(build_dir)
|
||||||
install_dir = os.path.join(build_dir, 'install')
|
install_dir = os.path.join(build_dir, 'install')
|
||||||
if not self.dry_run:
|
if not self.dry_run:
|
||||||
self.spawn(
|
cmake_args = ['cmake', '..',
|
||||||
['cmake', '..', '-DCMAKE_INSTALL_PREFIX=%s' % install_dir])
|
'-DCMAKE_INSTALL_PREFIX=%s' % install_dir]
|
||||||
|
if "CMAKE_ARGS" in os.environ:
|
||||||
|
cmake_args += [
|
||||||
|
item for item in os.environ["CMAKE_ARGS"].split(" ") if item]
|
||||||
|
print(cmake_args)
|
||||||
|
self.spawn(cmake_args)
|
||||||
if self.debug:
|
if self.debug:
|
||||||
self.spawn(['cmake', '--build', '.', '--config',
|
self.spawn(['cmake', '--build', '.', '--config',
|
||||||
'Debug', '--target', 'install'])
|
'Debug', '--target', 'install'])
|
||||||
|
|||||||
Reference in New Issue
Block a user