diff options
author | Chris Robinson <[email protected]> | 2013-05-22 15:11:39 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2013-05-22 15:11:39 -0700 |
commit | 52efb8d7f43e85659bc84455361f8685a5f493ed (patch) | |
tree | 288da908e7e58e8c32787d03032151461bca9188 /CMakeLists.txt | |
parent | a6fa4a8bc291e4747d9cc66f4c76002c405bfc4e (diff) |
Use restrict instead of RESTRICT
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index b86de3d3..8c85be15 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -95,7 +95,6 @@ SET(LIB_VERSION "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}.${LIB_REVISION}") SET(EXPORT_DECL "") SET(ALIGN_DECL "") -SET(RESTRICT_DECL "") CHECK_TYPE_SIZE("long" SIZEOF_LONG) @@ -104,13 +103,13 @@ CHECK_TYPE_SIZE("long long" SIZEOF_LONG_LONG) CHECK_C_SOURCE_COMPILES("int *restrict foo; int main() {return 0;}" HAVE_RESTRICT) -IF(HAVE_RESTRICT) - SET(RESTRICT_DECL "restrict") -ELSE() +IF(NOT HAVE_RESTRICT) CHECK_C_SOURCE_COMPILES("int *__restrict foo; int main() {return 0;}" HAVE___RESTRICT) IF(HAVE___RESTRICT) - SET(RESTRICT_DECL "__restrict") + ADD_DEFINITIONS(-Drestrict=__restrict) + ELSE() + ADD_DEFINITIONS(-Drestrict=) ENDIF() ENDIF() |