Fix compile on latest vitaSDK
This commit is contained in:
+7
-4
@@ -121,13 +121,16 @@ CHECK_TYPE_SIZE("long" SIZEOF_LONG)
|
||||
CHECK_TYPE_SIZE("long long" SIZEOF_LONG_LONG)
|
||||
|
||||
|
||||
CHECK_C_COMPILER_FLAG(-std=c11 HAVE_STD_C11)
|
||||
# GNU dialects, not the strict ISO ones: -std=c11 defines __STRICT_ANSI__, which
|
||||
# makes newlib hide the POSIX functions used all over the code (strdup,
|
||||
# strcasecmp, strncasecmp, strtok_r, nanosleep).
|
||||
CHECK_C_COMPILER_FLAG(-std=gnu11 HAVE_STD_C11)
|
||||
IF(HAVE_STD_C11)
|
||||
SET(CMAKE_C_FLAGS "-std=c11 ${CMAKE_C_FLAGS}")
|
||||
SET(CMAKE_C_FLAGS "-std=gnu11 ${CMAKE_C_FLAGS}")
|
||||
ELSE()
|
||||
CHECK_C_COMPILER_FLAG(-std=c99 HAVE_STD_C99)
|
||||
CHECK_C_COMPILER_FLAG(-std=gnu99 HAVE_STD_C99)
|
||||
IF(HAVE_STD_C99)
|
||||
SET(CMAKE_C_FLAGS "-std=c99 ${CMAKE_C_FLAGS}")
|
||||
SET(CMAKE_C_FLAGS "-std=gnu99 ${CMAKE_C_FLAGS}")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user