Skip to content

Commit

Permalink
cmake: add quantize in example targets (PABannier#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
PABannier committed Sep 30, 2023
1 parent 74a68d3 commit c8a321a
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 20 deletions.
13 changes: 3 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
*.so
.DS_Store
*.swp
*.plist
*.wav
*.bin
.build/
build/
.cache/
Expand All @@ -21,16 +24,6 @@ models/

build-info.h

bark
encodec
main
toy
quantize
ggml

*.plist
*.wav

!ggml_weights/ggml_vocab.bin
!ggml_weights/vocab.txt

Expand Down
13 changes: 3 additions & 10 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
set(BARK_TARGET main)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})

add_executable(${BARK_TARGET} main.cpp)

install(TARGETS ${BARK_TARGET} RUNTIME)
target_link_libraries(${BARK_TARGET} PRIVATE bark.cpp ${CMAKE_THREAD_LIBS_INIT})
target_compile_features(${BARK_TARGET} PRIVATE cxx_std_11)

if(MSVC)
target_compile_definitions(${BARK_TARGET} PRIVATE -D_CRT_SECURE_NO_WARNINGS=1)
endif()
add_subdirectory(main)
add_subdirectory(quantize)
11 changes: 11 additions & 0 deletions examples/main/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
set(TARGET main)

add_executable(${TARGET} main.cpp)

install(TARGETS ${TARGET} RUNTIME)
target_link_libraries(${TARGET} PRIVATE bark.cpp ${CMAKE_THREAD_LIBS_INIT})
target_compile_features(${TARGET} PRIVATE cxx_std_11)

if(MSVC)
target_compile_definitions(${TARGET} PRIVATE -D_CRT_SECURE_NO_WARNINGS=1)
endif()
File renamed without changes.
11 changes: 11 additions & 0 deletions examples/quantize/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
set(TARGET quantize)

add_executable(${TARGET} quantize.cpp)

install(TARGETS ${TARGET} RUNTIME)
target_link_libraries(${TARGET} PRIVATE bark.cpp ${CMAKE_THREAD_LIBS_INIT})
target_compile_features(${TARGET} PRIVATE cxx_std_11)

if(MSVC)
target_compile_definitions(${TARGET} PRIVATE -D_CRT_SECURE_NO_WARNINGS=1)
endif()
File renamed without changes.

0 comments on commit c8a321a

Please sign in to comment.