From beaf9a86f83c2de0ebc593f5d8bb924cbdb42ed0 Mon Sep 17 00:00:00 2001 From: Sebastian Ehlert <28669218+awvwgk@users.noreply.github.com> Date: Mon, 20 Sep 2021 23:10:15 +0200 Subject: Enable multiple build output directories --- test/fpm_test/test_backend.f90 | 5 +++++ test/fpm_test/test_module_dependencies.f90 | 18 +++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) (limited to 'test') diff --git a/test/fpm_test/test_backend.f90 b/test/fpm_test/test_backend.f90 index eea0460..cb8d6c8 100644 --- a/test/fpm_test/test_backend.f90 +++ b/test/fpm_test/test_backend.f90 @@ -328,6 +328,7 @@ contains function new_test_package() result(targets) type(build_target_ptr), allocatable :: targets(:) + integer :: i call add_target(targets,FPM_TARGET_ARCHIVE,get_temp_filename()) @@ -347,6 +348,10 @@ contains call add_dependency(targets(2)%ptr,targets(4)%ptr) call add_dependency(targets(3)%ptr,targets(4)%ptr) + do i = 1, size(targets) + targets(i)%ptr%output_file = targets(i)%ptr%output_name + end do + end function new_test_package diff --git a/test/fpm_test/test_module_dependencies.f90 b/test/fpm_test/test_module_dependencies.f90 index 8600bf0..8dcf86d 100644 --- a/test/fpm_test/test_module_dependencies.f90 +++ b/test/fpm_test/test_module_dependencies.f90 @@ -66,7 +66,7 @@ contains type(fpm_model_t) :: model type(build_target_ptr), allocatable :: targets(:) - model%output_directory = '' + !model%output_directory = '' allocate(model%external_modules(0)) allocate(model%packages(1)) allocate(model%packages(1)%sources(2)) @@ -136,7 +136,7 @@ contains type(build_target_ptr), allocatable :: targets(:) character(:), allocatable :: scope_str - model%output_directory = '' + !model%output_directory = '' allocate(model%external_modules(0)) allocate(model%packages(1)) allocate(model%packages(1)%sources(2)) @@ -195,7 +195,7 @@ contains type(fpm_model_t) :: model type(build_target_ptr), allocatable :: targets(:) - model%output_directory = '' + !model%output_directory = '' allocate(model%external_modules(0)) allocate(model%packages(1)) allocate(model%packages(1)%sources(1)) @@ -249,7 +249,7 @@ contains type(build_target_ptr), allocatable :: targets(:) character(:), allocatable :: scope_str - model%output_directory = '' + !model%output_directory = '' allocate(model%external_modules(0)) allocate(model%packages(1)) allocate(model%packages(1)%sources(3)) @@ -309,7 +309,7 @@ contains type(fpm_model_t) :: model type(build_target_ptr), allocatable :: targets(:) - model%output_directory = '' + !model%output_directory = '' allocate(model%external_modules(0)) allocate(model%packages(1)) allocate(model%packages(1)%sources(2)) @@ -337,7 +337,7 @@ contains type(fpm_model_t) :: model type(build_target_ptr), allocatable :: targets(:) - model%output_directory = '' + !model%output_directory = '' allocate(model%external_modules(0)) allocate(model%packages(1)) allocate(model%packages(1)%sources(2)) @@ -364,7 +364,7 @@ contains type(fpm_model_t) :: model type(build_target_ptr), allocatable :: targets(:) - model%output_directory = '' + !model%output_directory = '' allocate(model%external_modules(0)) allocate(model%packages(1)) allocate(model%packages(1)%sources(2)) @@ -392,7 +392,7 @@ contains type(fpm_model_t) :: model type(build_target_ptr), allocatable :: targets(:) - model%output_directory = '' + !model%output_directory = '' allocate(model%external_modules(0)) allocate(model%packages(1)) allocate(model%packages(1)%sources(2)) @@ -512,7 +512,7 @@ contains type(fpm_model_t) :: model type(build_target_ptr), allocatable :: targets(:) - model%output_directory = '' + !model%output_directory = '' allocate(model%external_modules(0)) allocate(model%packages(1)) allocate(model%packages(1)%sources(2)) -- cgit v1.2.3 From e90eee715634a9378b86a111d70613b1eeedd64b Mon Sep 17 00:00:00 2001 From: Sebastian Ehlert <28669218+awvwgk@users.noreply.github.com> Date: Mon, 27 Sep 2021 13:45:46 +0200 Subject: Apply suggestions from code review Co-authored-by: Laurence Kedward --- test/fpm_test/test_module_dependencies.f90 | 9 --------- 1 file changed, 9 deletions(-) (limited to 'test') diff --git a/test/fpm_test/test_module_dependencies.f90 b/test/fpm_test/test_module_dependencies.f90 index 8dcf86d..53256be 100644 --- a/test/fpm_test/test_module_dependencies.f90 +++ b/test/fpm_test/test_module_dependencies.f90 @@ -66,7 +66,6 @@ contains type(fpm_model_t) :: model type(build_target_ptr), allocatable :: targets(:) - !model%output_directory = '' allocate(model%external_modules(0)) allocate(model%packages(1)) allocate(model%packages(1)%sources(2)) @@ -136,7 +135,6 @@ contains type(build_target_ptr), allocatable :: targets(:) character(:), allocatable :: scope_str - !model%output_directory = '' allocate(model%external_modules(0)) allocate(model%packages(1)) allocate(model%packages(1)%sources(2)) @@ -195,7 +193,6 @@ contains type(fpm_model_t) :: model type(build_target_ptr), allocatable :: targets(:) - !model%output_directory = '' allocate(model%external_modules(0)) allocate(model%packages(1)) allocate(model%packages(1)%sources(1)) @@ -249,7 +246,6 @@ contains type(build_target_ptr), allocatable :: targets(:) character(:), allocatable :: scope_str - !model%output_directory = '' allocate(model%external_modules(0)) allocate(model%packages(1)) allocate(model%packages(1)%sources(3)) @@ -309,7 +305,6 @@ contains type(fpm_model_t) :: model type(build_target_ptr), allocatable :: targets(:) - !model%output_directory = '' allocate(model%external_modules(0)) allocate(model%packages(1)) allocate(model%packages(1)%sources(2)) @@ -337,7 +332,6 @@ contains type(fpm_model_t) :: model type(build_target_ptr), allocatable :: targets(:) - !model%output_directory = '' allocate(model%external_modules(0)) allocate(model%packages(1)) allocate(model%packages(1)%sources(2)) @@ -364,7 +358,6 @@ contains type(fpm_model_t) :: model type(build_target_ptr), allocatable :: targets(:) - !model%output_directory = '' allocate(model%external_modules(0)) allocate(model%packages(1)) allocate(model%packages(1)%sources(2)) @@ -392,7 +385,6 @@ contains type(fpm_model_t) :: model type(build_target_ptr), allocatable :: targets(:) - !model%output_directory = '' allocate(model%external_modules(0)) allocate(model%packages(1)) allocate(model%packages(1)%sources(2)) @@ -512,7 +504,6 @@ contains type(fpm_model_t) :: model type(build_target_ptr), allocatable :: targets(:) - !model%output_directory = '' allocate(model%external_modules(0)) allocate(model%packages(1)) allocate(model%packages(1)%sources(2)) -- cgit v1.2.3