mirror of https://github.com/mgba-emu/mgba.git
macOS: Fix very old Xcode build
This commit is contained in:
parent
0b50e7163e
commit
e2084b4a98
|
@ -240,6 +240,13 @@ if(APPLE)
|
|||
if(NOT CMAKE_SYSTEM_VERSION VERSION_LESS "10.0") # Darwin 10.x is Mac OS X 10.6
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mmacosx-version-min=10.6")
|
||||
endif()
|
||||
# Not supported until Xcode 9
|
||||
if(CMAKE_C_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_C_COMPILER_VERSION VERSION_LESS "9")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__STDC_NO_THREADS__=1")
|
||||
endif()
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D__STDC_NO_THREADS__=1")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT HAIKU AND NOT MSVC AND NOT PSP2)
|
||||
|
|
|
@ -84,6 +84,10 @@ typedef intptr_t ssize_t;
|
|||
#define M_PI 3.141592654f
|
||||
#endif
|
||||
|
||||
#if !defined(__cplusplus) && !defined(static_assert)
|
||||
#define static_assert(X, C) _Static_assert((X), C)
|
||||
#endif
|
||||
|
||||
#if !defined(_MSC_VER) && (defined(__llvm__) || (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7))
|
||||
#define ATOMIC_STORE(DST, SRC) __atomic_store_n(&DST, SRC, __ATOMIC_RELEASE)
|
||||
#define ATOMIC_LOAD(DST, SRC) DST = __atomic_load_n(&SRC, __ATOMIC_ACQUIRE)
|
||||
|
|
Loading…
Reference in New Issue