diff --git a/CMakeLists.txt b/CMakeLists.txt index 55716d9..a4412ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) @@ -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) diff --git a/README.md b/README.md index 49f8c1a..ea28cd1 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 72dc7fd..5611fec 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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) @@ -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 ) \ No newline at end of file diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index a6e0e1b..abb3b6f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -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 ) diff --git a/third_party/whirlpool b/third_party/whirlpool deleted file mode 160000 index 9d5e0db..0000000 --- a/third_party/whirlpool +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9d5e0db9e14cbbd506ad44feb0086e5f474e3862