@@ -28,7 +28,7 @@ module fpm_command_line
28
28
OS_CYGWIN, OS_SOLARIS, OS_FREEBSD
29
29
use M_CLI2, only : set_args, lget, sget, unnamed, remaining, specified
30
30
use fpm_strings, only : lower, split
31
- use fpm_filesystem, only : basename, canon_path
31
+ use fpm_filesystem, only : basename, canon_path, to_fortran_name
32
32
use ,intrinsic :: iso_fortran_env, only : stdin= >input_unit, &
33
33
& stdout= >output_unit, &
34
34
& stderr= >error_unit
@@ -225,13 +225,11 @@ subroutine get_command_line_settings(cmd_settings)
225
225
end select
226
226
! *! canon_path is not converting ".", etc.
227
227
name= canon_path(name)
228
- if ( .not. is_fortran_name(basename(name)) )then
228
+ if ( .not. is_fortran_name(to_fortran_name( basename(name) )) )then
229
229
write (stderr,' (g0)' ) [ character (len= 72 ) :: &
230
- & ' <ERROR>the new directory basename must be an allowed ' , &
231
- & ' Fortran name. It must be composed of 1 to 63 ASCII' , &
232
- & ' characters and start with a letter and be composed' , &
233
- & ' entirely of alphanumeric characters [a-zA-Z0-9]' , &
234
- & ' and underscores.' ]
230
+ & ' <ERROR> the fpm project name must be made of ASCII letters' , &
231
+ & ' numbers, underscores, or hyphens, and no longer ' , &
232
+ & ' than 63 characters.' ]
235
233
stop 4
236
234
endif
237
235
0 commit comments