diff options
author | Anton Danielsson <anton.danielsson@dirac.se> | 2015-10-05 14:59:15 +0200 |
---|---|---|
committer | Anton Danielsson <anton.danielsson@dirac.se> | 2015-10-08 10:48:37 +0200 |
commit | 0a8e0dbb0bff14479da3fbd779afa398caaeae4b (patch) | |
tree | 84fc587a3ef0f62eee3474c8fc66843ce0537a3b /CMakeLists.txt | |
parent | fcf4e99e019cc1a44ab7e0bbe90054f0384c788a (diff) | |
download | google-benchmark-0a8e0dbb0bff14479da3fbd779afa398caaeae4b.tar.gz |
Added Wconversion so the gcc/clang warnings will be more similar to W4 on MSVC.
This also points out some important issues like:
warning: conversion to 'size_t {aka unsigned int}' from 'long long int' may alter its value [-Wconversion]
state.SetBytesProcessed(items_processed * sizeof(v));
This occurs on 32 bit systems where size_t is only 32 bits.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b799a62..1e933d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,6 +37,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") else()
add_cxx_compiler_flag(-Wall)
endif() +add_cxx_compiler_flag(-Wconversion) add_cxx_compiler_flag(-Wextra) add_cxx_compiler_flag(-Wshadow) add_cxx_compiler_flag(-Werror RELEASE) |