From ac337114e68189c449f17915926bf419b0623a80 Mon Sep 17 00:00:00 2001 From: Brian Barrett Date: Tue, 24 Jun 2008 19:37:05 +0000 Subject: [PATCH] Use ' ' instead of / / for the regex in split() when preparing the different lists of flags for exec. ' ' is a magic value that means match all white space, and trim leading / trailing whitespace. Will prevent many spurious arguments to underlying compiler. This commit was SVN r18726. --- ompi/tools/wrappers/ompi_wrapper_script.in | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ompi/tools/wrappers/ompi_wrapper_script.in b/ompi/tools/wrappers/ompi_wrapper_script.in index 46a90b86b4..24726ade90 100644 --- a/ompi/tools/wrappers/ompi_wrapper_script.in +++ b/ompi/tools/wrappers/ompi_wrapper_script.in @@ -48,7 +48,7 @@ sub check_env { sub add_extra_includes { my $str = ""; - my @includes = split(/ /, $extra_includes); + my @includes = split(' ', $extra_includes); for my $include (@includes) { $str .= $include_flag . $include . " "; } @@ -139,17 +139,17 @@ if ($disable_flags == 1 && !($dry_run == 1 && $real_flag == 0)) { my @exec_argv = (); # assemble command -push(@exec_argv, split(/ /, $comp)); +push(@exec_argv, split(' ', $comp)); if ($want_preproc == 1) { - push(@exec_argv, split(/ /, $preproc_flags)); + push(@exec_argv, split(' ', $preproc_flags)); } if ($want_compile == 1) { - push(@exec_argv, split(/ /, $comp_flags)); + push(@exec_argv, split(' ', $comp_flags)); } push(@exec_argv, @appargs); if ($want_link == 1) { - push(@exec_argv, split(/ /, $linker_flags)); - push(@exec_argv, split(/ /, $libs)); + push(@exec_argv, split(' ', $linker_flags)); + push(@exec_argv, split(' ', $libs)); } if ($dry_run == 1) {