aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2014-03-23 01:35:15 -0700
committerChris Robinson <[email protected]>2014-03-23 01:35:15 -0700
commitcc599333a8100dd3b8e52ef018e01d4e184c1532 (patch)
treea766c90f1f34cfc8b12d05c195443dfd5c38171d
parent9959972c7e2a7479d8776e71133cfddf5cf756ce (diff)
Don't try to use __restrict as a replacement for restrict
The compiler it's intended for, MSVC, can't use it anyway because of problems it causes with __declspec(restrict).
-rw-r--r--CMakeLists.txt15
1 files changed, 2 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b22ff6c6..d80fbfcc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -125,19 +125,8 @@ IF(MSVC)
CHECK_C_SOURCE_COMPILES("int *restrict foo;
int main() {return 0;}" HAVE_RESTRICT)
IF(NOT HAVE_RESTRICT)
- # Slightly convoluted way to do this, because MSVC may barf if restrict is
- # defined to __restrict.
- CHECK_C_SOURCE_COMPILES("#define restrict __restrict
- #include <stdlib.h>
- int *restrict foo;
- int main() {return 0;}" HAVE___RESTRICT)
- IF(HAVE___RESTRICT)
- ADD_DEFINITIONS(-Drestrict=__restrict)
- SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Drestrict=__restrict")
- ELSE()
- ADD_DEFINITIONS("-Drestrict=")
- SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Drestrict=")
- ENDIF()
+ ADD_DEFINITIONS("-Drestrict=")
+ SET(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Drestrict=")
ENDIF()
CHECK_C_SOURCE_COMPILES("inline void foo(void) { }