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 - 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? 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: with open(os.path.join(project_root, 'CMakeLists.txt'), 'w') as f:
f.write('{0}\n'.format('\n'.join(s))) f.write('{0}\n'.format('\n'.join(s)))
# create setup script # create setup script unless it is 'None' or 'none'
print('- generating setup script') if setup_script_name.lower() != 'none':
s = gen_setup(cleaned_config, default_build_type, relative_path, setup_script_name) print('- generating setup script')
file_path = os.path.join(project_root, setup_script_name) s = gen_setup(cleaned_config, default_build_type, relative_path, setup_script_name)
with open(file_path, 'w') as f: file_path = os.path.join(project_root, setup_script_name)
f.write('{0}\n'.format('\n'.join(s))) with open(file_path, 'w') as f:
if sys.platform != 'win32': f.write('{0}\n'.format('\n'.join(s)))
make_executable(file_path) if sys.platform != 'win32':
make_executable(file_path)
def main(argv): def main(argv):