refactor: move searching to static library
This commit is contained in:
parent
8ed4b9ac71
commit
32a1cd7533
@ -5,13 +5,16 @@ project(
|
||||
VERSION 0.1.0
|
||||
LANGUAGES CXX)
|
||||
|
||||
add_subdirectory(lib_vector_search)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
|
||||
|
||||
include(ExportCompileCommands)
|
||||
include(sccache)
|
||||
|
||||
add_executable(VectorSearch main.cpp word_list_generator.cpp timer.cpp
|
||||
linear_finder.cpp parallel_finder.cpp)
|
||||
add_executable(VectorSearch main.cpp)
|
||||
|
||||
target_link_libraries(VectorSearch lib_vector_search)
|
||||
|
||||
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)
|
Reference in New Issue
Block a user