From 6bb5f6c49a22e8cf342e1c71262d155195d2c64a Mon Sep 17 00:00:00 2001 From: Sascha Klawohn Date: Thu, 23 Sep 2021 10:44:53 +0100 Subject: Build no tests by default (#572) Building tests can be enforced using --tests for build. It is done automatically before running tests. --- src/fpm.f90 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/fpm.f90') diff --git a/src/fpm.f90 b/src/fpm.f90 index 7208abf..1449dc2 100644 --- a/src/fpm.f90 +++ b/src/fpm.f90 @@ -85,6 +85,8 @@ subroutine build_model(model, settings, package, error) model%fortran_compile_flags = flags // " " // & & model%compiler%get_module_flag(join_path(model%output_directory, model%package_name)) + model%include_tests = settings%build_tests + allocate(model%packages(model%deps%ndep)) ! Add sources from executable directories @@ -268,7 +270,7 @@ if (allocated(error)) then call fpm_stop(1,'*cmd_build*:model error:'//error%message) end if -call targets_from_sources(targets,model,error) +call targets_from_sources(targets, model, error) if (allocated(error)) then call fpm_stop(1,'*cmd_build*:target error:'//error%message) end if @@ -314,7 +316,7 @@ subroutine cmd_run(settings,test) call fpm_stop(1, '*cmd_run*:model error:'//error%message) end if - call targets_from_sources(targets,model,error) + call targets_from_sources(targets, model, error) if (allocated(error)) then call fpm_stop(1, '*cmd_run*:targets error:'//error%message) end if -- cgit v1.2.3