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_targets.f90 | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/fpm_targets.f90') diff --git a/src/fpm_targets.f90 b/src/fpm_targets.f90 index d480866..f10b330 100644 --- a/src/fpm_targets.f90 +++ b/src/fpm_targets.f90 @@ -191,6 +191,10 @@ subroutine build_target_list(targets,model) do i=1,size(sources) + if (.not. model%include_tests) then + if (sources(i)%unit_scope == FPM_SCOPE_TEST) cycle + end if + select case (sources(i)%unit_type) case (FPM_UNIT_MODULE,FPM_UNIT_SUBMODULE,FPM_UNIT_SUBPROGRAM,FPM_UNIT_CSOURCE) -- cgit v1.2.3