-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
45 lines (45 loc) · 2.37 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
cmake_minimum_required(VERSION 3.20)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_COMPILER g++)
project(DatabaseServer VERSION 1.0)
add_executable(${PROJECT_NAME})
target_sources(${PROJECT_NAME} PRIVATE ApplicationServer.cpp)
target_sources(${PROJECT_NAME} PRIVATE ServerMain.cpp)
target_sources(${PROJECT_NAME} PRIVATE Object.cpp)
target_sources(${PROJECT_NAME} PRIVATE Server.cpp)
target_sources(${PROJECT_NAME} PRIVATE ThreadPool.cpp)
target_sources(${PROJECT_NAME} PRIVATE Sockets.cpp)
set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX)
project(DatabaseClient VERSION 1.0)
add_executable(${PROJECT_NAME})
target_sources(${PROJECT_NAME} PRIVATE ApplicationClient.cpp)
target_sources(${PROJECT_NAME} PRIVATE Client.cpp)
target_sources(${PROJECT_NAME} PRIVATE ClientMain.cpp)
target_sources(${PROJECT_NAME} PRIVATE ThreadPool.cpp)
target_sources(${PROJECT_NAME} PRIVATE Sockets.cpp)
set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX)
project(DatabaseTests VERSION 1.0)
enable_testing()
include(GoogleTest)
add_executable(${PROJECT_NAME})
find_package(GTest REQUIRED)
target_link_libraries(${PROJECT_NAME} GTest::gtest GTest::gtest_main GTest::gmock GTest::gmock_main)
gtest_add_tests(TARGET ${PROJECT_NAME} SOURCES Tests/clientTest.cpp)
gtest_add_tests(TARGET ${PROJECT_NAME} SOURCES Tests/applicationclientTest.cpp)
gtest_add_tests(TARGET ${PROJECT_NAME} SOURCES Tests/objectTest.cpp)
gtest_add_tests(TARGET ${PROJECT_NAME} SOURCES Tests/requeststateTest.cpp)
gtest_add_tests(TARGET ${PROJECT_NAME} SOURCES Tests/serverTest.cpp)
gtest_add_tests(TARGET ${PROJECT_NAME} SOURCES Tests/sharedTest.cpp)
gtest_add_tests(TARGET ${PROJECT_NAME} SOURCES Tests/socketsTest.cpp)
gtest_add_tests(TARGET ${PROJECT_NAME} SOURCES Tests/threadpoolTest.cpp)
target_sources(${PROJECT_NAME} PRIVATE Tests/clientTest.cpp)
target_sources(${PROJECT_NAME} PRIVATE Tests/applicationclientTest.cpp)
target_sources(${PROJECT_NAME} PRIVATE Tests/objectTest.cpp)
target_sources(${PROJECT_NAME} PRIVATE Tests/requeststateTest.cpp)
target_sources(${PROJECT_NAME} PRIVATE Tests/serverTest.cpp)
target_sources(${PROJECT_NAME} PRIVATE Tests/sharedTest.cpp)
target_sources(${PROJECT_NAME} PRIVATE Tests/socketsTest.cpp)
target_sources(${PROJECT_NAME} PRIVATE Tests/threadpoolTest.cpp)
set_target_properties(${PROJECT_NAME} PROPERTIES LINKER_LANGUAGE CXX)