Skip to content
Snippets Groups Projects
Commit 056b31d1 authored by Joscha Schmiedt's avatar Joscha Schmiedt
Browse files

Copy DLLs into build directory

parent 153751ad
Branches
Tags
2 merge requests!41Release 0.3.0,!38Make integration tests runnable on Windows
Pipeline #56449 passed
......@@ -40,6 +40,13 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# "${CONAN_PKG_LIBS}")
find_package(linkahead CONFIG REQUIRED)
find_package(GTest CONFIG REQUIRED)
find_package(gRPC CONFIG REQUIRED)
find_package(protobuf CONFIG REQUIRED)
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake" ${CMAKE_MODULE_PATH})
enable_testing()
add_subdirectory(test)
......
......@@ -35,6 +35,9 @@ set(test_cases
add_compile_definitions(BUILD_ACM)
# copy DLLs from linkahead_LIB_DIRS_RELEASE to the binary directory
file(COPY ${linkahead_LIB_DIRS_RELEASE}/ DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
include(CheckCXXCompilerFlag)
include(CheckCCompilerFlag)
......@@ -99,14 +102,10 @@ endif()
### Set up tests using GoogleTest (GTest)
###################################################
# add special cmake functions for gtest
include(GoogleTest REQUIRED)
find_package(linkahead)
find_package(GTest)
find_package(gRPC)
find_package(protobuf)
# loop over all test cases and add them to the test runner
list(LENGTH test_cases len_test_cases)
math(EXPR len_test_cases "${len_test_cases} - 1")
......@@ -114,10 +113,13 @@ foreach (i RANGE "${len_test_cases}")
list(GET test_cases ${i} test_case_name)
add_executable(${test_case_name} ${test_case_name}.cpp)
target_link_libraries(${test_case_name} PRIVATE
linkahead::linkahead gtest::gtest grpc::grpc protobuf::protobuf
linkahead::linkahead linkahead clinkahead caosdb_grpc
gtest::gtest grpc::grpc protobuf::protobuf
)
target_include_directories(${test_case_name}
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
set_target_properties(${test_case_name} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
if(LINTING)
set_target_properties(${test_case_name}
PROPERTIES
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment