File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -433,24 +433,34 @@ subroutine resolve_target_linking(targets, model)
433
433
434
434
integer :: i
435
435
character (:), allocatable :: global_link_flags
436
+ character (:), allocatable :: global_compile_flags
436
437
437
438
if (targets(1 )% ptr% target_type == FPM_TARGET_ARCHIVE) then
438
439
global_link_flags = targets(1 )% ptr% output_file
439
440
else
440
441
allocate (character (0 ) :: global_link_flags)
441
442
end if
442
443
444
+ global_compile_flags = model% fortran_compile_flags
445
+
443
446
if (allocated (model% link_libraries)) then
444
447
if (size (model% link_libraries) > 0 ) then
445
448
global_link_flags = global_link_flags // " -l" // string_cat(model% link_libraries," -l" )
446
449
end if
447
450
end if
448
451
452
+ if (allocated (model% include_dirs)) then
453
+ if (size (model% include_dirs) > 0 ) then
454
+ global_compile_flags = global_compile_flags // &
455
+ & " -I" // string_cat(model% include_dirs," -I" )
456
+ end if
457
+ end if
458
+
449
459
do i= 1 ,size (targets)
450
460
451
461
associate(target = > targets(i)% ptr)
452
462
453
- target % compile_flags = model % fortran_compile_flags
463
+ target % compile_flags = global_compile_flags
454
464
455
465
allocate (target % link_objects(0 ))
456
466
You can’t perform that action at this time.
0 commit comments