@@ -67,7 +67,9 @@ SET(trantor_sources
6767 trantor/net/inner/Socket.cc
6868 trantor/net/inner/TcpConnectionImpl.cc
6969 trantor/net/inner/Timer.cc
70- trantor/net/inner/TimerQueue.cc)
70+ trantor/net/inner/TimerQueue.cc
71+ trantor/net/inner/poller/EpollPoller.cc
72+ trantor/net/inner/poller/KQueue.cc)
7173
7274FIND_PACKAGE (OpenSSL)
7375IF (OpenSSL_FOUND)
@@ -78,21 +80,6 @@ ELSE()
7880 SET (trantor_sources ${trantor_sources} trantor/net/ssl/SSLConnectionSkipped.cc)
7981ENDIF ()
8082
81- IF (CMAKE_SYSTEM_NAME MATCHES "Linux" )
82- SET (trantor_sources ${trantor_sources} ${PROJECT_SOURCE_DIR} /trantor/net/inner/poller/EpollPoller.cc)
83- MESSAGE (STATUS "current platform: Linux " )
84- ELSEIF (CMAKE_SYSTEM_NAME MATCHES "Windows" )
85- MESSAGE (FATAL_ERROR "Error: Currently does not support Windows" )
86- ELSEIF (CMAKE_SYSTEM_NAME MATCHES "FreeBSD" )
87- SET (trantor_sources ${trantor_sources} ${PROJECT_SOURCE_DIR} /trantor/net/inner/poller/KQueue.cc)
88- MESSAGE (STATUS "current platform: FreeBSD" )
89- ELSEIF (CMAKE_SYSTEM_NAME MATCHES "Darwin" )
90- SET (trantor_sources ${trantor_sources} ${PROJECT_SOURCE_DIR} /trantor/net/inner/poller/KQueue.cc)
91- MESSAGE (STATUS "current platform: MacOS" )
92- ELSE ()
93- MESSAGE (STATUS "other platform: ${CMAKE_SYSTEM_NAME} " )
94- ENDIF (CMAKE_SYSTEM_NAME MATCHES "Linux" )
95-
9683ADD_LIBRARY (trantor ${trantor_sources} )
9784SET_PROPERTY (TARGET trantor PROPERTY CXX_STANDARD 14)
9885SET_PROPERTY (TARGET trantor PROPERTY CXX_STANDARD_REQUIRED ON )
0 commit comments