mirror of https://github.com/google/benchmark.git
Enable strict aliasing warnings
This commit is contained in:
parent
36c1eb6975
commit
344775db63
|
@ -40,15 +40,16 @@ add_cxx_compiler_flag(-pedantic-errors)
|
|||
add_cxx_compiler_flag(-Wshorten-64-to-32)
|
||||
add_cxx_compiler_flag(-Wfloat-equal)
|
||||
add_cxx_compiler_flag(-Wzero-as-null-pointer-constant)
|
||||
add_cxx_compiler_flag(-fstrict-aliasing)
|
||||
if (HAVE_CXX_FLAG_FSTRICT_ALIASING)
|
||||
add_cxx_compiler_flag(-Wstrict-aliasing)
|
||||
endif()
|
||||
add_cxx_compiler_flag(-Wthread-safety)
|
||||
if (HAVE_WTHREAD_SAFETY)
|
||||
add_definitions(-DHAVE_WTHREAD_SAFETY)
|
||||
cxx_feature_check(THREAD_SAFETY_ATTRIBUTES)
|
||||
endif()
|
||||
|
||||
# Release flags
|
||||
add_cxx_compiler_flag(-fno-strict-aliasing RELEASE)
|
||||
|
||||
# Link time optimisation
|
||||
if (BENCHMARK_ENABLE_LTO)
|
||||
add_cxx_compiler_flag(-flto)
|
||||
|
|
Loading…
Reference in New Issue