From a316a425d04027453dc0fd45f003b647c12f66f9 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Sat, 25 Mar 2023 20:26:40 +0200 Subject: Overhaul the examples structure - main -> examples - utils -> examples (renamed to "common") - quantize -> examples - separate tools for "perplexity" and "embedding" Hope I didn't break something ! --- CMakeLists.txt | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 51af97c..a1ff5a4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -211,17 +211,6 @@ endif() # Build libraries # -add_library(utils OBJECT - utils.cpp - utils.h) - -target_include_directories(utils PUBLIC .) -target_compile_features(utils PUBLIC cxx_std_11) # don't bump -target_link_libraries(utils PRIVATE ${LLAMA_EXTRA_LIBS}) -if (BUILD_SHARED_LIBS) - set_target_properties(utils PROPERTIES POSITION_INDEPENDENT_CODE ON) -endif() - add_library(ggml OBJECT ggml.c ggml.h) @@ -239,22 +228,12 @@ add_library(llama target_include_directories(llama PUBLIC .) target_compile_features(llama PUBLIC cxx_std_11) # don't bump -target_link_libraries(llama PRIVATE utils ggml ${LLAMA_EXTRA_LIBS}) +target_link_libraries(llama PRIVATE ggml ${LLAMA_EXTRA_LIBS}) if (BUILD_SHARED_LIBS) set_target_properties(llama PROPERTIES POSITION_INDEPENDENT_CODE ON) target_compile_definitions(llama PRIVATE LLAMA_SHARED LLAMA_BUILD) endif() -# -# Executables -# - -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 # @@ -264,6 +243,6 @@ if (LLAMA_BUILD_TESTS AND NOT CMAKE_JS_VERSION) add_subdirectory(tests) endif () -#if (LLAMA_BUILD_EXAMPLES) -# add_subdirectory(examples) -#endif() +if (LLAMA_BUILD_EXAMPLES) + add_subdirectory(examples) +endif() -- cgit v1.2.3