aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurence Kedward <laurence.kedward@bristol.ac.uk>2021-11-22 16:18:41 +0000
committerLaurence Kedward <laurence.kedward@bristol.ac.uk>2021-11-23 10:08:01 +0000
commit229761aa6fb342abd42dffdaa968611d48adf3d4 (patch)
tree5f82bc097e46d5fe50921fe8f6d07c2efbbbf754 /src
parent5728b54443059fc07595251743ad1c0965afae58 (diff)
downloadfpm-229761aa6fb342abd42dffdaa968611d48adf3d4.tar.gz
fpm-229761aa6fb342abd42dffdaa968611d48adf3d4.zip
Fix: backend c_isatty for bootstrapping
Diffstat (limited to 'src')
-rw-r--r--src/fpm_backend.f906
1 files changed, 6 insertions, 0 deletions
diff --git a/src/fpm_backend.f90 b/src/fpm_backend.f90
index e0ed972..af50162 100644
--- a/src/fpm_backend.f90
+++ b/src/fpm_backend.f90
@@ -41,12 +41,14 @@ implicit none
private
public :: build_package, sort_target, schedule_targets
+#ifndef FPM_BOOTSTRAP
interface
function c_isatty() bind(C, name = 'c_isatty')
use, intrinsic :: iso_c_binding, only: c_int
integer(c_int) :: c_isatty
end function
end interface
+#endif
contains
@@ -98,7 +100,11 @@ subroutine build_package(targets,model,verbose)
n_complete = 0
! Set output mode
+#ifndef FPM_BOOTSTRAP
plain_output = (.not.(c_isatty()==1)) .or. verbose
+#else
+ plain_output = verbose
+#endif
call console%init(plain_output)
call output_init(plain_output)