Skip to content

Commit

Permalink
MPI: respect VERBOSE option
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaas80 committed Jul 15, 2019
1 parent 59ef1c7 commit 6e1074b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/build.pl
Expand Up @@ -5,6 +5,25 @@
use Cwd;
$/ = undef;

# Set up shell
my $verbose = 0;
$verbose = 1 if $ENV{VERBOSE} =~ /^yes$/i;

if ($verbose) {
# we implement VERBOSE by restarting in the debugger and having it print each line
unless (defined &DB::DB) {
# sadly Devel::Trace is not a standard package so we test for it here
eval {
require Devel::Trace;
};
unless ($@) {
exit system($^X, "-d:Trace", $0, @ARGV);
} else {
message("Could not 'import Devel::Trace' required for VERBOSE=yes. Consider installing it from CPAN https://metacpan.org/pod/Devel::Trace or using your package manager (possibly in the libdevel-trace-perl package).");
}
}
}

# Set locations
my $THORN = "MPI";
my $NAME = "openmpi-1.10.7";
Expand Down
15 changes: 15 additions & 0 deletions src/detect.pl
Expand Up @@ -13,6 +13,21 @@
my $verbose = 0;
$verbose = 1 if $ENV{VERBOSE} =~ /^yes$/i;

if ($verbose) {
# we implement VERBOSE by restarting in the debugger and having it print each line
unless (defined &DB::DB) {
# sadly Devel::Trace is not a standard package so we test for it here
eval {
require Devel::Trace;
};
unless ($@) {
exit system($^X, "-d:Trace", $0, @ARGV);
} else {
message("Could not 'import Devel::Trace' required for VERBOSE=yes. Consider installing it from CPAN https://metacpan.org/pod/Devel::Trace or using your package manager (possibly in the libdevel-trace-perl package).");
}
}
}

################################################################################
# Check for old mechanism
################################################################################
Expand Down

0 comments on commit 6e1074b

Please sign in to comment.