aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGeorgi Gerganov <ggerganov@gmail.com>2023-03-22 07:32:36 +0200
committerGitHub <noreply@github.com>2023-03-22 07:32:36 +0200
commitf5a77a629bd0f37ae1696747633ab42a5530ec15 (patch)
treeb3d147dd228ce67661ed497a6dc61b444a38e0f9 /CMakeLists.txt
parentda0e9fe90ccf6e73597eb19dd0cfc0a28363fb3b (diff)
Introduce C-style API (#370)
* Major refactoring - introduce C-style API * Clean up * Add <cassert> * Add <iterator> * Add <algorithm> .... * Fix timing reporting and accumulation * Measure eval time only for single-token calls * Change llama_tokenize return meaning
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt25
1 files changed, 15 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bf0e77b..400cecf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -207,15 +207,10 @@ else()
message(STATUS "Unknown architecture")
endif()
-
#
-# Build library
+# Build libraries
#
-add_executable(llama main.cpp)
-
-add_executable(quantize quantize.cpp)
-
add_library(utils OBJECT
utils.cpp
utils.h)
@@ -229,14 +224,24 @@ add_library(ggml OBJECT
target_include_directories(ggml PUBLIC .)
target_compile_features(ggml PUBLIC c_std_11) # don't bump
+target_link_libraries(ggml PRIVATE Threads::Threads ${LLAMA_EXTRA_LIBS})
+
+add_library(llama OBJECT
+ llama.cpp
+ llama.h)
+
+target_include_directories(llama PUBLIC .)
+target_compile_features(llama PUBLIC cxx_std_11) # don't bump
#
-# Linking
+# Executables
#
-target_link_libraries(ggml PRIVATE Threads::Threads ${LLAMA_EXTRA_LIBS})
-target_link_libraries(llama PRIVATE ggml utils)
-target_link_libraries(quantize PRIVATE ggml utils)
+add_executable(main main.cpp)
+target_link_libraries(main PRIVATE llama ggml utils)
+
+add_executable(quantize quantize.cpp)
+target_link_libraries(quantize PRIVATE llama ggml utils)
#
# programs, examples and tests