make it possible to not create any front-end setup script

This commit is contained in:
Radovan Bast 2017-07-19 12:27:49 +02:00
parent 13b331e54a
commit 37a29068fa
2 changed files with 15 additions and 8 deletions

View File

@ -82,6 +82,12 @@ Yes you can do that in ``autocmake.yml``. Here we for instance change the name t
- CXX
Can I prevent Autocmake from creating any front-end setup script?
-----------------------------------------------------------------
Yes, with ``setup_script: None``.
In CMake I can do feature X - can I do that also with Autocmake?
----------------------------------------------------------------

View File

@ -192,14 +192,15 @@ def process_yaml(argv):
with open(os.path.join(project_root, 'CMakeLists.txt'), 'w') as f:
f.write('{0}\n'.format('\n'.join(s)))
# create setup script
print('- generating setup script')
s = gen_setup(cleaned_config, default_build_type, relative_path, setup_script_name)
file_path = os.path.join(project_root, setup_script_name)
with open(file_path, 'w') as f:
f.write('{0}\n'.format('\n'.join(s)))
if sys.platform != 'win32':
make_executable(file_path)
# create setup script unless it is 'None' or 'none'
if setup_script_name.lower() != 'none':
print('- generating setup script')
s = gen_setup(cleaned_config, default_build_type, relative_path, setup_script_name)
file_path = os.path.join(project_root, setup_script_name)
with open(file_path, 'w') as f:
f.write('{0}\n'.format('\n'.join(s)))
if sys.platform != 'win32':
make_executable(file_path)
def main(argv):