aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-07-23 06:36:34 -0700
committerChris Robinson <[email protected]>2014-07-23 06:36:34 -0700
commita3dbe08c8b9df301dded52ad78f655c2753be56c (patch)
tree69e5d4fd8f3a195bfae430d9a9a5dedf660509f7 /CMakeLists.txt
parente4b779c492e9ffbfce806ac49acae66ab264a7da (diff)
Support C11 atomics
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7b5ec71e..75cb5e4f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -164,6 +164,16 @@ CHECK_C_SOURCE_COMPILES(
}"
HAVE_C11_ALIGNAS)
+# Check if we have C11 _Atomic
+CHECK_C_SOURCE_COMPILES(
+"#include <stdatomic.h>
+ int _Atomic foo;
+ int main()
+ {
+ return atomic_load(&foo);
+ }"
+HAVE_C11_ATOMIC)
+
# Add definitions, compiler switches, etc.
INCLUDE_DIRECTORIES("${OpenAL_SOURCE_DIR}/include" "${OpenAL_BINARY_DIR}")
IF(CMAKE_VERSION VERSION_LESS "2.8.8")