diff options
author | Chris Robinson <[email protected]> | 2014-04-07 11:48:28 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-04-07 11:48:28 -0700 |
commit | c6821e5dd177a0d5e36047de8a107bc650ae8725 (patch) | |
tree | c9d4d88c6c834459c93c7c71eaffe773b3c016b1 /CMakeLists.txt | |
parent | f1a4b95b8cf483316025d95727b56da736546ccf (diff) |
Use C11's static_assert when available
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
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}") |