mirror of
https://github.com/google/benchmark.git
synced 2025-03-06 15:20:10 +08:00
Group common C++ flags
This commit is contained in:
parent
bb23a9b9f2
commit
e44ee2d005
@ -42,6 +42,11 @@ add_cxx_compiler_flag(-pedantic-errors)
|
|||||||
add_cxx_compiler_flag(-Wshorten-64-to-32)
|
add_cxx_compiler_flag(-Wshorten-64-to-32)
|
||||||
add_cxx_compiler_flag(-Wfloat-equal)
|
add_cxx_compiler_flag(-Wfloat-equal)
|
||||||
add_cxx_compiler_flag(-Wzero-as-null-pointer-constant)
|
add_cxx_compiler_flag(-Wzero-as-null-pointer-constant)
|
||||||
|
add_cxx_compiler_flag(-Wthread-safety)
|
||||||
|
if (HAVE_WTHREAD_SAFETY)
|
||||||
|
add_definitions(-DHAVE_WTHREAD_SAFETY)
|
||||||
|
cxx_feature_check(THREAD_SAFETY_ATTRIBUTES)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Release flags
|
# Release flags
|
||||||
add_cxx_compiler_flag(-fno-strict-aliasing RELEASE)
|
add_cxx_compiler_flag(-fno-strict-aliasing RELEASE)
|
||||||
@ -61,12 +66,6 @@ if (BENCHMARK_ENABLE_LTO)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_cxx_compiler_flag(-Wthread-safety)
|
|
||||||
if (HAVE_WTHREAD_SAFETY)
|
|
||||||
add_definitions(-DHAVE_WTHREAD_SAFETY)
|
|
||||||
cxx_feature_check(THREAD_SAFETY_ATTRIBUTES)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# C++ feature checks
|
# C++ feature checks
|
||||||
cxx_feature_check(STD_REGEX)
|
cxx_feature_check(STD_REGEX)
|
||||||
cxx_feature_check(GNU_POSIX_REGEX)
|
cxx_feature_check(GNU_POSIX_REGEX)
|
||||||
|
Loading…
Reference in New Issue
Block a user