mirror of
https://github.com/oxen-io/lokinet.git
synced 2024-11-15 12:13:24 +00:00
0b4d787042
- Multi-stage docker build (final image only 15MB!) - Build in release mode - Fix bug with release mode - Fix compiler being dumb AF - Disable FORTIFY for now - Enable LTO when making a staticly linked release - Fix some gcc specific warnings - Refactor cmake stuff into multiple files
24 lines
1009 B
CMake
24 lines
1009 B
CMake
if(${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
|
|
# check if we have the (saner) emulation of epoll here
|
|
# it's basically linux epoll but with a sane method of
|
|
# dealing with closed file handles that still exist in the
|
|
# epoll set
|
|
#
|
|
# Note that the zombie of Oracle Solaris 2.11.x will NOT have
|
|
# this, the header check is the only method we have to distinguish
|
|
# them. -rick the svr4 guy
|
|
set(SOLARIS ON)
|
|
option(USE_POLL "Revert to using poll(2) event loop (useful if targeting Oracle Solaris)" OFF)
|
|
set(CMAKE_CXX_STANDARD_LIBRARIES "${CMAKE_CXX_STANDARD_LIBRARIES} -lsocket -lnsl")
|
|
add_definitions(-D_POSIX_PTHREAD_SEMANTICS)
|
|
INCLUDE(CheckIncludeFiles)
|
|
CHECK_INCLUDE_FILES(sys/epoll.h SOLARIS_HAVE_EPOLL)
|
|
if (SOLARIS_HAVE_EPOLL AND NOT USE_POLL)
|
|
message(STATUS "Using fast emulation of Linux epoll(5) on Solaris.")
|
|
add_definitions(-DSOLARIS_HAVE_EPOLL)
|
|
else()
|
|
set(SOLARIS_HAVE_EPOLL OFF)
|
|
message(STATUS "Falling back to poll(2)-based event loop.")
|
|
endif()
|
|
endif()
|