refactor: move searching to static library
This commit is contained in:
parent
8ed4b9ac71
commit
32a1cd7533
11 changed files with 20 additions and 2 deletions
|
@ -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)
|
||||||
|
|
||||||
|
|
15
lib_vector_search/CMakeLists.txt
Normal file
15
lib_vector_search/CMakeLists.txt
Normal 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)
|
Loading…
Reference in a new issue