aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-04-07 11:48:28 -0700
committerChris Robinson <[email protected]>2014-04-07 11:48:28 -0700
commitc6821e5dd177a0d5e36047de8a107bc650ae8725 (patch)
treec9d4d88c6c834459c93c7c71eaffe773b3c016b1 /CMakeLists.txt
parentf1a4b95b8cf483316025d95727b56da736546ccf (diff)
Use C11's static_assert when available
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index fd532dca..eab0b1c2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -169,6 +169,14 @@ CHECK_C_SOURCE_COMPILES(
}"
HAVE_C99_VLA)
+# Check if we have C11 static_assert
+CHECK_C_SOURCE_COMPILES(
+"int main()
+ {
+ _Static_assert(sizeof(int) == sizeof(int), \"What\");
+ return 0;
+ }"
+HAVE_C11_STATIC_ASSERT)
# Add definitions, compiler switches, etc.
INCLUDE_DIRECTORIES("${OpenAL_SOURCE_DIR}/include" "${OpenAL_BINARY_DIR}")