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