-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix tests building issues, restructure directories and dependencies
- Loading branch information
Showing
33 changed files
with
253 additions
and
200 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
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,22 +1,17 @@ | ||
set(FILE_MANAGER | ||
${CMAKE_CURRENT_SOURCE_DIR}/SerializerHelper.cpp | ||
) | ||
# set(FILE_MANAGER | ||
# ${CMAKE_CURRENT_SOURCE_DIR}/FileManager.cpp | ||
# ) | ||
|
||
add_library(file_manager_lib STATIC ${FILE_MANAGER}) | ||
# add_library(file_manager_lib STATIC ${FILE_MANAGER}) | ||
|
||
target_compile_options(file_manager_lib PRIVATE -Werror -Wall -Wextra -pedantic -Wunused -Wshadow -Wold-style-cast -Wconversion) | ||
# target_compile_options(file_manager_lib PRIVATE -Werror -Wall -Wextra -pedantic -Wunused -Wshadow -Wold-style-cast -Wconversion) | ||
|
||
target_link_libraries(file_manager_lib PUBLIC | ||
clinic-lib | ||
proto | ||
) | ||
# target_link_libraries(file_manager_lib PUBLIC | ||
# ) | ||
|
||
# target_include_directories(file_manager_lib PUBLIC | ||
# . | ||
# install(TARGETS file_manager_lib | ||
# ARCHIVE DESTINATION ${OWN_LIBRARIES_DIR} | ||
# ) | ||
install(TARGETS file_manager_lib | ||
ARCHIVE DESTINATION ${OWN_LIBRARIES_DIR}/lib | ||
) | ||
|
||
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ DESTINATION ${OWN_LIBRARIES_DIR}/include | ||
FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp") | ||
# install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ DESTINATION ${OWN_LIBRARIES_DIR}/include | ||
# FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp") |
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,18 +1,18 @@ | ||
# EXPERIMENTAl: installing specific versions of libraries to be used by our project | ||
include(ExternalProject) | ||
# # EXPERIMENTAl: installing specific versions of libraries to be used by our project | ||
# include(ExternalProject) | ||
|
||
####### fixed version of protobuf for project | ||
set(PROTOBUF_PREFIX "${EXTERNAL_LIBRARIES_DIR}/protobuf") | ||
set(PROTOBUF_BASE_URL "https://github.com/protocolbuffers/protobuf/releases/download") | ||
set(RELEASE_TAG "v21.0") | ||
set(PROTOBUF_VERSION "3.21.0") | ||
# ####### fixed version of protobuf for project | ||
# set(PROTOBUF_PREFIX "${EXTERNAL_LIBRARIES_DIR}/protobuf") | ||
# set(PROTOBUF_BASE_URL "https://github.com/protocolbuffers/protobuf/releases/download") | ||
# set(RELEASE_TAG "v21.0") | ||
# set(PROTOBUF_VERSION "3.21.0") | ||
|
||
ExternalProject_Add(protobuf | ||
URL "${PROTOBUF_BASE_URL}/${RELEASE_TAG}/protobuf-cpp-${PROTOBUF_VERSION}.tar.gz" | ||
PREFIX ${PROTOBUF_PREFIX} | ||
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> | ||
BUILD_COMMAND ${MAKE} | ||
DOWNLOAD_EXTRACT_TIMESTAMP true | ||
) | ||
# ExternalProject_Add(protobuf | ||
# URL "${PROTOBUF_BASE_URL}/${RELEASE_TAG}/protobuf-cpp-${PROTOBUF_VERSION}.tar.gz" | ||
# PREFIX ${PROTOBUF_PREFIX} | ||
# CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=<INSTALL_DIR> | ||
# BUILD_COMMAND ${MAKE} | ||
# DOWNLOAD_EXTRACT_TIMESTAMP true | ||
# ) | ||
|
||
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${PROTOBUF_PREFIX}) | ||
# set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ${PROTOBUF_PREFIX}) |
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
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,24 +1,31 @@ | ||
set(SERIALIZER_SOURCES | ||
${CMAKE_CURRENT_SOURCE_DIR}/SerializerHelper.cpp | ||
${CMAKE_CURRENT_SOURCE_DIR}/Serializer.cpp | ||
) | ||
|
||
add_library(serializer-lib STATIC ${SERIALIZER_SOURCES}) | ||
|
||
target_compile_options(serializer-lib PRIVATE -Werror -Wall -Wextra -pedantic -Wunused -Wshadow -Wold-style-cast -Wconversion) | ||
|
||
target_link_libraries(serializer-lib PUBLIC | ||
common-lib | ||
clinic-lib | ||
proto | ||
protobuff | ||
) | ||
|
||
target_include_directories(serializer-lib PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR} | ||
${OWN_LIBRARIES_DIR}/include/proto | ||
# ${OWN_LIBRARIES_DIR}/include/proto | ||
) | ||
|
||
install(TARGETS serializer-lib | ||
ARCHIVE DESTINATION ${OWN_LIBRARIES_DIR}/lib | ||
set_target_properties(serializer-lib PROPERTIES | ||
ARCHIVE_OUTPUT_DIRECTORY ${OWN_LIBRARIES_DIR} | ||
LIBRARY_OUTPUT_DIRECTORY ${OWN_LIBRARIES_DIR} | ||
RUNTIME_OUTPUT_DIRECTORY ${OWN_LIBRARIES_DIR} | ||
) | ||
# install(TARGETS serializer-lib | ||
# ARCHIVE DESTINATION ${OWN_LIBRARIES_DIR} | ||
# ) | ||
|
||
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ DESTINATION ${OWN_LIBRARIES_DIR}/include | ||
FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp") | ||
# install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ DESTINATION ${OWN_LIBRARIES_DIR}/include | ||
# FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp") | ||
# message(STATUS "OWN_LIBRARIES_DIR: ${OWN_LIBRARIES_DIR}") |
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 @@ | ||
#include "Serializer.hpp" |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# cmake_minimum_required(VERSION 3.23) | ||
# project(desktop-business-app-tests) | ||
|
||
# set(CMAKE_CXX_STANDARD 20) | ||
|
||
# TODO: adjust both after new structure is finalized | ||
# set(BACKEND_LIB_DIRECTORY ${PROJECT_SOURCE_DIR}/../backend/) | ||
# set(OWN_LIB_DIRECTORY ${PROJECT_SOURCE_DIR}/../../own_libraries) | ||
message(STATUS "BACKEND_LIB_DIRECTORY: ${BACKEND_LIB_DIRECTORY}") | ||
# message(STATUS "OWN_LIB_DIRECTORY: ${OWN_LIB_DIRECTORY}") | ||
|
||
# test binaries will be in this directory | ||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/../../bin) | ||
|
||
include(install_gtest.cmake) | ||
|
||
include(GoogleTest) | ||
enable_testing() | ||
|
||
# Set vars to the path to the libraries installed from backend | ||
# set(CLINIC_LIB ${OWN_LIB_DIRECTORY}/libclinic-lib.a) | ||
# set(COMMON_LIB ${OWN_LIB_DIRECTORY}/libcommon-lib.a) | ||
# set(PATIENTS_LIB ${OWN_LIB_DIRECTORY}/libpatients-lib.a) | ||
# set(SERIALIZER_LIB ${OWN_LIB_DIRECTORY}/libserializer-lib.a) | ||
# set(VISITS_LIB ${OWN_LIB_DIRECTORY}/libvisits-lib.a) | ||
# set(WAREHOUSE_LIB ${OWN_LIB_DIRECTORY}/libwarehouse-lib.a) | ||
|
||
# Set the path to the headers installed from backend | ||
# set(OWN_LIBS_INCLUDE_DIR ${BACKEND_LIB_DIRECTORY}) | ||
|
||
# Global settings for memory checks | ||
include(CTest) | ||
set(MEMORYCHECK_COMMAND_OPTIONS | ||
"--trace-children=yes --leak-check=full --show-reachable=yes --read-var-info=yes --track-origins=yes --error-limit=no -error-exitcode=1") | ||
set(MEMORYCHECK_COMMAND valgrind) | ||
|
||
add_subdirectory(unit) | ||
add_subdirectory(integration) |
File renamed without changes.
File renamed without changes.
Oops, something went wrong.