12 from basf2
import find_file
13 sconstruct_path = find_file(
'site_scons/SConstruct')
16 fobj = open(sconstruct_path)
18 optionlist = [
' global_env.Append(CCFLAGS = [\'-Wextra\'])\n',
19 ' global_env.Append(CCFLAGS = [\'-Wextra\',\'-O3\'])\n',
20 ' global_env.Append(CCFLAGS = [\'-Wextra\',\'-O3\', \'-native\'])\n'
22 option = optionlist[int(sys.argv[1])]
27 input_data.append(line)
28 for i
in range(0, len(input_data)):
29 if input_data[i].startswith(
'elif option == \'opt\':'):
33 if input_data[i].startswith(
' global_env.Append(CCFLAGS'):
36 print(
'option changed')
38 output.append(input_data[i])
40 output.append(input_data[i])
42 fobj = open(sconstruct_path,
'w')