1
0
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:
Eric Fiselier 2015-02-18 20:34:31 -05:00
parent 7aea5d74a3
commit 9ac1d48c6c
2 changed files with 5 additions and 9 deletions

View File

@ -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

View File

@ -1,6 +1,3 @@
#ifndef HAVE_WTHREAD_SAFETY
#error
#endif
#define HAVE_THREAD_SAFETY_ATTRIBUTES
#include "../src/mutex.h"