Skip to content

Commit

Permalink
Configure examples
Browse files Browse the repository at this point in the history
  • Loading branch information
dr8co committed Apr 11, 2024
1 parent 4accd1a commit 22ca474
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ endif ()

add_library(LiteString STATIC lite_string.h lite_string.c)

# Examples
add_subdirectory(examples)

# Google Test
include(FetchContent)

Expand Down
7 changes: 7 additions & 0 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# C example
add_executable(word_stats word_stats.c)
target_link_libraries(word_stats LiteString)

# C++ example
add_executable(cheap_grep cheap_grep.cpp)
target_link_libraries(cheap_grep LiteString)

0 comments on commit 22ca474

Please sign in to comment.