diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3a8e515a80..40f5d24d4f 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -23,19 +23,23 @@ jobs: matrix: os: [ubuntu-latest, macos-13, windows-latest] toolchain: - - {compiler: gcc, version: 10} - {compiler: gcc, version: 11} - {compiler: gcc, version: 12} - {compiler: gcc, version: 13} - {compiler: gcc, version: 14} + - {compiler: gcc, version: 15} - {compiler: intel, version: 2025.1} exclude: + - os: ubuntu-latest # gcc 15 not available on Ubuntu LTS yet + toolchain: {compiler: gcc, version: 15} - os: macos-13 # No Intel on MacOS anymore since 2024 toolchain: {compiler: intel, version: '2025.1'} - os: windows-latest # Doesn't pass build and tests yet toolchain: {compiler: intel, version: '2025.1'} - os: windows-latest # gcc 14 not available on Windows yet toolchain: {compiler: gcc, version: 14} + - os: windows-latest # gcc 15 not available on Windows yet + toolchain: {compiler: gcc, version: 15} include: - os: ubuntu-latest os-arch: linux-x86_64 @@ -110,6 +114,7 @@ jobs: ${{ env.BOOTSTRAP }} run -- --help - name: Test Fortran fpm (bootstrap) + if: matrix.toolchain.compiler == 'gcc' && matrix.toolchain.version != 15 shell: bash run: | ${{ env.BOOTSTRAP }} test diff --git a/src/fpm/cmd/install.f90 b/src/fpm/cmd/install.f90 index 0fba266b0e..867959526c 100644 --- a/src/fpm/cmd/install.f90 +++ b/src/fpm/cmd/install.f90 @@ -101,30 +101,32 @@ subroutine install_info(unit, verbose, targets, ntargets) integer, intent(out) :: ntargets integer :: ii - type(string_t), allocatable :: install_target(:), temp(:) + type(string_t), allocatable :: install_target(:), apps(:), tests(:) type(build_target_ptr), allocatable :: libs(:) - allocate(install_target(0)) - call filter_library_targets(targets, libs) - install_target = [install_target, (string_t(libs(ii)%ptr%output_file),ii=1,size(libs))] - - call filter_executable_targets(targets, FPM_SCOPE_APP, temp) - install_target = [install_target, temp] - - call filter_executable_targets(targets, FPM_SCOPE_TEST, temp) - install_target = [install_target, temp] + call filter_executable_targets(targets, FPM_SCOPE_APP, apps) + call filter_executable_targets(targets, FPM_SCOPE_TEST, tests) - ntargets = size(install_target) + ntargets = size(libs) + size(apps) + size(tests) + allocate(install_target(ntargets)) + + do ii = 1, size(libs) + install_target(ii) = string_t(libs(ii)%ptr%output_file) + end do + do ii = 1, size(apps) + install_target(size(libs) + ii) = string_t(apps(ii)%s) + end do + do ii = 1, size(tests) + install_target(size(libs) + size(apps) + ii) = string_t(tests(ii)%s) + end do if (verbose) then - write(unit, '("#", *(1x, g0))') & "total number of installable targets:", ntargets do ii = 1, ntargets write(unit, '("-", *(1x, g0))') install_target(ii)%s end do - endif end subroutine install_info diff --git a/src/fpm/manifest/profiles.f90 b/src/fpm/manifest/profiles.f90 index 234f8cd4bc..09046fcdda 100644 --- a/src/fpm/manifest/profiles.f90 +++ b/src/fpm/manifest/profiles.f90 @@ -783,19 +783,22 @@ function get_default_profiles(error) result(default_profiles) & new_profile('debug', & & 'caf', & & OS_ALL, & - & flags = ' -Wall -Wextra -Wimplicit-interface -fPIC -fmax-errors=1 -g -fcheck=bounds& + & flags = ' -Wall -Wextra -Wimplicit-interface -Wno-external-argument-mismatch& + & -fPIC -fmax-errors=1 -g -fcheck=bounds& & -fcheck=array-temps -fbacktrace', & & is_built_in=.true.), & & new_profile('debug', & & 'gfortran', & & OS_ALL, & - & flags = ' -Wall -Wextra -Wimplicit-interface -fPIC -fmax-errors=1 -g -fcheck=bounds& + & flags = ' -Wall -Wextra -Wimplicit-interface -Wno-external-argument-mismatch& + & -fPIC -fmax-errors=1 -g -fcheck=bounds& & -fcheck=array-temps -fbacktrace -fcoarray=single', & & is_built_in=.true.), & & new_profile('debug', & & 'f95', & & OS_ALL, & - & flags = ' -Wall -Wextra -Wimplicit-interface -fPIC -fmax-errors=1 -g -fcheck=bounds& + & flags = ' -Wall -Wextra -Wimplicit-interface -Wno-external-argument-mismatch& + & -fPIC -fmax-errors=1 -g -fcheck=bounds& & -fcheck=array-temps -Wno-maybe-uninitialized -Wno-uninitialized -fbacktrace', & & is_built_in=.true.), & & new_profile('debug', & diff --git a/src/fpm_compiler.F90 b/src/fpm_compiler.F90 index aca930783c..7faa71f008 100644 --- a/src/fpm_compiler.F90 +++ b/src/fpm_compiler.F90 @@ -178,7 +178,7 @@ module fpm_compiler flag_gnu_opt = " -O3 -funroll-loops", & flag_gnu_debug = " -g", & flag_gnu_pic = " -fPIC", & - flag_gnu_warn = " -Wall -Wextra", & + flag_gnu_warn = " -Wall -Wextra -Wno-external-argument-mismatch", & flag_gnu_check = " -fcheck=bounds -fcheck=array-temps", & flag_gnu_limit = " -fmax-errors=1", & flag_gnu_external = " -Wimplicit-interface", & diff --git a/test/fpm_test/test_toml.f90 b/test/fpm_test/test_toml.f90 index 8fd28dfbf3..1508c6e1d7 100644 --- a/test/fpm_test/test_toml.f90 +++ b/test/fpm_test/test_toml.f90 @@ -873,7 +873,7 @@ subroutine fpm_081_table(table) allocate(character(len=0) :: fpm) fpm = fpm//NL//'package-name = "fpm"' - fpm = fpm//NL//'fortran-flags = " -Wall -Wextra -fPIC -fmax-errors=1 -g "' + fpm = fpm//NL//'fortran-flags = " -Wall -Wextra -Wno-external-argument-mismatch -fPIC -fmax-errors=1 -g "' fpm = fpm//NL//'c-flags = ""' fpm = fpm//NL//'cxx-flags = ""' fpm = fpm//NL//'link-flags = ""' @@ -1144,7 +1144,7 @@ subroutine fpm_model_invalid(error) allocate(character(len=0) :: fpm) fpm = fpm//NL//'package-name = "fpm"' - fpm = fpm//NL//'fortran-flags = " -Wall -Wextra -fPIC -fmax-errors=1 -g "' + fpm = fpm//NL//'fortran-flags = " -Wall -Wextra -Wno-external-argument-mismatch -fPIC -fmax-errors=1 -g "' fpm = fpm//NL//'c-flags = ""' fpm = fpm//NL//'cxx-flags = ""' fpm = fpm//NL//'link-flags = ""'