mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
bench: use a C++-11 compiler
See https://github.com/google/benchmark#a-faster-keeprunning-loop. * etc/bench.pl.in ($cxx): Be C++11. (&bench_with_gbenchmark): Adjust.
This commit is contained in:
@@ -148,7 +148,7 @@ The C compiler.
|
|||||||
|
|
||||||
=item C<$cxx>
|
=item C<$cxx>
|
||||||
|
|
||||||
The C++ compiler.
|
The C++-11 compiler.
|
||||||
|
|
||||||
=item C<$cflags>
|
=item C<$cflags>
|
||||||
|
|
||||||
@@ -173,7 +173,7 @@ Verbosity level.
|
|||||||
my $bench;
|
my $bench;
|
||||||
my $bison = $ENV{'BISON'} || '@abs_top_builddir@/tests/bison';
|
my $bison = $ENV{'BISON'} || '@abs_top_builddir@/tests/bison';
|
||||||
my $cc = $ENV{'CC'} || 'gcc';
|
my $cc = $ENV{'CC'} || 'gcc';
|
||||||
my $cxx = $ENV{'CXX'} || 'g++';
|
my $cxx = $ENV{'CXX'} || 'g++ -std=c++11';
|
||||||
my $cflags = '-O2';
|
my $cflags = '-O2';
|
||||||
my @directive = ();
|
my @directive = ();
|
||||||
my $gbench = 0;
|
my $gbench = 0;
|
||||||
@@ -579,7 +579,7 @@ static void BM_${prefix} (benchmark::State& state)
|
|||||||
exit (3);
|
exit (3);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (state.KeepRunning())
|
for (auto _ : state)
|
||||||
{
|
{
|
||||||
rewind (input);
|
rewind (input);
|
||||||
${prefix}parse ();
|
${prefix}parse ();
|
||||||
|
|||||||
Reference in New Issue
Block a user