From cceee41f79f8d7cd99823662782606786dbe7e48 Mon Sep 17 00:00:00 2001 From: James Ravenscroft Date: Thu, 24 Aug 2023 13:03:12 +0100 Subject: [PATCH] add boost threads --- .github/workflows/build-commit.yml | 6 +++--- src/CMakeLists.txt | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-commit.yml b/.github/workflows/build-commit.yml index 439b8e2..dfaa6be 100644 --- a/.github/workflows/build-commit.yml +++ b/.github/workflows/build-commit.yml @@ -92,7 +92,7 @@ jobs: submodules: true - name: Install Dependencies - run: sudo apt-get update && sudo apt-get install -yq libboost-dev libasio-dev + run: sudo apt-get update && sudo apt-get install -yq libboost-dev libasio-dev libboost-thread-dev - name: Install OpenBlas if: ${{ matrix.build == 'avx2-openblas' }} @@ -207,7 +207,7 @@ jobs: $msvc = $(join-path $vcdir $('VC\Tools\MSVC\'+$(gc -raw $(join-path $vcdir 'VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt')).Trim())) $lib = $(join-path $msvc 'bin\Hostx64\x64\lib.exe') & $lib /machine:x64 "/def:${env:RUNNER_TEMP}/openblas/lib/libopenblas.def" "/out:${env:RUNNER_TEMP}/openblas/lib/openblas.lib" /name:openblas.dll - + - name: Build id: cmake_build env: @@ -216,7 +216,7 @@ jobs: mkdir build cd build cmake .. ${{ matrix.defines }} -DBoost_LIBRARY_DIRS=${{steps.install-boost.outputs.BOOST_ROOT}}/lib - cmake --build . --config Release --target turbopilot -DBoost_LIBRARY_DIRS=${{steps.install-boost.outputs.BOOST_ROOT}}/lib + cmake --build . --config Release --target turbopilot # - name: Add libopenblas.dll # id: add_libopenblas_dll diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 78f3618..3a13809 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,6 +1,7 @@ set(TURBOPILOT_TARGET turbopilot) -find_package(Boost REQUIRED) +find_package(Boost COMPONENTS thread system REQUIRED) + include_directories(${Boost_INCLUDE_DIRS}) add_executable(${TURBOPILOT_TARGET} @@ -24,7 +25,8 @@ target_include_directories(${TURBOPILOT_TARGET} PRIVATE ) -target_link_libraries(${TURBOPILOT_TARGET} PRIVATE ggml argparse) + +target_link_libraries(${TURBOPILOT_TARGET} PRIVATE ggml argparse Boost::thread) #target_link_libraries(${TURBOPILOT_TARGET} PRIVATE spdlog::spdlog_header_only) \ No newline at end of file