From 88973a1551f0b0f1bdecbe6d99473b5bf240b175 Mon Sep 17 00:00:00 2001 From: Alex Gough Date: Mon, 6 Jun 2011 04:45:28 +0100 Subject: [PATCH] automatically detect mpicc and use it --- Makefile.PL | 31 ++++++++++++++++++++++++++++++- test.pl | 5 ++++- 2 files changed, 34 insertions(+), 2 deletions(-) diff --git a/Makefile.PL b/Makefile.PL index ad78530..b6e60a4 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -7,6 +7,10 @@ use ExtUtils::MakeMaker; print < 'Parallel::MPI::Simple', 'VERSION_FROM' => 'Simple.pm', # finds $VERSION 'PREREQ_PM' => {Storable => 0}, - 'LIBS' => "-lmpi", + 'LIBS' => $libs || "-lmpi", + 'CCFLAGS' => $ccflags || "", ); diff --git a/test.pl b/test.pl index 4832eb3..ea085ff 100644 --- a/test.pl +++ b/test.pl @@ -3,5 +3,8 @@ $incs .= " -I$_" foreach @INC; my @newout = sort { (($a =~ /(\d+)/g)[0] <=> ($b =~ /(\d+)/g)[0]) } `mpirun -np 2 $^X $incs ic.pl`; -print "1..".scalar(@newout)."\n"; +print "1..24"; +if (@newout < 24) { + print "not ok 1 # mpirun failed. Do you need to start mpd?\n"; +} print @newout; -- 2.39.5