@@ -134,6 +134,18 @@ sub debug_dump {
134
134
135
135
# #############################################################################
136
136
137
+ sub list_contains {
138
+ my $searched_string = shift ;
139
+ foreach my $str (@_ ) {
140
+ if ($searched_string eq $str ) {
141
+ return 1;
142
+ }
143
+ }
144
+ return 0;
145
+ }
146
+
147
+ # #############################################################################
148
+
137
149
sub read_config_params {
138
150
my ($filename , $dir_prefix ) = @_ ;
139
151
@@ -1589,15 +1601,16 @@ sub replace_config_sub_guess {
1589
1601
dnl 3rd-party package information\n " ;
1590
1602
1591
1603
# Extract the OMPI options to exclude them when processing PMIx and PRRTE
1592
- if ( ! (" pmix" ~~ @disabled_3rdparty_packages && " prrte" ~~ @disabled_3rdparty_packages ) ) {
1604
+ if ( ! (list_contains(" pmix" , @disabled_3rdparty_packages ) &&
1605
+ list_contains(" prrte" , @disabled_3rdparty_packages ))) {
1593
1606
safe_system(" ./config/extract-3rd-party-configure.pl -p . -n \" OMPI\" -l > config/auto-generated-ompi-exclude.ini" );
1594
1607
}
1595
1608
1596
1609
# these are fairly one-off, so we did not try to do anything
1597
1610
# generic. Sorry :).
1598
1611
1599
1612
verbose " === Libevent\n " ;
1600
- if (" libevent" ~~ @disabled_3rdparty_packages ) {
1613
+ if (list_contains( " libevent" , @disabled_3rdparty_packages ) ) {
1601
1614
verbose " --- Libevent disabled\n " ;
1602
1615
} else {
1603
1616
my $libevent_directory = " libevent-" . $libevent_version ;
@@ -1612,7 +1625,7 @@ sub replace_config_sub_guess {
1612
1625
}
1613
1626
1614
1627
verbose " === hwloc\n " ;
1615
- if (" hwloc" ~~ @disabled_3rdparty_packages ) {
1628
+ if (list_contains( " hwloc" , @disabled_3rdparty_packages ) ) {
1616
1629
verbose " --- hwloc disabled\n " ;
1617
1630
} else {
1618
1631
my $hwloc_directory = " hwloc-" . $hwloc_version ;
@@ -1623,11 +1636,11 @@ sub replace_config_sub_guess {
1623
1636
$m4 .= " m4_define([package_hwloc], [1])\n " ;
1624
1637
$m4 .= " m4_define([hwloc_tarball], [" . $hwloc_tarball . " ])\n " ;
1625
1638
$m4 .= " m4_define([hwloc_directory], [" . $hwloc_directory . " ])\n " ;
1626
- verbose " --- hwloc enabled\n " ;
1639
+ verbose " --- hwloc enabled ( " . $hwloc_version . " ) \n " ;
1627
1640
}
1628
1641
1629
1642
verbose " === PMIx\n " ;
1630
- if (" pmix" ~~ @disabled_3rdparty_packages ) {
1643
+ if (list_contains( " pmix" , @disabled_3rdparty_packages ) ) {
1631
1644
verbose " --- PMIx disabled\n " ;
1632
1645
} else {
1633
1646
# sanity check pmix files exist
@@ -1646,7 +1659,7 @@ sub replace_config_sub_guess {
1646
1659
}
1647
1660
1648
1661
verbose " === PRRTE\n " ;
1649
- if (" prrte" ~~ @disabled_3rdparty_packages ) {
1662
+ if (list_contains( " prrte" , @disabled_3rdparty_packages ) ) {
1650
1663
verbose " --- PRRTE disabled\n " ;
1651
1664
} else {
1652
1665
# sanity check prrte files exist
0 commit comments