Likely add Solaris support.
This commit is contained in:
parent
48997dc9e7
commit
b342ec33e5
@ -56,7 +56,7 @@ function(td_set_up_compiler)
|
||||
else()
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffunction-sections -fdata-sections")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffunction-sections -fdata-sections")
|
||||
if (ILLUMOS)
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "SunOS")
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,ignore")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,ignore")
|
||||
else()
|
||||
@ -85,10 +85,11 @@ function(td_set_up_compiler)
|
||||
add_definitions(-D_FILE_OFFSET_BITS=64)
|
||||
endif()
|
||||
|
||||
if (ILLUMOS)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -lnsl -lsocket")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lnsl -lsocket")
|
||||
add_definitions(-DTD_ILLUMOS=1)
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "SunOS")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lsocket -lnsl")
|
||||
if (ILLUMOS)
|
||||
add_definitions(-DTD_ILLUMOS=1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(AddCXXCompilerFlag)
|
||||
|
@ -26,8 +26,6 @@ if (POLICY CMP0060)
|
||||
cmake_policy(SET CMP0060 NEW)
|
||||
endif()
|
||||
|
||||
include(illumos)
|
||||
|
||||
include(PreventInSourceBuild)
|
||||
prevent_in_source_build()
|
||||
|
||||
|
@ -37,6 +37,9 @@
|
||||
#elif TD_ILLUMOS
|
||||
#define TD_POLL_EPOLL 1
|
||||
#define TD_EVENTFD_LINUX 1
|
||||
#elif TD_SOLARIS
|
||||
#define TD_POLL_POLL 1
|
||||
#define TD_EVENTFD_BSD 1
|
||||
#else
|
||||
#error "Poll's implementation is not defined"
|
||||
#endif
|
||||
|
@ -294,7 +294,7 @@ Result<bool> walk_path_subdir(string &path, DIR *dir, const WalkFunction &func)
|
||||
status = walk_path_file(path, func);
|
||||
}
|
||||
#else
|
||||
#if !TD_ILLUMOS
|
||||
#if !TD_SOLARIS
|
||||
#warning "Slow walk_path"
|
||||
#endif
|
||||
status = walk_path(path, func);
|
||||
|
@ -53,7 +53,9 @@
|
||||
#define TD_CYGWIN 1
|
||||
#elif defined(__EMSCRIPTEN__)
|
||||
#define TD_EMSCRIPTEN 1
|
||||
#elif defined(TD_ILLUMOS)
|
||||
#elif defined(__sun)
|
||||
#define TD_SOLARIS 1
|
||||
// TD_ILLUMOS can be already defined by CMake
|
||||
#elif defined(__unix__) // all unices not caught above
|
||||
#define TD_UNIX_UNKNOWN 1
|
||||
#define TD_CYGWIN 1
|
||||
|
Loading…
Reference in New Issue
Block a user