Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 2 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ endif()

# Include directories
include_directories(include)
include_directories(third_party/whirlpool/include)

# GoogleTest (must be added before any targets that use it)
set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)
Expand All @@ -70,21 +69,8 @@ else()
FetchContent_MakeAvailable(googletest)
endif()

# Temporarily disable benchmarks for whirlpool only
set(_SAVED_BUILD_BENCHMARKS ${BUILD_BENCHMARKS})
set(BUILD_BENCHMARKS OFF)
if(EXISTS "${CMAKE_SOURCE_DIR}/third_party/whirlpool/CMakeLists.txt")
add_subdirectory(third_party/whirlpool)
else()
# Fetch whirlpool if submodule not present (fallback)
FetchContent_Declare(
whirlpool
GIT_REPOSITORY https://github.com/matthewyeo1/whirl-pool.git
GIT_TAG main
)
FetchContent_MakeAvailable(whirlpool)
endif()
set(BUILD_BENCHMARKS ${_SAVED_BUILD_BENCHMARKS})
# Find installed Whirlpool package
find_package(whirlpool CONFIG REQUIRED)

# Subdirectories
add_subdirectory(src)
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ cmake -B build -DBUILD_BENCHMARKS=ON -DBUILD_TESTS=ON
cmake --build build --config Release
```

### Run Trading Engine
```bash
./build/src/Release/velox_trading_engine.exe
```

### Run Tests

```bash
Expand Down
8 changes: 3 additions & 5 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,13 @@ add_library(velox_core STATIC
sim/env/market_sim.cpp
)

target_link_libraries(velox_core
target_link_libraries(velox_core
PUBLIC
whirlpool
whirlpool::whirlpool
)

target_include_directories(velox_core PUBLIC
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/third_party/whirlpool/include
${CMAKE_SOURCE_DIR}/include
)

add_executable(velox_trading_engine main.cpp)
Expand All @@ -44,5 +43,4 @@ target_link_libraries(velox_trading_engine

target_include_directories(velox_trading_engine PRIVATE
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/third_party/whirlpool/include
)
2 changes: 0 additions & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,12 @@ add_executable(velox_tests

target_link_libraries(velox_tests
velox_core
whirlpool
gtest
gtest_main
)

target_include_directories(velox_tests PRIVATE
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/third_party/whirlpool/include
${CMAKE_SOURCE_DIR}/third_party/googletest/googletest/include
)

Expand Down
1 change: 0 additions & 1 deletion third_party/whirlpool
Submodule whirlpool deleted from 9d5e0d
Loading