-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4782a8e
commit 81b682e
Showing
42 changed files
with
84 additions
and
145 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,5 +14,7 @@ http { | |
port: 5432; | ||
dbname: VVT-i; | ||
} | ||
|
||
fs_root: /; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
cmake_minimum_required(VERSION 3.6) | ||
|
||
set(CMAKE_CXX_STANDARD 20) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
set(DATABASE_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/database_lib) | ||
set(FS_WORKER_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/fs_worker_lib) | ||
|
||
add_subdirectory(${DATABASE_LIB_DIR}) | ||
add_subdirectory(${FS_WORKER_LIB_DIR}) | ||
add_subdirectory(server) | ||
project(project) | ||
|
||
# Include all libraries | ||
add_subdirectory(database_lib) | ||
add_subdirectory(fs_worker_lib) | ||
add_subdirectory(server_lib) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,21 @@ | ||
cmake_minimum_required(VERSION 3.16.3) | ||
cmake_minimum_required(VERSION 3.6) | ||
|
||
find_library(PQXX_LIB pqxx) | ||
find_library(PQ_LIB pq) | ||
find_package(GTest REQUIRED) | ||
find_package(Threads REQUIRED) | ||
|
||
#set(CMAKE_CXX_STANDARD 14) | ||
project(database_lib) | ||
|
||
# Set the 20th standard | ||
set(CMAKE_CXX_STANDARD 20) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lpqxx -lpq") | ||
set(DATABASE_LIB_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/include/) | ||
message(${DATABASE_LIB_INCLUDES}) | ||
#set(DATABASE_LIB_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/src/data_base.cpp | ||
# ${CMAKE_CURRENT_SOURCE_DIR}/src/database_connection.cpp | ||
# ${CMAKE_CURRENT_SOURCE_DIR}/src/db_not_auth_mode.cpp | ||
# ) | ||
aux_source_directory( ${CMAKE_CURRENT_SOURCE_DIR}/src/ DATABASE_LIB_SRCS) | ||
|
||
add_library(database_lib ${DATABASE_LIB_SRCS}) | ||
target_include_directories(database_lib PUBLIC ${DATABASE_LIB_INCLUDES}) | ||
target_link_libraries(database_lib ${PQXX_LIB} ${PQ_LIB}) | ||
# Find libraries | ||
find_library(PQXX_LIB pqxx REQUIRED) | ||
find_library(PQ_LIB pq REQUIRED) | ||
find_package(GTest REQUIRED) | ||
find_package(Threads REQUIRED) | ||
|
||
add_executable(db_main main.cpp) | ||
target_include_directories( db_main PUBLIC ${DATABASE_LIB_INCLUDES}) | ||
target_link_libraries(db_main database_lib ${PQXX_LIB} ${PQ_LIB}) | ||
# Find all source files | ||
aux_source_directory(src SRC) | ||
|
||
# Create server library | ||
add_library(database_lib ${SRC}) | ||
target_include_directories(database_lib PUBLIC include) | ||
target_link_libraries(database_lib ${PQXX_LIB} ${PQ_LIB}) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,16 @@ | ||
cmake_minimum_required(VERSION 3.6) | ||
|
||
set(FILESYSTEM_LIB_SRCS src/fs_not_auth.cpp | ||
src/fs_auth_usr.cpp | ||
src/fs_group.cpp | ||
src/fs_worker.cpp | ||
) | ||
set(INCLUDE_DIRS include) | ||
project(fs_worker_lib) | ||
|
||
set(CMAKE_CXX_FLAGS "-g -O0 -Wall -Wextra -Wpedantic -pthread") | ||
#set(CMAKE_CXX_FLAGS "-g -O0 -Wall -Werror -Wextra -Wno-unused-variable -Wpedantic -fprofile-arcs -ftest-coverage -pthread") | ||
# Set the 20th standard | ||
set(CMAKE_CXX_STANDARD 20) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
# Find all source files | ||
aux_source_directory(src SRC) | ||
|
||
add_library(fs_worker_lib STATIC ${FILESYSTEM_LIB_SRCS}) | ||
target_include_directories(fs_worker_lib PRIVATE ${INCLUDE_DIRS}) | ||
# Create server library | ||
add_library(fs_worker_lib STATIC ${SRC}) | ||
target_include_directories(fs_worker_lib PRIVATE include) | ||
target_compile_definitions(fs_worker_lib PRIVATE FS_ROOT_PATH="/home/kirill/vvti_filesystem") | ||
target_compile_definitions(fs_worker_lib PRIVATE FS_NOT_AUTH_DIR_NAME="not_auth") |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
cmake_minimum_required(VERSION 3.6) | ||
|
||
project(server) | ||
|
||
# Set the 20th standard | ||
set(CMAKE_CXX_STANDARD 20) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
# Find libraries | ||
find_package(Boost REQUIRED COMPONENTS log log_setup system date_time regex) | ||
find_package(OpenSSL REQUIRED) | ||
find_package(Threads REQUIRED) | ||
find_package(fmt REQUIRED) | ||
|
||
# Find all source files | ||
aux_source_directory(config/src CONFIG_SRC) | ||
aux_source_directory(http/src HTTP_SRC) | ||
aux_source_directory(logs/src LOG_SRC) | ||
aux_source_directory(main/src MAIN_SRC) | ||
aux_source_directory(workers/src WORKERS_SRC) | ||
|
||
# Create server library | ||
add_library(server_lib STATIC ${CONFIG_SRC} ${HTTP_SRC} ${LOG_SRC} ${MAIN_SRC} ${WORKERS_SRC}) | ||
target_include_directories(server_lib | ||
PUBLIC config/include | ||
http/include | ||
logs/include | ||
main/include | ||
workers/include | ||
../database_lib/include | ||
../fs_worker_lib/include | ||
) | ||
target_link_libraries( | ||
server_lib mailio Boost::log Boost::log_setup Boost::system Boost::date_time Boost::regex | ||
OpenSSL::SSL Threads::Threads fmt::fmt | ||
) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,19 @@ | ||
cmake_minimum_required(VERSION 3.6) | ||
|
||
project(fs_worker_lib) | ||
project(test) | ||
|
||
# Find package for fs_worker_lib | ||
# Set the 20th standard | ||
set(CMAKE_CXX_STANDARD 20) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
# Find library for tests | ||
find_package(GTest REQUIRED) | ||
|
||
if(GTest_FOUND) | ||
# Find all source files | ||
aux_source_directory(server/src SERVER_SRC) | ||
# Find all source files | ||
# aux_source_directory(database_lib DATABASE_LIB_SRC) | ||
# aux_source_directory(fs_worker_lib FS_WORKER_LIB_SRC) | ||
aux_source_directory(server_lib SERVER_LIB_SRC) | ||
|
||
add_executable(test.out main.cpp ${SERVER_SRC}) | ||
target_link_libraries(test.out server_lib ${GTEST_LIBRARIES} Threads::Threads) | ||
else() | ||
message(FATAL_ERROR "GTest has not been installed!") | ||
endif() | ||
# Make executable test program | ||
add_executable(test.out main.cpp ${DATABASE_LIB_SRC} ${FS_WORKER_LIB_SRC} ${SERVER_LIB_SRC}) | ||
target_link_libraries(test.out database_lib fs_worker_lib server_lib GTest::GTest Threads::Threads) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.