-
Notifications
You must be signed in to change notification settings - Fork 8
/
CMakeLists.txt
executable file
·14 lines (9 loc) · 5.09 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
cmake_minimum_required(VERSION 3.5)
project(tinyWS)
set(CMAKE_CXX_STANDARD 11)
find_package(Threads REQUIRED)
add_executable(tinyWS_thread multiThread/main.cpp multiThread/net/Epoll.cpp multiThread/net/Epoll.h multiThread/net/EventLoop.cpp multiThread/net/EventLoop.h multiThread/net/Channel.cpp multiThread/net/Channel.h multiThread/base/noncopyable.h multiThread/base/Thread.cpp multiThread/base/Thread.h multiThread/base/ThreadPool.cpp multiThread/base/ThreadPool.h multiThread/base/MutexLock.h multiThread/base/Condition.h multiThread/net/Timer.cpp multiThread/net/Timer.h multiThread/net/TimerQueue.cpp multiThread/net/TimerQueue.h multiThread/net/EventLoopThread.cpp multiThread/net/EventLoopThread.h multiThread/net/EventLoopThreadPool.cpp multiThread/net/EventLoopThreadPool.h multiThread/base/Singleton.h multiThread/net/TimerId.h multiThread/net/Acceptor.cpp multiThread/net/Acceptor.h multiThread/net/InternetAddress.cpp multiThread/net/InternetAddress.h multiThread/net/Socket.cpp multiThread/net/Socket.h multiThread/net/TcpServer.cpp multiThread/net/TcpServer.h multiThread/net/TcpConnection.cpp multiThread/net/TcpConnection.h multiThread/net/Buffer.cpp multiThread/net/Buffer.h multiThread/net/CallBack.h multiThread/http/HttpServer.cpp multiThread/http/HttpServer.h multiThread/http/HttpRequest.cpp multiThread/http/HttpRequest.h multiThread/http/HttpResponse.cpp multiThread/http/HttpResponse.h multiThread/http/HttpContext.cpp multiThread/http/HttpContext.h multiThread/base/BlockingQueue.h multiThread/base/BoundedBlockingQueue.h multiThread/base/Atomic.h multiThread/base/Logger.cpp multiThread/base/Logger.h multiThread/base/ThreadPool_cpp11.cpp multiThread/base/ThreadPool_cpp11.h multiThread/base/any.h multiThread/base/ObjectPool.h multiThread/net/Connector.cpp multiThread/net/Connector.h multiThread/net/TcpClient.cpp multiThread/net/TcpClient.h multiThread/base/FileUtil.cpp multiThread/base/FileUtil.h multiThread/base/LogFile.cpp multiThread/base/LogFile.h multiThread/base/LogStream.cpp multiThread/base/LogStream.h multiThread/base/AsyncLogging.cpp multiThread/base/AsyncLogging.h multiThread/base/CountDownLatch.cpp multiThread/base/CountDownLatch.h multiThread/base/AsyncLogger.cpp multiThread/base/AsyncLogger.h multiThread/base/Exception.cpp multiThread/base/Exception.h multiThread/base/ThreadLocal.h multiThread/base/SpinLock.h)
target_link_libraries(tinyWS_thread ${CMAKE_THREAD_LIBS_INIT})
add_executable(tinyWS_process1 multiProcess1/main.cpp multiProcess1/net/Process.cpp multiProcess1/net/Process.h multiProcess1/base/noncopyable.h multiProcess1/net/ProcessPool.cpp multiProcess1/net/ProcessPool.h multiProcess1/net/EventLoop.cpp multiProcess1/net/EventLoop.h multiProcess1/net/Epoll.cpp multiProcess1/net/Epoll.h multiProcess1/net/Channel.cpp multiProcess1/net/Channel.h multiProcess1/net/Timer.cpp multiProcess1/net/Timer.h multiProcess1/net/TimerId.h multiProcess1/net/TimerQueue.cpp multiProcess1/net/TimerQueue.h multiProcess1/net/type.h multiProcess1/net/Acceptor.cpp multiProcess1/net/Acceptor.h multiProcess1/net/InternetAddress.cpp multiProcess1/net/InternetAddress.h multiProcess1/net/Socket.cpp multiProcess1/net/Socket.h multiProcess1/net/Buffer.cpp multiProcess1/net/Buffer.h multiProcess1/net/TcpConnection.cpp multiProcess1/net/TcpConnection.h multiProcess1/net/TcpServer.cpp multiProcess1/net/TcpServer.h multiProcess1/net/SocketPair.cpp multiProcess1/net/SocketPair.h multiProcess1/http/HttpContext.cpp multiProcess1/http/HttpContext.h multiProcess1/http/HttpRequest.cpp multiProcess1/http/HttpRequest.h multiProcess1/http/HttpResponse.cpp multiProcess1/http/HttpResponse.h multiProcess1/http/HttpServer.cpp multiProcess1/http/HttpServer.h multiProcess1/base/Signal.h multiProcess1/net/status.cpp multiProcess1/net/status.h)
add_executable(tinyWS_process2 multiProcess2/main.cpp multiProcess2/base/noncopyable.h multiProcess2/net/ProcessPool.cpp multiProcess2/net/ProcessPool.h multiProcess2/net/EventLoop.cpp multiProcess2/net/EventLoop.h multiProcess2/net/Epoll.cpp multiProcess2/net/Epoll.h multiProcess2/net/Channel.cpp multiProcess2/net/Channel.h multiProcess2/net/Timer.cpp multiProcess2/net/Timer.h multiProcess2/net/TimerId.h multiProcess2/net/TimerQueue.cpp multiProcess2/net/TimerQueue.h multiProcess2/net/type.h multiProcess2/net/Acceptor.cpp multiProcess2/net/Acceptor.h multiProcess2/net/InternetAddress.cpp multiProcess2/net/InternetAddress.h multiProcess2/net/Socket.cpp multiProcess2/net/Socket.h multiProcess2/net/Buffer.cpp multiProcess2/net/Buffer.h multiProcess2/net/TcpConnection.cpp multiProcess2/net/TcpConnection.h multiProcess2/net/TcpServer.cpp multiProcess2/net/TcpServer.h multiProcess2/http/HttpContext.cpp multiProcess2/http/HttpContext.h multiProcess2/http/HttpRequest.cpp multiProcess2/http/HttpRequest.h multiProcess2/http/HttpResponse.cpp multiProcess2/http/HttpResponse.h multiProcess2/http/HttpServer.cpp multiProcess2/http/HttpServer.h multiProcess2/base/Signal.h multiProcess2/net/status.cpp multiProcess2/net/status.h multiProcess2/base/ProcessMutexLock.h multiProcess2/base/ProcessCondition.h multiProcess2/base/any.h multiProcess1/base/any.h)
target_link_libraries(tinyWS_process2 ${CMAKE_THREAD_LIBS_INIT})