Group common C++ flags

This commit is contained in:
Matt Clarkson 2015-04-30 14:14:27 +01:00
parent bb23a9b9f2
commit e44ee2d005
1 changed files with 5 additions and 6 deletions

View File

@ -42,6 +42,11 @@ 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(-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)
@ -61,12 +66,6 @@ if (BENCHMARK_ENABLE_LTO)
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
cxx_feature_check(STD_REGEX)
cxx_feature_check(GNU_POSIX_REGEX)