refactor: move searching to static library

main
mandlm 2024-03-19 17:26:26 +01:00
parent 8ed4b9ac71
commit 32a1cd7533
Signed by: mandlm
GPG Key ID: 4AA25D647AA54CC7
11 changed files with 20 additions and 2 deletions

View File

@ -5,13 +5,16 @@ project(
VERSION 0.1.0 VERSION 0.1.0
LANGUAGES CXX) LANGUAGES CXX)
add_subdirectory(lib_vector_search)
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake") list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
include(ExportCompileCommands) include(ExportCompileCommands)
include(sccache) include(sccache)
add_executable(VectorSearch main.cpp word_list_generator.cpp timer.cpp add_executable(VectorSearch main.cpp)
linear_finder.cpp parallel_finder.cpp)
target_link_libraries(VectorSearch lib_vector_search)
target_compile_features(VectorSearch PUBLIC cxx_std_20) target_compile_features(VectorSearch PUBLIC cxx_std_20)

View File

@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.20)
project(
lib_vector_search
VERSION 0.1.0
LANGUAGES CXX)
add_library(
lib_vector_search STATIC src/word_list_generator.cpp src/timer.cpp
src/linear_finder.cpp src/parallel_finder.cpp)
target_include_directories(lib_vector_search
PUBLIC ${PROJECT_SOURCE_DIR}/include)
target_compile_features(lib_vector_search PUBLIC cxx_std_20)