Skip to content

Commit 836a652

Browse files
committed
Change fallback C compiler equal to Fortran compiler
1 parent f85a458 commit 836a652

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/fpm_compiler.f90

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,6 @@ subroutine get_default_c_compiler(f_compiler, c_compiler)
344344
id = get_compiler_id(f_compiler)
345345

346346
select case(id)
347-
case default
348-
c_compiler = 'gcc'
349347

350348
case(id_intel_classic)
351349
c_compiler = 'icc'
@@ -359,6 +357,9 @@ subroutine get_default_c_compiler(f_compiler, c_compiler)
359357
case(id_ibmxl)
360358
c_compiler='xlc'
361359

360+
case default
361+
! Fall-back to using Fortran compiler
362+
c_compiler = f_compiler
362363
end select
363364

364365
end subroutine get_default_c_compiler

0 commit comments

Comments
 (0)