mirror of
https://github.com/google/benchmark.git
synced 2025-04-12 20:41:14 +08:00
Fix thread safety attribute detection
This commit is contained in:
parent
7aea5d74a3
commit
9ac1d48c6c
@ -31,17 +31,16 @@ add_cxx_compiler_flag(-Wextra)
|
||||
add_cxx_compiler_flag(-Wshadow)
|
||||
add_cxx_compiler_flag(-Werror)
|
||||
add_cxx_compiler_flag(-pedantic-errors)
|
||||
# TODO(ericwf): enable this for g++
|
||||
#add_cxx_compiler_flag(-Wzero-as-null-pointer-constant)
|
||||
# Release flags
|
||||
add_cxx_compiler_flag(-fno-strict-aliasing RELEASE)
|
||||
|
||||
add_cxx_compiler_flag(-Wthread-safety)
|
||||
if (HAVE_WTHREAD_SAFETY)
|
||||
add_definitions(-DHAVE_WTHREAD_SAFETY)
|
||||
cxx_feature_check(THREAD_SAFETY_ATTRIBUTES)
|
||||
endif()
|
||||
# TODO(ericwf): enable this for g++
|
||||
#add_cxx_compiler_flag(-Wzero-as-null-pointer-constant)
|
||||
|
||||
# Release flags
|
||||
add_cxx_compiler_flag(-fno-strict-aliasing RELEASE)
|
||||
|
||||
|
||||
|
||||
# C++ feature checks
|
||||
|
@ -1,6 +1,3 @@
|
||||
#ifndef HAVE_WTHREAD_SAFETY
|
||||
#error
|
||||
#endif
|
||||
#define HAVE_THREAD_SAFETY_ATTRIBUTES
|
||||
#include "../src/mutex.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user