Check for __restrict in a way to make MSVC happy, hopefully
This commit is contained in:
+5
-1
@@ -104,7 +104,11 @@ CHECK_TYPE_SIZE("long long" SIZEOF_LONG_LONG)
|
||||
CHECK_C_SOURCE_COMPILES("int *restrict foo;
|
||||
int main() {return 0;}" HAVE_RESTRICT)
|
||||
IF(NOT HAVE_RESTRICT)
|
||||
CHECK_C_SOURCE_COMPILES("int *__restrict foo;
|
||||
# Slightly convoluted way to do this, because MSVC may barf is 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)
|
||||
|
||||
Reference in New Issue
Block a user