@@ -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
@@ -1571,15 +1583,16 @@ sub replace_config_sub_guess {
1571
1583
dnl 3rd-party package information\n " ;
1572
1584
1573
1585
# Extract the OMPI options to exclude them when processing PMIx and PRRTE
1574
- if ( ! (" pmix" ~~ @disabled_3rdparty_packages && " prrte" ~~ @disabled_3rdparty_packages ) ) {
1586
+ if ( ! (list_contains(" pmix" , @disabled_3rdparty_packages ) &&
1587
+ list_contains(" prrte" , @disabled_3rdparty_packages ))) {
1575
1588
safe_system(" ./config/extract-3rd-party-configure.pl -p . -n \" OMPI\" -l > config/auto-generated-ompi-exclude.ini" );
1576
1589
}
1577
1590
1578
1591
# these are fairly one-off, so we did not try to do anything
1579
1592
# generic. Sorry :).
1580
1593
1581
1594
verbose " === Libevent\n " ;
1582
- if (" libevent" ~~ @disabled_3rdparty_packages ) {
1595
+ if (list_contains( " libevent" , @disabled_3rdparty_packages ) ) {
1583
1596
verbose " --- Libevent disabled\n " ;
1584
1597
} else {
1585
1598
my $libevent_directory = " libevent-" . $libevent_version ;
@@ -1594,7 +1607,7 @@ sub replace_config_sub_guess {
1594
1607
}
1595
1608
1596
1609
verbose " === hwloc\n " ;
1597
- if (" hwloc" ~~ @disabled_3rdparty_packages ) {
1610
+ if (list_contains( " hwloc" , @disabled_3rdparty_packages ) ) {
1598
1611
verbose " --- hwloc disabled\n " ;
1599
1612
} else {
1600
1613
my $hwloc_directory = " hwloc-" . $hwloc_version ;
@@ -1605,11 +1618,11 @@ sub replace_config_sub_guess {
1605
1618
$m4 .= " m4_define([package_hwloc], [1])\n " ;
1606
1619
$m4 .= " m4_define([hwloc_tarball], [" . $hwloc_tarball . " ])\n " ;
1607
1620
$m4 .= " m4_define([hwloc_directory], [" . $hwloc_directory . " ])\n " ;
1608
- verbose " --- hwloc enabled\n " ;
1621
+ verbose " --- hwloc enabled ( " . $hwloc_version . " ) \n " ;
1609
1622
}
1610
1623
1611
1624
verbose " === PMIx\n " ;
1612
- if (" pmix" ~~ @disabled_3rdparty_packages ) {
1625
+ if (list_contains( " pmix" , @disabled_3rdparty_packages ) ) {
1613
1626
verbose " --- PMIx disabled\n " ;
1614
1627
} else {
1615
1628
# sanity check pmix files exist
@@ -1628,7 +1641,7 @@ sub replace_config_sub_guess {
1628
1641
}
1629
1642
1630
1643
verbose " === PRRTE\n " ;
1631
- if (" prrte" ~~ @disabled_3rdparty_packages ) {
1644
+ if (list_contains( " prrte" , @disabled_3rdparty_packages ) ) {
1632
1645
verbose " --- PRRTE disabled\n " ;
1633
1646
} else {
1634
1647
# sanity check prrte files exist
0 commit comments