Skip to content

Commit da019dd

Browse files
bwbarrettawlauria
authored andcommitted
Clear wrapper CPPFLAGS before populating
The wrapper compiler infrastructure enforces using OPAL_WRAPPER_FLAGS_ADD rather than modifying environment variables directly, in part by overwriting the values of {OPAL,OMPI}_WRAPPER_EXTRA_<flag> before using. The WRAPPER_EXTRA_CPPFLAGS variable was not properly cleared in the case where install headers were not installed, so properly initialize them. Signed-off-by: Brian Barrett <bbarrett@amazon.com> (cherry picked from commit bab5d2d)
1 parent f0dbc37 commit da019dd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

config/opal_setup_wrappers.m4

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,8 @@ AC_DEFUN([OPAL_SETUP_WRAPPER_FINAL],[
340340
AC_MSG_CHECKING([for OPAL CPPFLAGS])
341341
if test "$WANT_INSTALL_HEADERS" = "1" ; then
342342
OPAL_WRAPPER_EXTRA_CPPFLAGS='-I${includedir}/openmpi'
343+
else
344+
OPAL_WRAPPER_EXTRA_CPPFLAGS=
343345
fi
344346
OPAL_WRAPPER_EXTRA_CPPFLAGS="$OPAL_WRAPPER_EXTRA_CPPFLAGS $opal_mca_wrapper_extra_cppflags $wrapper_extra_cppflags $with_wrapper_cppflags"
345347
AC_SUBST([OPAL_WRAPPER_EXTRA_CPPFLAGS])
@@ -391,6 +393,8 @@ AC_DEFUN([OPAL_SETUP_WRAPPER_FINAL],[
391393
AC_MSG_CHECKING([for OMPI CPPFLAGS])
392394
if test "$WANT_INSTALL_HEADERS" = "1" ; then
393395
OMPI_WRAPPER_EXTRA_CPPFLAGS='-I${includedir}/openmpi'
396+
else
397+
OPAL_WRAPPER_EXTRA_CPPFLAGS=
394398
fi
395399
OMPI_WRAPPER_EXTRA_CPPFLAGS="$OMPI_WRAPPER_EXTRA_CPPFLAGS $ompi_mca_wrapper_extra_cppflags $wrapper_extra_cppflags $with_wrapper_cppflags"
396400
AC_SUBST([OMPI_WRAPPER_EXTRA_CPPFLAGS])

0 commit comments

Comments
 (0)