@@ -29,7 +29,7 @@ subroutine cmd_install(settings)
29
29
type (build_target_ptr), allocatable :: targets(:), libraries(:)
30
30
type (installer_t) :: installer
31
31
type (string_t), allocatable :: list(:)
32
- logical :: installable, has_install_config , with_library, with_tests
32
+ logical :: installable, has_install , with_library, with_tests
33
33
logical :: has_library, has_executables
34
34
character (len= :), allocatable :: module_dir
35
35
integer :: ntargets,i
@@ -41,16 +41,19 @@ subroutine cmd_install(settings)
41
41
call handle_error(error)
42
42
43
43
! Set up logical variables to avoid repetitive conditions
44
- has_install_config = allocated (package% install)
45
- with_library = has_install_config .and. package% install% library
46
- with_tests = has_install_config .and. package% install% test
47
- has_library = allocated (package% library)
48
- has_executables = allocated (package% executable)
44
+ has_install = allocated (package% install)
45
+ has_library = allocated (package% library)
46
+ has_executables = allocated (package% executable)
47
+ if (has_install) then
48
+ with_library = has_install .and. package% install% library
49
+ with_tests = has_install .and. package% install% test
50
+ ! Set module directory (or leave unallocated because `optional`)
51
+ if (allocated (package% install% module_dir)) module_dir = package% install% module_dir
52
+ else
53
+ with_library = .false.
54
+ with_tests = .false.
55
+ endif
49
56
50
- ! Set module directory (or leave unallocated because `optional`)
51
- if (has_install_config .and. allocated (package% install% module_dir)) &
52
- module_dir = package% install% module_dir
53
-
54
57
! ifx bug: does not resolve allocatable -> optional
55
58
if (has_library) then
56
59
call targets_from_sources(targets, model, settings% prune, package% library, error)
0 commit comments