diff --git a/CMakeLists.txt b/CMakeLists.txt index 753cda2f..103d4b7a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,8 @@ if (POLICY CMP0135) cmake_policy(SET CMP0135 NEW) endif () +set(CMAKE_POLICY_DEFAULT_CMP0077 NEW) + project(dxFeedGraalCxxApi) set(DXFCXX_VERSION "0.1.3" CACHE STRING "The dxFeed Graal CXX API package version") @@ -89,6 +91,9 @@ FetchContent_MakeAvailable(DxFeedGraalNativeSdk) add_subdirectory(third_party/utfcpp-3.2.3) set(FMT_INSTALL OFF) add_subdirectory(third_party/fmt-10.0.0) +set(BUILD_TZ_LIB ON) +set(USE_SYSTEM_TZ_DB ON) +add_subdirectory(third_party/date-3.0.1) # find_package(utf8cpp) # find_package(fmt) @@ -300,8 +305,8 @@ if (DXFCXX_USE_PRECOMPILED_HEADERS) target_precompile_headers(${PROJECT_NAME}_static PRIVATE include/dxfeed_graal_cpp_api/internal/PrecompiledHeaders.hpp) endif () -target_link_libraries(${PROJECT_NAME}_static PUBLIC DxFeedGraalNativeSdk utf8cpp fmt::fmt-header-only) -target_link_libraries(${PROJECT_NAME} PUBLIC DxFeedGraalNativeSdk utf8cpp fmt::fmt-header-only) +target_link_libraries(${PROJECT_NAME}_static PUBLIC DxFeedGraalNativeSdk utf8cpp fmt::fmt-header-only date::date) +target_link_libraries(${PROJECT_NAME} PUBLIC DxFeedGraalNativeSdk utf8cpp fmt::fmt-header-only date::date) if (DXFCXX_ENABLE_ASAN_UBSAN) target_compile_options(${PROJECT_NAME} PRIVATE "-fsanitize=address" "-fsanitize=undefined") diff --git a/DEPENDENCIES.md b/DEPENDENCIES.md index 47e614b1..0bcad066 100644 --- a/DEPENDENCIES.md +++ b/DEPENDENCIES.md @@ -6,7 +6,8 @@ - [utfcpp](https://github.com/nemtrif/utfcpp) v3.2.3 - [fmt](https://github.com/fmtlib/fmt) v10.0.0 - [doctest](https://github.com/doctest/doctest) v2.4.11 (Tests) -- [range-v3](https://github.com/ericniebler/range-v3) v0.12 (Code & Samples) +- [range-v3](https://github.com/ericniebler/range-v3) v0.12 +- [date] (https://github.com/HowardHinnant/date) v3.0.1 ## Run-time diff --git a/THIRD_PARTY_LICENSES.md b/THIRD_PARTY_LICENSES.md index 9feb3988..8103b81d 100644 --- a/THIRD_PARTY_LICENSES.md +++ b/THIRD_PARTY_LICENSES.md @@ -7,4 +7,7 @@ 3. doctest - https://github.com/doctest/doctest/blob/master/LICENSE.txt SPDX-License-Identifier: MIT 4. range-v3 - https://github.com/ericniebler/range-v3/blob/master/LICENSE.txt - SPDX-License-Identifier: BSL-1.0 \ No newline at end of file + SPDX-License-Identifier: BSL-1.0 +5. date - https://github.com/HowardHinnant/date/blob/master/LICENSE.txt + SPDX-License-Identifier: MIT + \ No newline at end of file diff --git a/samples/cpp/DxFeedConnect/CMakeLists.txt b/samples/cpp/DxFeedConnect/CMakeLists.txt index 69c7a0ef..d35b042a 100644 --- a/samples/cpp/DxFeedConnect/CMakeLists.txt +++ b/samples/cpp/DxFeedConnect/CMakeLists.txt @@ -49,7 +49,7 @@ if (DXFCXX_ENABLE_VS_ASAN) endif () if (DXFCXX_ENABLE_ASAN_UBSAN) - target_link_libraries(${PROJECT_NAME} PRIVATE dxfcxx) + target_link_libraries(${PROJECT_NAME} PRIVATE dxfcxx date::date date::date-tz) target_compile_definitions(${PROJECT_NAME} PRIVATE DXFCPP_USE_DLLS) add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different $ @@ -59,7 +59,7 @@ if (DXFCXX_ENABLE_ASAN_UBSAN) target_compile_options(${PROJECT_NAME} PRIVATE "-fsanitize=address" "-fsanitize=undefined") target_link_options(${PROJECT_NAME} PRIVATE "-fsanitize=address" "-fsanitize=undefined") else () - target_link_libraries(${PROJECT_NAME} PRIVATE dxfcxx) + target_link_libraries(${PROJECT_NAME} PRIVATE dxfcxx date::date date::date-tz) target_compile_definitions(${PROJECT_NAME} PRIVATE DXFCPP_USE_DLLS) add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different $ diff --git a/samples/cpp/DxFeedConnect/src/main.cpp b/samples/cpp/DxFeedConnect/src/main.cpp index 2d1530f9..149905b3 100644 --- a/samples/cpp/DxFeedConnect/src/main.cpp +++ b/samples/cpp/DxFeedConnect/src/main.cpp @@ -5,7 +5,8 @@ #include #include -#include +#include +#include using namespace dxfcpp; using namespace dxfcpp::literals; @@ -43,9 +44,7 @@ DxFeedConnect
[