more attempts to build with boost threads

This commit is contained in:
James Ravenscroft 2023-08-24 13:17:51 +01:00
parent ccf425f019
commit e8beac34e7
2 changed files with 11 additions and 4 deletions

View File

@ -1,6 +1,9 @@
cmake_minimum_required (VERSION 3.0)
project(turbopilot VERSION 0.1.0)
option(BUILD_SHARED_LIBS "Build using shared libraries" OFF)
set(CMAKE_EXPORT_COMPILE_COMMANDS "on")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
@ -27,9 +30,6 @@ if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "arm" OR ${CMAKE_SYSTEM_PROCESSOR} MATCHES
endif()
add_subdirectory(extern/ggml)
add_subdirectory(extern/argparse)
add_subdirectory(extern/spdlog)
if (GGML_STATIC)
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
@ -38,6 +38,10 @@ if (GGML_STATIC)
endif()
add_subdirectory(extern/ggml)
add_subdirectory(extern/argparse)
add_subdirectory(extern/spdlog)
add_subdirectory(src)

View File

@ -17,6 +17,9 @@ add_executable(${TURBOPILOT_TARGET}
../include/turbopilot/starcoder.hpp
)
set(THREADS_PREFER_PTHREAD_FLAG TRUE)
find_package(Threads REQUIRED)
target_include_directories(${TURBOPILOT_TARGET} PRIVATE
../include
@ -26,7 +29,7 @@ target_include_directories(${TURBOPILOT_TARGET} PRIVATE
target_link_libraries(${TURBOPILOT_TARGET} PRIVATE ggml argparse Boost::thread)
target_link_libraries(${TURBOPILOT_TARGET} PRIVATE ggml argparse Threads::Threads)
#target_link_libraries(${TURBOPILOT_TARGET} PRIVATE spdlog::spdlog_header_only)