Skip to content

Commit

Permalink
[EN-7412] Implement DXFeedConnect sample
Browse files Browse the repository at this point in the history
  • Loading branch information
AnatolyKalin committed Sep 4, 2023
1 parent 5da8d45 commit 21e5efc
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 114 deletions.
110 changes: 48 additions & 62 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,58 +93,56 @@ add_subdirectory(third_party/fmt-10.0.0)
# find_package(utf8cpp)
# find_package(fmt)

#set(dxFeedNativeAPIInternalSources
# src/internal/CEntryPointErrors.cpp
# src/internal/Isolate.cpp
# src/internal/JavaObjectHandler.cpp
# src/internal/EventClassList.cpp
# src/internal/SymbolList.cpp
# src/internal/Common.cpp
#)
#
#set(dxFeedNativeAPIInternalUtilsSources
# src/internal/utils/StringUtils.cpp
# src/internal/utils/EnumUtils.cpp
# src/internal/utils/CmdArgsUtils.cpp
#)
#
#set(dxFeedNativeAPIInternalUtilsDebugSources
# src/internal/utils/debug/Debug.cpp
#)

add_subdirectory(src/internal)

set(dxFeedNativeAPIAPISources
set(dxFeedGraalCxxApi_Internal_Sources
src/internal/CEntryPointErrors.cpp
src/internal/Isolate.cpp
src/internal/JavaObjectHandler.cpp
src/internal/EventClassList.cpp
src/internal/SymbolList.cpp
src/internal/Common.cpp
)

set(dxFeedGraalCxxApi_InternalUtils_Sources
src/internal/utils/StringUtils.cpp
src/internal/utils/EnumUtils.cpp
src/internal/utils/CmdArgsUtils.cpp
)

set(dxFeedGraalCxxApi_InternalUtilsDebug_Sources
src/internal/utils/debug/Debug.cpp
)

set(dxFeedGraalCxxApi_API_Sources
src/api/DXEndpoint.cpp
src/api/DXFeed.cpp
src/api/DXFeedSubscription.cpp
src/api/DXPublisher.cpp
)

set(dxFeedNativeAPIAPIOsubSources
set(dxFeedGraalCxxApi_APIOsub_Sources
src/api/osub/WildcardSymbol.cpp
src/api/osub/TimeSeriesSubscriptionSymbol.cpp
src/api/osub/IndexedEventSubscriptionSymbol.cpp
)

set(dxFeedNativeAPISymbolsSources
set(dxFeedGraalCxxApi_Symbols_Sources
src/symbols/StringSymbol.cpp
src/symbols/SymbolWrapper.cpp
)

set(dxFeedNativeAPISystemSources
set(dxFeedGraalCxxApi_System_Sources
src/system/System.cpp
)

set(dxFeedNativeAPIEventSources
set(dxFeedGraalCxxApi_Event_Sources
src/event/EventTypeEnum.cpp
src/event/IndexedEventSource.cpp
src/event/EventFlag.cpp
src/event/IndexedEvent.cpp
src/event/EventMapper.cpp
)

set(dxFeedNativeAPIEventCandleSources
set(dxFeedGraalCxxApi_EventCandle_Sources
src/event/candle/Candle.cpp
src/event/candle/CandleAlignment.cpp
src/event/candle/CandleExchange.cpp
Expand All @@ -156,7 +154,7 @@ set(dxFeedNativeAPIEventCandleSources
src/event/candle/CandleSymbol.cpp
)

set(dxFeedNativeAPIEventMarketSources
set(dxFeedGraalCxxApi_EventMarket_Sources
src/event/market/AnalyticOrder.cpp
src/event/market/Direction.cpp
src/event/market/IcebergType.cpp
Expand All @@ -182,18 +180,34 @@ set(dxFeedNativeAPIEventMarketSources
src/event/market/TradingStatus.cpp
)

set(dxFeedNativeAPIEventOptionSources
set(dxFeedGraalCxxApi_EventOption_Sources
src/event/option/Greeks.cpp
src/event/option/Underlying.cpp
src/event/option/TheoPrice.cpp
src/event/option/Series.cpp
)

set(dxFeedNativeAPIScheduleSources
set(dxFeedGraalCxxApi_Schedule_Sources
src/schedule/SessionFilter.cpp
src/schedule/SessionType.cpp
)

set(dxFeedGraalCxxApi_Sources
${dxFeedGraalCxxApi_Internal_Sources}
${dxFeedGraalCxxApi_InternalUtils_Sources}
${dxFeedGraalCxxApi_InternalUtilsDebug_Sources}
${dxFeedGraalCxxApi_API_Sources}
${dxFeedGraalCxxApi_APIOsub_Sources}
${dxFeedGraalCxxApi_Symbols_Sources}
${dxFeedGraalCxxApi_System_Sources}
${dxFeedGraalCxxApi_Event_Sources}
${dxFeedGraalCxxApi_EventCandle_Sources}
${dxFeedGraalCxxApi_EventMarket_Sources}
${dxFeedGraalCxxApi_EventOption_Sources}
${dxFeedGraalCxxApi_EventOption_Sources}
${dxFeedGraalCxxApi_Schedule_Sources}
)

if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(CMAKE_MACOSX_RPATH ON)
set(CMAKE_SKIP_BUILD_RPATH ON)
Expand All @@ -210,40 +224,12 @@ elseif (UNIX)
endif ()

add_library(${PROJECT_NAME}_static STATIC
# ${dxFeedNativeAPIInternalSources}
# ${dxFeedNativeAPIInternalUtilsSources}
# ${dxFeedNativeAPIInternalUtilsDebugSources}

# $<TARGET_OBJECTS:dxFeedGraalCxxApi_Internal>

${dxFeedNativeAPIAPISources}
${dxFeedNativeAPIAPIOsubSources}
${dxFeedNativeAPISymbolsSources}
${dxFeedNativeAPISystemSources}
${dxFeedNativeAPIEventSources}
${dxFeedNativeAPIEventCandleSources}
${dxFeedNativeAPIEventMarketSources}
${dxFeedNativeAPIEventOptionSources}
${dxFeedNativeAPIScheduleSources}
${dxFeedGraalCxxApi_Sources}
src/api.cpp
)

add_library(${PROJECT_NAME} SHARED
# ${dxFeedNativeAPIInternalSources}
# ${dxFeedNativeAPIInternalUtilsSources}
# ${dxFeedNativeAPIInternalUtilsDebugSources}

# $<TARGET_OBJECTS:dxFeedGraalCxxApi_Internal>

${dxFeedNativeAPIAPISources}
${dxFeedNativeAPIAPIOsubSources}
${dxFeedNativeAPISymbolsSources}
${dxFeedNativeAPISystemSources}
${dxFeedNativeAPIEventSources}
${dxFeedNativeAPIEventCandleSources}
${dxFeedNativeAPIEventMarketSources}
${dxFeedNativeAPIEventOptionSources}
${dxFeedNativeAPIScheduleSources}
${dxFeedGraalCxxApi_Sources}
src/api.cpp
)

Expand Down Expand Up @@ -313,8 +299,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 dxfcxx::internal utf8cpp fmt::fmt-header-only)
target_link_libraries(${PROJECT_NAME} PUBLIC DxFeedGraalNativeSdk dxfcxx::internal utf8cpp fmt::fmt-header-only)
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)

if (DXFCXX_ENABLE_ASAN_UBSAN)
target_compile_options(${PROJECT_NAME} PRIVATE "-fsanitize=address" "-fsanitize=undefined")
Expand Down
52 changes: 0 additions & 52 deletions src/internal/CMakeLists.txt

This file was deleted.

0 comments on commit 21e5efc

Please sign in to comment.