diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2024-01-30 18:20:58 (GMT) |
---|---|---|
committer | Larry Knox <lrknox@hdfgroup.org> | 2024-02-14 21:35:38 (GMT) |
commit | f57a0dbec6b3148f22b105863b971404cfee439c (patch) | |
tree | 4fc74b611a18675f5114f1abb824e9f5cb4b327d /c++/src | |
parent | c6a0abde93faba3341dbcefeae49b415211e68ac (diff) | |
download | hdf5-f57a0dbec6b3148f22b105863b971404cfee439c.zip hdf5-f57a0dbec6b3148f22b105863b971404cfee439c.tar.gz hdf5-f57a0dbec6b3148f22b105863b971404cfee439c.tar.bz2 |
h5 compiler wrappers now pass all arguments passed to it to the compile line (#3954)
* The issue was that the "allargs" variable was not being used in the final command of the compiler wrapper. Any entries containing an escaped quote (\", \') or other non-matching argument (*) would not be passed to the compile line. I have fixed this problem by ensuring all arguments passed to the compiler wrapper are now included in the compile line.
* added testing for compiler wrappers
Diffstat (limited to 'c++/src')
-rw-r--r-- | c++/src/h5c++.in | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/c++/src/h5c++.in b/c++/src/h5c++.in index 078fa73..e666ba9 100644 --- a/c++/src/h5c++.in +++ b/c++/src/h5c++.in @@ -60,7 +60,7 @@ host_os="@host_os@" prog_name="`basename $0`" -allargs="" +misc_args="" compile_args="" libraries="" link_args="" @@ -198,7 +198,6 @@ for arg in $@ ; do case "$arg" in -c) - allargs="$allargs $arg" compile_args="$compile_args $arg" if test "x$do_link" = "xyes" -a -n "$output_file"; then @@ -209,7 +208,6 @@ for arg in $@ ; do dash_c="yes" ;; -o) - allargs="$allargs $arg" dash_o="yes" if test "x$dash_c" = "xyes"; then @@ -221,14 +219,12 @@ for arg in $@ ; do fi ;; -E|-M|-MT) - allargs="$allargs $arg" compile_args="$compile_args $arg" dash_c="yes" do_link="no" ;; -l*) libraries=" $libraries $arg " - allargs="$allargs $arg" ;; -prefix=*) prefix="`expr "$arg" : '-prefix=\(.*\)'`" @@ -254,15 +250,15 @@ for arg in $@ ; do ;; *\"*) qarg="'"$arg"'" - allargs="$allargs $qarg" + misc_args="$misc_args $qarg" ;; *\'*) - qarg='\"'"$arg"'\"' - allargs="$allargs $qarg" + qarg='"'"$arg"'"' + misc_args="$misc_args $qarg" ;; *) - allargs="$allargs $qarg" + misc_args="$misc_args $qarg" if [ -s "$arg" ] ; then ext=`expr "$arg" : '.*\(\..*\)'` @@ -300,7 +296,7 @@ if test "x$do_compile" = "xyes"; then compile_args="-c $compile_args" fi - $SHOW $CXX -I$includedir $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS $compile_args + $SHOW $CXX -I$includedir $H5BLD_CPPFLAGS $CPPFLAGS $H5BLD_CXXFLAGS $CXXFLAGS $misc_args $compile_args status=$? if test "$status" != "0"; then |