From 55539462b4d2171d675f1a20a95efd635e52e9bb Mon Sep 17 00:00:00 2001 From: "Gary R. Van Sickle" Date: Sun, 23 Oct 2016 13:34:33 -0500 Subject: [PATCH] Interim/misc. Added installed ripgrep to benchmark suite. --- configure.ac | 20 +++++++++++--------- src/libext/filesystem.hpp | 2 -- tests/atlocal.in | 4 ++++ tests/benchmark_progs.csv | 1 + tests/opts_defs.csv | 1 + tests/test_cases.csv | 12 ++++++------ 6 files changed, 23 insertions(+), 17 deletions(-) diff --git a/configure.ac b/configure.ac index 2e960f8f..b012b7d6 100644 --- a/configure.ac +++ b/configure.ac @@ -243,7 +243,7 @@ PKG_CHECK_MODULES([PCRE], [libpcre >= 8.21], AC_SUBST([HAVE_LIBPCRE], [yes]) AC_DEFINE([HAVE_LIBPCRE], [1], [Define if libpcre is available.]) ], - [AC_MSG_WARN([Unable to find libpcre: $PCRE_PKG_ERRORS])]) + [AC_SUBST([HAVE_LIBPCRE], [no])]) PKG_CHECK_MODULES([PCRE2], [libpcre2-8 >= 10.20], [ @@ -251,12 +251,7 @@ PKG_CHECK_MODULES([PCRE2], [libpcre2-8 >= 10.20], AC_SUBST([HAVE_LIBPCRE2], [yes]) AC_DEFINE([HAVE_LIBPCRE2], [1], [Define if libpcre2 is available.]) ], - [AC_MSG_WARN([Unable to find libpcre2: $PCRE2_PKG_ERRORS])]) - -# Make sure we found at least one of them. -AS_IF([test "x$HAVE_LIBPCRE" = x -a "x$HAVE_LIBPCRE2" = x], - [AC_MSG_ERROR([unable to find a suitable pcre library.])], - [AC_MSG_NOTICE([found at least one usable pcre library.])]) + [AC_SUBST([HAVE_LIBPCRE2], [no])]) AC_LANG_POP([C++]) @@ -313,9 +308,9 @@ AC_LANG_PUSH([C++]) # Check if the C++ compiler supports some flags we'd like to set. # Append them to AM_CXXFLAGS if it does. AX_APPEND_COMPILE_FLAGS([-fno-omit-frame-pointer], [AM_CXXFLAGS]) -#AX_APPEND_COMPILE_FLAGS([-save-temps], [AM_CXXFLAGS]) # -fverbose-asm +#AX_APPEND_COMPILE_FLAGS([-save-temps], [AM_CXXFLAGS]) # -fverbose-asm #AX_APPEND_COMPILE_FLAGS([-Wnoexcept], [AM_CXXFLAGS]) # Warn if something isn't marked noexcept when it could be. @note Doesn't seem to do anything. -AX_APPEND_COMPILE_FLAGS([-ftree-vectorize], [AM_CXXFLAGS]) # -fopt-info-optimized -msse4.2], [AM_CXXFLAGS]) # -fopt-info-vec-all +AX_APPEND_COMPILE_FLAGS([-ftree-vectorize], [AM_CXXFLAGS]) # -fopt-info-optimized -fopt-info-vec-all #AX_APPEND_COMPILE_FLAGS([-flto -ffat-lto-objects], [AM_CXXFLAGS]) AX_APPEND_COMPILE_FLAGS([-pthread], [AM_CXXFLAGS]) AX_APPEND_COMPILE_FLAGS([-Wformat -Wformat-security], [AM_CXXFLAGS]) @@ -514,3 +509,10 @@ AC_MSG_NOTICE([ runpath_var: $runpath_var ]) + + +# Make sure we found at least one of the PCRE libs. +AS_IF([test "x$HAVE_LIBPCRE" = x -a "x$HAVE_LIBPCRE2" = x], + [AC_MSG_ERROR([unable to find a suitable pcre library.])], + [AC_MSG_NOTICE([found at least one usable pcre library.])]) + diff --git a/src/libext/filesystem.hpp b/src/libext/filesystem.hpp index 2be58067..6c07d531 100644 --- a/src/libext/filesystem.hpp +++ b/src/libext/filesystem.hpp @@ -76,8 +76,6 @@ using dev_ino_pair_type = std::conditional< uint_t<(sizeof(dev_t)+sizeof(ino_t))*8>::fast >::type; -///static_assert(sizeof(dev_ino_pair_type) != 128/8, "ERROR"); - struct dev_ino_pair { dev_ino_pair() = default; diff --git a/tests/atlocal.in b/tests/atlocal.in index 7e08f4e1..e6f40e25 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -55,6 +55,10 @@ fi #if PROG_ACK="$(which ack)"; #then #fi +if PROG_INST_RIPGREP="$(which rg 2>/dev/null)"; +then + PROGLIST=$PROGLIST,inst_ripgrep:$PROG_INST_RIPGREP +fi if test -x "${PROG_PCRE2GREP}"; then PROGLIST=$PROGLIST,inst_pcre2grep:$PROG_PCRE2GREP diff --git a/tests/benchmark_progs.csv b/tests/benchmark_progs.csv index 15c032ac..c07c1f40 100644 --- a/tests/benchmark_progs.csv +++ b/tests/benchmark_progs.csv @@ -3,6 +3,7 @@ built_ucg,ucg,true,--noenv,--dirjobs=,-j,--ignore-dir=,only_cpp_ack inst_ucg,${PROG_INST_UCG},true,--noenv,--dirjobs=,-j,--ignore-dir=,only_cpp_ack fake_for_test,nosuchprog,true,-Abc,,,--exclude-dir=,only_cpp_ack inst_ag,${PROG_INST_AG},true,,,,--ignore-dir=,only_cpp_ack +inst_ripgrep,${PROG_INST_RIPGREP},false,,,-j,--glob !,only_cpp_rg inst_pcre2grep,${PROG_PCRE2GREP},true,-rn --color,,,--exclude-dir=,only_cpp_pcre2grep inst_system_grep,grep,false,-Ern --color,,,--exclude-dir=,only_cpp_grep inst_gnu_grep_e,${PROG_GNU_GREP},false,-Ern --color,,,--exclude-dir=,only_cpp_grep diff --git a/tests/opts_defs.csv b/tests/opts_defs.csv index bb0e6191..4b2ca859 100644 --- a/tests/opts_defs.csv +++ b/tests/opts_defs.csv @@ -2,3 +2,4 @@ opt_id,opt_expansion only_cpp_ack,--cpp only_cpp_grep,--include=\\*.cpp --include=\\*.hpp --include=\\*.h --include=\\*.cc --include=\\*.cxx only_cpp_pcre2grep,'--exclude=^.*(?