Skip to content
Snippets Groups Projects
Verified Commit 0d3e04cb authored by Daniel Lyubomirov's avatar Daniel Lyubomirov Committed by Daniel Lyubomirov
Browse files

Fix windows tests build

parent 20374b2a
No related branches found
No related tags found
1 merge request!96C API integration layer
...@@ -10,7 +10,7 @@ project (vereign) ...@@ -10,7 +10,7 @@ project (vereign)
option(VEREIGN_USE_LLD "Use the lld linker" OFF) option(VEREIGN_USE_LLD "Use the lld linker" OFF)
option(VEREIGN_USE_PRECOMPILED_HEADERS "Use precompiled headers" OFF) option(VEREIGN_USE_PRECOMPILED_HEADERS "Use precompiled headers" OFF)
option(VEREIGN_USE_TIME_TRACE "Use compilation profiler" OFF) option(VEREIGN_USE_TIME_TRACE "Use compilation profiler" OFF)
option(VEREIGN_ENABLE_BENCHMARKING "Enable tests benchmarks" ON) option(VEREIGN_ENABLE_BENCHMARKING "Enable tests benchmarks" OFF)
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.0.24215.1") if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "19.0.24215.1")
...@@ -106,6 +106,9 @@ include(ProtoGenerate) ...@@ -106,6 +106,9 @@ include(ProtoGenerate)
enable_testing() enable_testing()
find_package(fmt 6.2.0 REQUIRED) find_package(fmt 6.2.0 REQUIRED)
if (fmt_FOUND)
get_target_property(fmt_INCLUDE_DIR fmt::fmt INTERFACE_INCLUDE_DIRECTORIES)
endif()
set(OPENSSL_USE_STATIC_LIBS ON) set(OPENSSL_USE_STATIC_LIBS ON)
set(OPENSSL_ROOT_DIR ${VENDOR_INSTALL_DIR}/boringssl) set(OPENSSL_ROOT_DIR ${VENDOR_INSTALL_DIR}/boringssl)
......
...@@ -61,12 +61,13 @@ add_library(vereignlib STATIC ${VEREIGNLIB_SRC}) ...@@ -61,12 +61,13 @@ add_library(vereignlib STATIC ${VEREIGNLIB_SRC})
set_property(TARGET vereignlib PROPERTY POSITION_INDEPENDENT_CODE ON) set_property(TARGET vereignlib PROPERTY POSITION_INDEPENDENT_CODE ON)
target_link_libraries(vereignlib PRIVATE target_link_libraries(vereignlib PRIVATE
nlohmann_json::nlohmann_json nlohmann_json::nlohmann_json
fmt::fmt
) )
target_link_libraries(vereignlib PUBLIC target_link_libraries(vereignlib PUBLIC
vereignproto vereignproto
fmt::fmt
gRPC::grpc++_reflection gRPC::grpc++_reflection
gRPC::grpc++ gRPC::grpc++
$<$<CXX_COMPILER_ID:MSVC>:Boost::date_time>
) )
add_library(vereign SHARED add_library(vereign SHARED
...@@ -77,7 +78,6 @@ target_include_directories(vereign ...@@ -77,7 +78,6 @@ target_include_directories(vereign
) )
target_link_libraries(vereign PRIVATE target_link_libraries(vereign PRIVATE
vereignlib vereignlib
$<$<CXX_COMPILER_ID:MSVC>:Boost::date_time>
) )
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
# Set the DLLEXPORT variable to export symbols # Set the DLLEXPORT variable to export symbols
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
#include <util/protobuf.hh> #include <util/protobuf.hh>
#include <google/protobuf/util/json_util.h> #include <google/protobuf/util/json_util.h>
#include <fmt/core.h>
#include <catch2/catch.hpp> #include <catch2/catch.hpp>
......
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
add_definitions(-DNOGDI)
endif()
include_directories( include_directories(
${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src
${VENDOR_INSTALL_DIR}/include ${VENDOR_INSTALL_DIR}/include
${CMAKE_SOURCE_DIR}/proto/cpp ${CMAKE_SOURCE_DIR}/proto/cpp
${Boost_INCLUDE_DIRS}
) )
list(APPEND tests_src list(APPEND tests_src
init_tests.cc init_tests.cc
../util/protobuf.cc ../util/protobuf.cc
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment