aboutsummaryrefslogtreecommitdiff
path: root/src/fpm_targets.f90
diff options
context:
space:
mode:
authorSascha Klawohn <sascha.klawohn@warwick.ac.uk>2021-09-23 10:44:53 +0100
committerGitHub <noreply@github.com>2021-09-23 11:44:53 +0200
commit6bb5f6c49a22e8cf342e1c71262d155195d2c64a (patch)
tree1c41a6bc53b838413bea57adc4c5cdfaa17d84ca /src/fpm_targets.f90
parentedb3fcd78ae0a543581a67dc16da1610a8b539e3 (diff)
downloadfpm-6bb5f6c49a22e8cf342e1c71262d155195d2c64a.tar.gz
fpm-6bb5f6c49a22e8cf342e1c71262d155195d2c64a.zip
Build no tests by default (#572)
Building tests can be enforced using --tests for build. It is done automatically before running tests.
Diffstat (limited to 'src/fpm_targets.f90')
-rw-r--r--src/fpm_targets.f904
1 files changed, 4 insertions, 0 deletions
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)