Fix MacOS and POSIX semaphores related issues
Recently got a MacBook Pro and decided to check how things build on MacOS. Discovered that POSIX unnamed semaphores weren't implemented, so I reimplemented them with conditional variable and mutex. Additionally, fixed scripts and CMake on MacOS
This commit is contained in:
@@ -2,13 +2,24 @@
|
||||
SET(CMAKE_SYSTEM_NAME Windows)
|
||||
SET(CMAKE_SYSTEM_PROCESSOR i686)
|
||||
|
||||
# which compilers to use for C and C++ and ASM-ATT
|
||||
SET(CMAKE_C_COMPILER /usr/bin/i686-w64-mingw32-gcc)
|
||||
SET(CMAKE_CXX_COMPILER /usr/bin/i686-w64-mingw32-g++)
|
||||
SET(CMAKE_ASM-ATT_COMPILER /usr/bin/i686-w64-mingw32-as)
|
||||
# Check path
|
||||
if(EXISTS /usr/bin/i686-w64-mingw32-gcc)
|
||||
# which compilers to use for C and C++ and ASM-ATT
|
||||
SET(CMAKE_C_COMPILER /usr/bin/i686-w64-mingw32-gcc)
|
||||
SET(CMAKE_CXX_COMPILER /usr/bin/i686-w64-mingw32-g++)
|
||||
SET(CMAKE_ASM-ATT_COMPILER /usr/bin/i686-w64-mingw32-as)
|
||||
|
||||
# here is the target environment located
|
||||
SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32)
|
||||
# here is the target environment located
|
||||
SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32)
|
||||
elseif(EXISTS /usr/local/opt/mingw-w64/toolchain-i686/bin/i686-w64-mingw32-gcc)
|
||||
# which compilers to use for C and C++ and ASM-ATT
|
||||
SET(CMAKE_C_COMPILER /usr/local/opt/mingw-w64/toolchain-i686/bin/i686-w64-mingw32-gcc)
|
||||
SET(CMAKE_CXX_COMPILER /usr/local/opt/mingw-w64/toolchain-i686/bin/i686-w64-mingw32-g++)
|
||||
SET(CMAKE_ASM-ATT_COMPILER /usr/local/opt/mingw-w64/toolchain-i686/bin/i686-w64-mingw32-as)
|
||||
|
||||
# here is the target environment located
|
||||
SET(CMAKE_FIND_ROOT_PATH /usr/local/opt/mingw-w64/toolchain-i686/i686-w64-mingw32)
|
||||
endif()
|
||||
|
||||
# adjust the default behaviour of the FIND_XXX() commands:
|
||||
# search headers and libraries in the target environment, search
|
||||
|
||||
@@ -2,13 +2,25 @@
|
||||
SET(CMAKE_SYSTEM_NAME Windows)
|
||||
SET(CMAKE_SYSTEM_PROCESSOR x86_64)
|
||||
|
||||
# which compilers to use for C and C++ and ASM-ATT
|
||||
SET(CMAKE_C_COMPILER /usr/bin/x86_64-w64-mingw32-gcc)
|
||||
SET(CMAKE_CXX_COMPILER /usr/bin/x86_64-w64-mingw32-g++)
|
||||
SET(CMAKE_ASM-ATT_COMPILER /usr/bin/x86_64-w64-mingw32-as)
|
||||
|
||||
# here is the target environment located
|
||||
SET(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32)
|
||||
# Check path
|
||||
if(EXISTS /usr/bin/x86_64-w64-mingw32-gcc)
|
||||
# which compilers to use for C and C++ and ASM-ATT
|
||||
SET(CMAKE_C_COMPILER /usr/bin/x86_64-w64-mingw32-gcc)
|
||||
SET(CMAKE_CXX_COMPILER /usr/bin/x86_64-w64-mingw32-g++)
|
||||
SET(CMAKE_ASM-ATT_COMPILER /usr/bin/x86_64-w64-mingw32-as)
|
||||
|
||||
# here is the target environment located
|
||||
SET(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32)
|
||||
elseif(EXISTS /usr/local/opt/mingw-w64/toolchain-x86_64/bin/x86_64-w64-mingw32-gcc)
|
||||
# which compilers to use for C and C++ and ASM-ATT
|
||||
SET(CMAKE_C_COMPILER /usr/local/opt/mingw-w64/toolchain-x86_64/bin/x86_64-w64-mingw32-gcc)
|
||||
SET(CMAKE_CXX_COMPILER /usr/local/opt/mingw-w64/toolchain-x86_64/bin/x86_64-w64-mingw32-g++)
|
||||
SET(CMAKE_ASM-ATT_COMPILER /usr/local/opt/mingw-w64/toolchain-x86_64/bin/x86_64-w64-mingw32-as)
|
||||
|
||||
# here is the target environment located
|
||||
SET(CMAKE_FIND_ROOT_PATH /usr/local/opt/mingw-w64/toolchain-x86_64/x86_64-w64-mingw32)
|
||||
endif()
|
||||
|
||||
# adjust the default behaviour of the FIND_XXX() commands:
|
||||
# search headers and libraries in the target environment, search
|
||||
|
||||
Reference in New Issue
Block a user