@@ -117,6 +117,7 @@ def pre_process_fypp(args):
117
117
copy_folder_with_filter ('example' ,example ,
118
118
filter_list = ['CMakeLists.txt' ])
119
119
shutil .copy2 ('ci' + os .sep + 'fpm.toml' , 'stdlib-fpm' + os .sep + 'fpm.toml' )
120
+ shutil .copy2 ('VERSION' , 'stdlib-fpm' + os .sep + 'VERSION' )
120
121
shutil .copy2 ('LICENSE' , 'stdlib-fpm' + os .sep + 'LICENSE' )
121
122
122
123
# Define the folders to search for *.fypp files
@@ -141,7 +142,7 @@ def process_f(file):
141
142
142
143
return
143
144
144
- def fpm_build (unknown ):
145
+ def fpm_build (args , unknown ):
145
146
import subprocess
146
147
#==========================================
147
148
# check compilers
@@ -154,12 +155,13 @@ def fpm_build(unknown):
154
155
# Filter out the include paths with -I prefix.
155
156
include_paths = [arg for arg in unknown if arg .startswith ("-I" )]
156
157
# Filter out flags
157
- flags = " "
158
+ flags = "-cpp "
158
159
for idx , arg in enumerate (unknown ):
159
160
if arg .startswith ("--flag" ):
160
- flags = unknown [idx + 1 ]
161
+ flags = flags + unknown [idx + 1 ]
161
162
#==========================================
162
163
# build with fpm
164
+ os .chdir (args .destdir )
163
165
subprocess .run (["fpm build" ]+
164
166
[" --compiler " ]+ [FPM_FC ]+
165
167
[" --c-compiler " ]+ [FPM_CC ]+
@@ -202,4 +204,4 @@ def fpm_build(unknown):
202
204
#==========================================
203
205
# build using fpm
204
206
if args .build :
205
- fpm_build (unknown )
207
+ fpm_build (args , unknown )
0 commit comments