-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·82 lines (59 loc) · 2.21 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
cmake_minimum_required(VERSION 3.2)
project(Filets)
set(CMAKE_CXX_COMPILER "g++")
set(CMAKE_CXX_FLAGS "-std=c++20 -g -march=native -O0")
SET(CMAKE_BUILD_TYPE "Debug")
SET(CMAKE_CXX_FLAGS_DEBUG "$ENV{CXXFLAGS} -O0 -Wall -g -ggdb")
include_directories(./include)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#
#include_directories(Boost_INC /usr/include/boost)
#set(Boost_USE_STATIC_LIBS ON)
#set(BOOST_COMPONENTS date_time chrono filesystem iostreams
# program_options regex system thread unit_test_framework)
#find_package(Boost REQUIRED COMPONENTS ${BOOST_COMPONENTS})
set(LIB_SOUR
src/ReadBuffer.cc
src/WriteBuffer.cc
src/Vecstream.cc
src/DataPayload.cc
src/RequestPayload.cc
src/Recvresponse.cc
src/Frame.cc
src/UdpSocket.cc
src/FiletsServer.cc
src/FiletsClient.cc
)
add_library(Filets STATIC ${LIB_SOUR})
set(TAR_LIB
Filets
)
add_executable(main main.cc)
target_link_libraries(main ${TAR_LIB})
###########################TESTS########################
add_executable(ReadBuffer tests/ReadBufferTest.cc)
target_link_libraries(ReadBuffer ${TAR_LIB})
add_executable(WriteBuffer tests/WriteBufferTest.cc)
target_link_libraries(WriteBuffer ${TAR_LIB})
add_executable(Payload tests/PayloadTest.cc)
add_dependencies(Payload ${TAR_LIB})
target_link_libraries(Payload ${TAR_LIB})
add_executable(Vecstream tests/VecstreamTest.cc)
target_link_libraries(Vecstream ${TAR_LIB})
add_executable(DataPayload tests/DataPayloadTest.cc)
target_link_libraries(DataPayload ${TAR_LIB})
add_executable(RecvResponsePayload tests/RecvResponseTest.cc)
target_link_libraries(RecvResponsePayload ${TAR_LIB})
add_executable(FrameTest tests/FrameTest.cc)
target_link_libraries(FrameTest ${TAR_LIB})
add_executable(UdpSocketTest tests/UdpSocketTest.cc)
target_link_libraries(UdpSocketTest ${TAR_LIB})
add_executable(FiletsServerTest tests/FiletsServerTest.cc)
target_link_libraries(FiletsServerTest ${TAR_LIB})
add_executable(FiletsClientTest tests/FileClientTest.cc)
target_link_libraries(FiletsClientTest ${TAR_LIB})
add_executable(Server tests/Server.cc)
target_link_libraries(Server ${TAR_LIB})
add_executable(Client tests/Client.cc)
target_link_libraries(Client ${TAR_LIB})