diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index b34703452782aabc89c945b25f30463c3a0d9170..6989dc4935adbefebdc66406052e944cbfa85a13 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -10,7 +10,7 @@ project (vereign) option(VEREIGN_USE_LLD "Use the lld linker" OFF) option(VEREIGN_USE_PRECOMPILED_HEADERS "Use precompiled headers" 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_VERSION VERSION_LESS "19.0.24215.1") @@ -106,6 +106,9 @@ include(ProtoGenerate) enable_testing() 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_ROOT_DIR ${VENDOR_INSTALL_DIR}/boringssl) diff --git a/cpp/src/CMakeLists.txt b/cpp/src/CMakeLists.txt index ed746947b2c7f9315d61f596b12e5d1ebbc8f0f7..555515506f7c1d62b01e54cf2eeaeeb5401e783b 100644 --- a/cpp/src/CMakeLists.txt +++ b/cpp/src/CMakeLists.txt @@ -61,12 +61,13 @@ add_library(vereignlib STATIC ${VEREIGNLIB_SRC}) set_property(TARGET vereignlib PROPERTY POSITION_INDEPENDENT_CODE ON) target_link_libraries(vereignlib PRIVATE nlohmann_json::nlohmann_json - fmt::fmt ) target_link_libraries(vereignlib PUBLIC vereignproto + fmt::fmt gRPC::grpc++_reflection gRPC::grpc++ + $<$<CXX_COMPILER_ID:MSVC>:Boost::date_time> ) add_library(vereign SHARED @@ -77,7 +78,6 @@ target_include_directories(vereign ) target_link_libraries(vereign PRIVATE vereignlib - $<$<CXX_COMPILER_ID:MSVC>:Boost::date_time> ) if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") # Set the DLLEXPORT variable to export symbols diff --git a/cpp/tests/util/protobuf.cc b/cpp/tests/util/protobuf.cc index 5350ab1a180db6bca3b3f4e39d15d00f99b0f934..05e1c791a91878f1d09a4c0068227de89e7937e1 100644 --- a/cpp/tests/util/protobuf.cc +++ b/cpp/tests/util/protobuf.cc @@ -2,7 +2,6 @@ #include <util/protobuf.hh> #include <google/protobuf/util/json_util.h> -#include <fmt/core.h> #include <catch2/catch.hpp> diff --git a/cpp/tests/vereign/CMakeLists.txt b/cpp/tests/vereign/CMakeLists.txt index 4deb797f1635045a7c356cbcfa1f0fcd8eae940c..2c2b6fce316e7721ed05a80e53330200081a4486 100644 --- a/cpp/tests/vereign/CMakeLists.txt +++ b/cpp/tests/vereign/CMakeLists.txt @@ -1,12 +1,15 @@ +if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + add_definitions(-DNOGDI) +endif() include_directories( ${CMAKE_SOURCE_DIR}/src ${VENDOR_INSTALL_DIR}/include ${CMAKE_SOURCE_DIR}/proto/cpp + ${Boost_INCLUDE_DIRS} ) - list(APPEND tests_src init_tests.cc ../util/protobuf.cc