refactor: move trie back to own static library
parent
a6e7b1dfd3
commit
2a373f3841
|
@ -4,16 +4,17 @@ project(lander C CXX)
|
|||
set(CMAKE_C_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
include_directories(crow/include include)
|
||||
include_directories(crow/include trie/include)
|
||||
add_subdirectory(crow)
|
||||
add_subdirectory(trie)
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES "^Test")
|
||||
enable_testing()
|
||||
add_subdirectory(test)
|
||||
else()
|
||||
if(CMAKE_BUILD_TYPE STREQUAL Release)
|
||||
add_compile_options(-O3 -flto)
|
||||
endif()
|
||||
|
||||
add_executable(lander src/main.cpp src/trie/trie.c)
|
||||
add_executable(lander src/main.cpp)
|
||||
target_link_libraries(lander PUBLIC trie)
|
||||
endif()
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
include_directories(include)
|
||||
|
||||
if(CMAKE_BUILD_TYPE MATCHES "^Test")
|
||||
enable_testing()
|
||||
add_subdirectory(test)
|
||||
endif()
|
||||
|
||||
add_library(trie STATIC include/trie.h src/trie.c)
|
|
@ -1,6 +1,6 @@
|
|||
add_compile_options(-Wno-incompatible-pointer-types)
|
||||
|
||||
add_executable(test_trie test_trie.c ../src/trie/trie.c)
|
||||
add_executable(test_trie test_trie.c ../src/trie.c)
|
||||
add_test(NAME test_trie COMMAND test_trie)
|
||||
add_executable(test_trie_fuzzy test_trie_fuzzy.c ../src/trie/trie.c)
|
||||
add_executable(test_trie_fuzzy test_trie_fuzzy.c ../src/trie.c)
|
||||
add_test(NAME test_trie_fuzzy COMMAND test_trie_fuzzy)
|
Loading…
Reference in New Issue