diff options
author | Adam Langley <alangley@gmail.com> | 2015-05-15 22:01:29 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2015-05-20 22:14:59 +0300 |
commit | 6f2e733bab69a5c853a929a96671736458b8d4c1 (patch) | |
tree | efbff366b0b384afc15bc85a6d52868ea8f43078 /CMakeLists.txt | |
parent | daaff93464f79b9f1f06cac39d56125892280ee9 (diff) |
Add infrastructure for reference counts.
OpenSSL has traditionally done reference counting with |int|s and the
|CRYPTO_add| function. Unless a special callback is installed (rare),
this is implemented by doing the reference count operations under a
lock.
This change adds infrastructure for handling reference counts and uses
atomic operations when C11 support is available.
Change-Id: Ia023ce432319efd00f77a7340da27d16ee4b63c3
Reviewed-on: https://boringssl-review.googlesource.com/4771
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e41ee9f..8ab22f5d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -76,6 +76,11 @@ if((CMAKE_COMPILER_IS_GNUCXX AND CMAKE_C_COMPILER_VERSION VERSION_GREATER "4.7.9 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshadow") endif() +if((CMAKE_COMPILER_IS_GNUCXX AND CMAKE_C_COMPILER_VERSION VERSION_GREATER "4.8.99") OR + CMAKE_CXX_COMPILER_ID MATCHES "Clang") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -D_XOPEN_SOURCE=700") +endif() + add_definitions(-DBORINGSSL_IMPLEMENTATION) if (BUILD_SHARED_LIBS) |