aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-05-02 17:06:32 -0700
committerChris Robinson <[email protected]>2011-05-02 17:06:32 -0700
commit24aaa24b5c39db0a204b7ed78d5bbc154563dd0a (patch)
tree32144e38d2087add9d82b264822d4417f0c8cfe7 /CMakeLists.txt
parentfd795a7eebf3259c01e409495b61487a4e706b88 (diff)
Check for the C99 restrict keyword
GCC does not default to C99 mode yet, so does not know restrict, however it still allows using __restrict in its place
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 78110594..a4d4c254 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -66,6 +66,12 @@ CHECK_TYPE_SIZE("unsigned int" SIZEOF_UINT)
CHECK_TYPE_SIZE("void*" SIZEOF_VOIDP)
+CHECK_C_SOURCE_COMPILES("int *restrict foo;
+ int main() {return 0;}" HAVE_RESTRICT)
+CHECK_C_SOURCE_COMPILES("int *__restrict foo;
+ int main() {return 0;}" HAVE___RESTRICT)
+
+
# Add definitions, compiler switches, etc.
INCLUDE_DIRECTORIES(OpenAL32/Include include "${OpenAL_BINARY_DIR}")