1. Moving WRAPPER_*_FLAGS initialization to configure.ac instead of
having it in config/ompi_setup_cxx.m4 2. Adding --enable-coverage option. This will add teh flags -ftest-coverage and -fprofile-arcs to the flags. Also, one needs to compile with debug and static only to enable code coverage 3. Adding the coverage flag options to WRAPPER_*_FLAGS so that mpicc and co., will add these to teh executables when they are compiled This commit was SVN r5416.
Этот коммит содержится в:
родитель
884a04923e
Коммит
ddead64bcf
@ -18,6 +18,30 @@ dnl
|
||||
AC_DEFUN([OMPI_CONFIGURE_OPTIONS],[
|
||||
ompi_show_subtitle "Configuration options"
|
||||
|
||||
#
|
||||
# Code coverage options
|
||||
#
|
||||
AC_MSG_CHECKING([Whether to run code coverage])
|
||||
AC_ARG_ENABLE(coverage,
|
||||
AC_HELP_STRING([--enable-coverage],
|
||||
[enable code coverage files to be generated]))
|
||||
if test "$enable_coverage" = "yes"; then
|
||||
if test "$enable_shared" = "yes"; then
|
||||
AC_MSG_WARN([Code coverage can run only with static libraries. Please
|
||||
run configure with --enable-static --disable-shared if
|
||||
you want code coverage. Also ensure that you execute
|
||||
make clean too ensure removal of all leftover shared
|
||||
mpi libraries])
|
||||
AC_MSG_ERROR([Cannot continue processing])
|
||||
fi
|
||||
AC_MSG_RESULT([yes])
|
||||
WANT_COVERAGE=1
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
WANT_COVERAGE=0
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# Memory debugging
|
||||
#
|
||||
|
@ -67,6 +67,20 @@ else
|
||||
fi
|
||||
AC_MSG_RESULT([$msg])
|
||||
|
||||
# Do we want code coverage
|
||||
if test "$WANT_COVERAGE" = "1"; then
|
||||
if test "$TRULY_GCC" = "yes"; then
|
||||
CLEANFILES="*.bb *.bbg *.da *.*.gcov ${CLEANFILES}"
|
||||
AC_MSG_WARN([-fprofile-arcs -ftest-coverage has been added to CFLAGS (--enable-coverage)])
|
||||
WANT_DEBUG=1
|
||||
CFLAGS="-ftest-coverage -fprofile-arcs ${CFLAGS}"
|
||||
WRAPPER_EXTRA_CFLAGS="-ftest-coverage -fprofile-arcs ${WRAPPER_EXTRA_CFLAGS}"
|
||||
else
|
||||
AC_MSG_WARN([Code coverage functionality is currently available only with GCC])
|
||||
AC_MSG_ERROR([Configure: Cannot continue])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Do we want debugging?
|
||||
|
||||
if test "$WANT_DEBUG" = "1"; then
|
||||
|
@ -55,6 +55,19 @@ else
|
||||
fi
|
||||
AC_MSG_RESULT([$msg])
|
||||
|
||||
# Do we want code coverage
|
||||
if test "$WANT_COVERAGE" = "1"; then
|
||||
if test "$TRULY_GXX" = "yes"; then
|
||||
AC_MSG_WARN([-fprofile-arcs -ftest-coverage has been added to CFLAGS (--enable-coverage)])
|
||||
WANT_DEBUG=1
|
||||
CXXFLAGS="-ftest-coverage -fprofile-arcs ${CXXFLAGS}"
|
||||
WRAPPER_EXTRA_CXXFLAGS="-ftest-coverage -fprofile-arcs ${WRAPPER_EXTRA_CXXFLAGS}"
|
||||
else
|
||||
AC_MSG_WARN([Code coverage functionality is currently available only with GCC suite])
|
||||
AC_MSG_ERROR([Configure: cannot continue])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Do we want debugging?
|
||||
|
||||
if test "$WANT_DEBUG" = "1"; then
|
||||
@ -99,11 +112,6 @@ fi
|
||||
|
||||
# Check for special things due to C++ exceptions
|
||||
|
||||
WRAPPER_EXTRA_CFLAGS=
|
||||
WRAPPER_EXTRA_FFLAGS=
|
||||
WRAPPER_EXTRA_CXXFLAGS=
|
||||
WRAPPER_EXTRA_LDFLAGS=
|
||||
WRAPPER_EXTRA_LIBS=
|
||||
ENABLE_CXX_EXCEPTIONS=no
|
||||
HAVE_CXX_EXCEPTIONS=0
|
||||
AC_ARG_ENABLE(cxx-exceptions,
|
||||
@ -125,9 +133,9 @@ if test "$ENABLE_CXX_EXCEPTIONS" = "yes"; then
|
||||
CXXFLAGS="$CXXFLAGS $OMPI_CXX_EXCEPTIONS_CXXFLAGS"
|
||||
LDFLAGS="$LDFLAGS $OMPI_CXX_EXCEPTIONS_LDFLAGS"
|
||||
|
||||
WRAPPER_EXTRA_CFLAGS="$OMPI_CXX_EXCEPTIONS_CFLAGS"
|
||||
WRAPPER_EXTRA_FFLAGS="$OMPI_CXX_EXCEPTIONS_FFLAGS"
|
||||
WRAPPER_EXTRA_CXXFLAGS="$OMPI_CXX_EXCEPTIONS_CXXFLAGS"
|
||||
WRAPPER_EXTRA_CFLAGS="$OMPI_CXX_EXCEPTIONS_CFLAGS ${WRAPPER_EXTRA_CFLAGS}"
|
||||
WRAPPER_EXTRA_FFLAGS="$OMPI_CXX_EXCEPTIONS_FFLAGS ${WRAPPER_EXTRA_FFLAGS}"
|
||||
WRAPPER_EXTRA_CXXFLAGS="$OMPI_CXX_EXCEPTIONS_CXXFLAGS ${WRAPPER_EXTRA_CXXFLAGS}"
|
||||
fi
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(OMPI_HAVE_CXX_EXCEPTION_SUPPORT, $HAVE_CXX_EXCEPTIONS,
|
||||
|
@ -151,6 +151,13 @@ ompi_enable_static="$enable_static"
|
||||
AM_ENABLE_SHARED
|
||||
AM_DISABLE_STATIC
|
||||
|
||||
WRAPPER_EXTRA_CFLAGS=
|
||||
WRAPPER_EXTRA_FFLAGS=
|
||||
WRAPPER_EXTRA_CXXFLAGS=
|
||||
WRAPPER_EXTRA_LDFLAGS=
|
||||
WRAPPER_EXTRA_LIBS=
|
||||
|
||||
|
||||
|
||||
############################################################################
|
||||
# Check for compilers and preprocessors
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user