mirror of https://github.com/google/benchmark.git
update standard to C++17 per C++ build support (#1875)
* update standard to C++17 per C++ build support * disable deadcode checks from clang-tidy * fix redundant definition of constexpr
This commit is contained in:
parent
50ffd3e546
commit
62a321d6dc
|
@ -35,4 +35,4 @@ jobs:
|
||||||
- name: run
|
- name: run
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: ${{ runner.workspace }}/_build
|
working-directory: ${{ runner.workspace }}/_build
|
||||||
run: run-clang-tidy
|
run: run-clang-tidy -checks=*,-clang-analyzer-deadcode*
|
||||||
|
|
|
@ -3,7 +3,7 @@ licenses(["notice"])
|
||||||
COPTS = [
|
COPTS = [
|
||||||
"-pedantic",
|
"-pedantic",
|
||||||
"-pedantic-errors",
|
"-pedantic-errors",
|
||||||
"-std=c++14",
|
"-std=c++17",
|
||||||
"-Wall",
|
"-Wall",
|
||||||
"-Wconversion",
|
"-Wconversion",
|
||||||
"-Wextra",
|
"-Wextra",
|
||||||
|
|
|
@ -138,7 +138,7 @@ if (BENCHMARK_BUILD_32_BITS)
|
||||||
add_required_cxx_compiler_flag(-m32)
|
add_required_cxx_compiler_flag(-m32)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(BENCHMARK_CXX_STANDARD 14)
|
set(BENCHMARK_CXX_STANDARD 17)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD ${BENCHMARK_CXX_STANDARD})
|
set(CMAKE_CXX_STANDARD ${BENCHMARK_CXX_STANDARD})
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED YES)
|
set(CMAKE_CXX_STANDARD_REQUIRED YES)
|
||||||
|
|
|
@ -26,8 +26,6 @@
|
||||||
namespace benchmark {
|
namespace benchmark {
|
||||||
namespace internal {
|
namespace internal {
|
||||||
|
|
||||||
constexpr size_t PerfCounterValues::kMaxCounters;
|
|
||||||
|
|
||||||
#if defined HAVE_LIBPFM
|
#if defined HAVE_LIBPFM
|
||||||
|
|
||||||
size_t PerfCounterValues::Read(const std::vector<int>& leaders) {
|
size_t PerfCounterValues::Read(const std::vector<int>& leaders) {
|
||||||
|
|
|
@ -10,7 +10,7 @@ platform(
|
||||||
TEST_COPTS = [
|
TEST_COPTS = [
|
||||||
"-pedantic",
|
"-pedantic",
|
||||||
"-pedantic-errors",
|
"-pedantic-errors",
|
||||||
"-std=c++14",
|
"-std=c++17",
|
||||||
"-Wall",
|
"-Wall",
|
||||||
"-Wconversion",
|
"-Wconversion",
|
||||||
"-Wextra",
|
"-Wextra",
|
||||||
|
|
Loading…
Reference in New Issue