We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6e1ce8d commit ecb7311Copy full SHA for ecb7311
fpm/src/fpm.f90
@@ -9,7 +9,7 @@ module fpm
9
use fpm_model, only: fpm_model_t, srcfile_t, show_model, &
10
FPM_SCOPE_UNKNOWN, FPM_SCOPE_LIB, FPM_SCOPE_DEP, &
11
FPM_SCOPE_APP, FPM_SCOPE_EXAMPLE, FPM_SCOPE_TEST
12
-use fpm_compiler, only: get_module_flags
+use fpm_compiler, only: get_module_flags, is_unknown_compiler
13
14
15
use fpm_sources, only: add_executable_sources, add_sources_from_dir
@@ -62,6 +62,11 @@ subroutine build_model(model, settings, package, error)
62
model%fortran_compiler = settings%compiler
63
endif
64
65
+ if (is_unknown_compiler(model%fortran_compiler)) then
66
+ write(*, '(*(a:,1x))') &
67
+ "<WARN>", "Unknown compiler", model%fortran_compiler, "requested!", &
68
+ "Defaults for this compiler might be incorrect"
69
+ end if
70
model%output_directory = join_path('build',basename(model%fortran_compiler)//'_'//settings%build_name)
71
72
call get_module_flags(model%fortran_compiler, &
fpm/src/fpm_command_line.f90
@@ -156,7 +156,7 @@ subroutine get_command_line_settings(cmd_settings)
156
& --target " " &
157
& --list F &
158
& --all F &
159
- & --profile "default"&
+ & --profile " "&
160
& --example F&
161
& --runner " " &
162
& --compiler "'//get_env('FPM_COMPILER','gfortran')//'" &
@@ -206,7 +206,7 @@ subroutine get_command_line_settings(cmd_settings)
206
207
case('build')
208
call set_args( '&
209
- & --profile "default" &
+ & --profile " " &
210
211
& --show-model F &
212
@@ -345,7 +345,7 @@ subroutine get_command_line_settings(cmd_settings)
345
call printhelp(help_text)
346
347
case('install')
348
- call set_args('--profile "default" --no-rebuild F --verbose F --prefix " " &
+ call set_args('--profile " " --no-rebuild F --verbose F --prefix " " &
349
350
351
& --flag:: " "&
@@ -382,7 +382,7 @@ subroutine get_command_line_settings(cmd_settings)
382
call set_args('&
383
384
& --list F&
385
386
387
388
fpm/src/fpm_compiler.f90
@@ -29,6 +29,7 @@ module fpm_compiler
29
use fpm_model, only: fpm_model_t
30
use fpm_filesystem, only: join_path, basename
31
implicit none
32
+public :: is_unknown_compiler
33
public :: get_module_flags
34
public :: get_default_compile_flags
35
public :: get_debug_compile_flags
@@ -323,4 +324,10 @@ function check_compiler(compiler, expected) result(match)
323
324
end if
325
end function check_compiler
326
327
+function is_unknown_compiler(compiler) result(is_unknown)
328
+ character(len=*), intent(in) :: compiler
329
+ logical :: is_unknown
330
+ is_unknown = get_compiler_id(compiler) == id_unknown
331
+end function is_unknown_compiler
332
+
333
end module fpm_compiler
0 commit comments