Skip to content

Commit

Permalink
Better organizes example app
Browse files Browse the repository at this point in the history
  • Loading branch information
dylon committed Feb 14, 2024
1 parent 44f5171 commit 8649e5a
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,5 @@ jobs:
shell: bash -el {0}
run: >
./scripts/run-demo.exp ./build/liblevenshtein-demo
--dictionary-path programming-languages.txt
--dictionary-path resources/programming-languages.txt
--serialization-path build/programming-languages.pb
10 changes: 0 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,6 @@
!/README.md
!/environment*.yml

!/example/*.cpp
!/example/*.h
!/example/CMakeLists.txt
!/example/README.md
!/example/environment*.yml
!/example/programming-languages.txt

!/example/scripts/*.exp
!/example/scripts/*.sh

!/cmake/**/*.cmake

!/proto/CMakeLists.txt
Expand Down
9 changes: 9 additions & 0 deletions example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
!/.gitignore
!/CMakeLists.txt
!/README.md
!/environment*.yml
!/resources/*.txt
!/scripts/*.exp
!/scripts/*.sh
!/src/**/*.cpp
!/src/**/*.h
6 changes: 3 additions & 3 deletions example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ set(CMAKE_VERBOSE_MAKEFILE ON)
find_package(Protobuf REQUIRED)
find_package(liblevenshtein REQUIRED)

add_executable(${PROJECT_NAME}
"command_line.cpp"
"main.cpp")
add_executable(${PROJECT_NAME})

target_link_libraries(${PROJECT_NAME}
PRIVATE
protobuf::libprotobuf
levenshtein)

add_subdirectory("src")
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion example/command_line.h → example/src/command_line.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class CommandLine {
auto next_path(fs::path &path, int &i) -> bool;

ReturnCode _return_code = ReturnCode::RETURN_DEFAULT;
fs::path _dictionary_path = "../programming-languages.txt";
fs::path _dictionary_path = "../resources/programming-languages.txt";
fs::path _serialization_path = "programming-languages.pb";
ll::Algorithm _algorithm = ll::Algorithm::TRANSPOSITION;
std::size_t _max_distance = 2;
Expand Down
File renamed without changes.

0 comments on commit 8649e5a

Please sign in to comment.