Some fixes for OS X build.

This commit is contained in:
Ivan Lezhankin 2019-09-04 18:17:18 +03:00
parent f01706ad11
commit 1b5192706e
3 changed files with 4 additions and 3 deletions

View File

@ -198,7 +198,7 @@ if (UNBUNDLED OR NOT (OS_LINUX OR APPLE) OR ARCH_32)
endif ()
# Make this extra-checks for correct library dependencies.
if (NOT SANITIZE)
if (OS_LINUX AND NOT SANITIZE)
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--no-undefined")
endif ()

View File

@ -9,6 +9,7 @@
#ifdef __APPLE__
// ucontext is not available without _XOPEN_SOURCE
# pragma clang diagnostic ignored "-Wreserved-id-macro"
# define _XOPEN_SOURCE 700
#endif
#include <ucontext.h>

View File

@ -84,7 +84,7 @@ elseif (USE_TCMALLOC)
endif ()
elseif (SANITIZE)
message (STATUS "Will use ${SANITIZE} sanitizer.")
else ()
elseif (OS_LINUX)
message (WARNING "Non default allocator is disabled. This is not recommended for production Linux builds.")
endif ()