@@ -210,13 +210,13 @@ function check_specification_expression() result(test_passes)
210210 ! ! Test conformance with Fortran 2018 standard clause 7.5.6.3, paragraph 6:
211211 ! ! "specification expression function result"
212212 logical test_passes
213- integer exit_status
213+ integer exit_status, command_status
214214 logical error_termination_occurred
215+ character (len= 132 ) command_message
215216
216217 call execute_command_line( &
217218 command = " fpm run --example specification_expression_finalization " // fpm_compiler_arguments() // " > /dev/null 2>&1" , &
218- wait = .true. , &
219- exitstat = exit_status &
219+ wait = .true. , exitstat = exit_status, cmdstat = command_status, cmdmsg = command_message &
220220 )
221221 error_termination_occurred = exit_status /= 0
222222 test_passes = error_termination_occurred
@@ -227,14 +227,16 @@ function fpm_compiler_arguments() result(args)
227227 character (len= :), allocatable :: args
228228
229229 associate(compiler_identity= >compiler_version())
230- if (scan (compiler_identity, " GCC" )==1 ) then
230+ if (index (compiler_identity, " GCC" )==1 ) then
231231 args = " "
232- else if (scan (compiler_identity, " NAG" )==1 ) then
232+ else if (index (compiler_identity, " NAG" )==1 ) then
233233 args = " --compiler nagfor --flag -fpp"
234- else if (scan (compiler_identity, " Intel" )==1 ) then
235- args = " --compiler ifort --flag"
236- else if (scan (compiler_identity, " IBM" )==1 ) then
237- args = " --compiler xlf2003_r --flag -DXLF"
234+ else if (index (compiler_identity, " Intel" )==1 ) then
235+ args = " --compiler ifort"
236+ else if (index (compiler_identity, " IBM" )==1 ) then
237+ args = " --archiver ar --compiler xlf2008_r --flag -DXLF"
238+ else if (index (compiler_identity, " Cray" )==1 ) then
239+ args = " --compiler ftn"
238240 else
239241 error stop " ----> Unrecognized compiler_version() in function fpm_compiler_arguments. <----"
240242 end if
0 commit comments