@@ -144,7 +144,9 @@ def process_yaml(argv):
144
144
if 'language' in config :
145
145
project_language = ' ' .join (config ['language' ]) if isinstance (config ['language' ], list ) else config ['language' ]
146
146
else :
147
- sys .stderr .write ("ERROR: you have to specify the project language(s) in autocmake.yml\n " )
147
+ sys .stderr .write ("ERROR: you have to specify the project language(s) in autocmake.yml\n \n " )
148
+ sys .stderr .write ("# for instance like this (several languages):\n language:\n - CXX\n - Fortran\n \n " )
149
+ sys .stderr .write ("# or like this (one language):\n language: Fortran\n \n " )
148
150
sys .exit (- 1 )
149
151
150
152
if 'min_cmake_version' in config :
@@ -156,7 +158,8 @@ def process_yaml(argv):
156
158
if 'default_build_type' in config :
157
159
default_build_type = config ['default_build_type' ].lower ()
158
160
else :
159
- sys .stderr .write ("ERROR: you have to specify default_build_type in autocmake.yml\n " )
161
+ sys .stderr .write ("ERROR: you have to specify default_build_type in autocmake.yml\n \n " )
162
+ sys .stderr .write ("# for instance like this (debug, release, relwithdebinfo, or minsizerel):\n default_build_type: release\n \n " )
160
163
sys .exit (- 1 )
161
164
162
165
if 'setup_script' in config :
@@ -189,14 +192,15 @@ def process_yaml(argv):
189
192
with open (os .path .join (project_root , 'CMakeLists.txt' ), 'w' ) as f :
190
193
f .write ('{0}\n ' .format ('\n ' .join (s )))
191
194
192
- # create setup script
193
- print ('- generating setup script' )
194
- s = gen_setup (cleaned_config , default_build_type , relative_path , setup_script_name )
195
- file_path = os .path .join (project_root , setup_script_name )
196
- with open (file_path , 'w' ) as f :
197
- f .write ('{0}\n ' .format ('\n ' .join (s )))
198
- if sys .platform != 'win32' :
199
- make_executable (file_path )
195
+ # create setup script unless it is 'None' or 'none'
196
+ if setup_script_name .lower () != 'none' :
197
+ print ('- generating setup script' )
198
+ s = gen_setup (cleaned_config , default_build_type , relative_path , setup_script_name )
199
+ file_path = os .path .join (project_root , setup_script_name )
200
+ with open (file_path , 'w' ) as f :
201
+ f .write ('{0}\n ' .format ('\n ' .join (s )))
202
+ if sys .platform != 'win32' :
203
+ make_executable (file_path )
200
204
201
205
202
206
def main (argv ):
0 commit comments