add possibility to pass options to cmake via setup.py
This commit is contained in:
@ -102,6 +102,8 @@ def gen_cmake_command(config):
|
||||
|
||||
s.append(" command.append('-DCMAKE_BUILD_TYPE=%s' % arguments['--type'])")
|
||||
s.append(" command.append('-G \"%s\"' % arguments['--generator'])")
|
||||
s.append(" for word in arguments['--cmake-options'].split():")
|
||||
s.append(" command.append('%s' % word)")
|
||||
|
||||
s.append("\n return ' '.join(command)")
|
||||
|
||||
@ -151,6 +153,7 @@ def gen_setup(config, relative_path):
|
||||
options.append(['--type=<TYPE>', 'Set the CMake build type (debug, release, or relwithdeb) [default: release].'])
|
||||
options.append(['--generator=<STRING>', 'Set the CMake build system generator [default: Unix Makefiles].'])
|
||||
options.append(['--show', 'Show CMake command and exit.'])
|
||||
options.append(['--cmake-options=<OPTIONS>', 'Define options to CMake [default: None].'])
|
||||
options.append(['<builddir>', 'Build directory.'])
|
||||
options.append(['-h --help', 'Show this screen.'])
|
||||
|
||||
|
Reference in New Issue
Block a user