Skip to content

Commit 9af7a01

Browse files
committed
cmake : do not include ./src as public for libllama
ggml-ci
1 parent 2434535 commit 9af7a01

17 files changed

+26
-37
lines changed

common/arg.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,6 @@ static void common_params_print_completion(common_params_context & ctx_arg) {
968968
"llama-embedding",
969969
"llama-eval-callback",
970970
"llama-export-lora",
971-
"llama-gbnf-validator",
972971
"llama-gen-docs",
973972
"llama-gguf",
974973
"llama-gguf-hash",
@@ -988,7 +987,6 @@ static void common_params_print_completion(common_params_context & ctx_arg) {
988987
"llama-perplexity",
989988
"llama-q8dot",
990989
"llama-quantize",
991-
"llama-quantize-stats",
992990
"llama-qwen2vl-cli",
993991
"llama-retrieval",
994992
"llama-run",

examples/CMakeLists.txt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ else()
2121
add_subdirectory(embedding)
2222
add_subdirectory(eval-callback)
2323

24-
if (NOT WIN32)
25-
# disabled on Windows because it uses internal functions not exported with LLAMA_API
26-
add_subdirectory(gbnf-validator)
27-
endif()
28-
2924
add_subdirectory(gguf-hash)
3025
add_subdirectory(gguf-split)
3126
add_subdirectory(gguf)
@@ -58,10 +53,6 @@ else()
5853
add_subdirectory(convert-llama2c-to-ggml)
5954
add_subdirectory(cvector-generator)
6055
add_subdirectory(export-lora)
61-
if (NOT WIN32)
62-
# disabled on Windows because it uses internal functions not exported with LLAMA_API
63-
add_subdirectory(quantize-stats)
64-
endif()
6556
add_subdirectory(llava)
6657
if (GGML_RPC)
6758
add_subdirectory(rpc)

examples/gbnf-validator/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

examples/quantize-stats/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
This file was deleted.

grammars/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ You can use GBNF grammars:
112112

113113
- In [llama-server](../examples/server)'s completion endpoints, passed as the `grammar` body field
114114
- In [llama-cli](../examples/main), passed as the `--grammar` & `--grammar-file` flags
115-
- With [llama-gbnf-validator](../examples/gbnf-validator) tool, to test them against strings.
115+
- With [test-gbnf-validator](../tests/test-gbnf-validator.cpp), to test them against strings.
116116

117117
## JSON Schemas → GBNF
118118

src/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ add_library(llama
3232
unicode.h
3333
)
3434

35-
target_include_directories(llama PUBLIC . ../include)
35+
target_include_directories(llama PRIVATE .)
36+
target_include_directories(llama PUBLIC ../include)
3637
target_compile_features (llama PUBLIC cxx_std_17) # don't bump
3738

3839
target_link_libraries(llama PUBLIC ggml)

tests/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ if (NOT WIN32)
9696
llama_target_and_test(test-grammar-parser.cpp)
9797
llama_target_and_test(test-grammar-integration.cpp)
9898
llama_target_and_test(test-llama-grammar.cpp)
99+
llama_target_and_test(test-quantize-stats.cpp)
100+
llama_target_and_test(test-gbnf-validator.cpp)
99101
llama_target_and_test(test-chat.cpp)
100102
# TODO: disabled on loongarch64 because the ggml-ci node lacks Python 3.8
101103
if (NOT ${CMAKE_SYSTEM_PROCESSOR} MATCHES "loongarch64")

tests/test-chat.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
#include <string>
1212

1313
#include "chat.h"
14-
#include "llama-grammar.h"
15-
#include "unicode.h"
14+
15+
#include "../src/unicode.h"
16+
#include "../src/llama-grammar.h"
1617

1718
using json = nlohmann::ordered_json;
1819

examples/gbnf-validator/gbnf-validator.cpp renamed to tests/test-gbnf-validator.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#include "unicode.h"
2-
#include "llama-grammar.h"
1+
#include "../src/unicode.h"
2+
#include "../src/llama-grammar.h"
33

44
#include <cstdio>
55
#include <cstdlib>

tests/test-grammar-integration.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
#undef NDEBUG
33
#endif
44

5-
#include "unicode.h"
6-
#include "llama-grammar.h"
75
#include "json-schema-to-grammar.h"
86

7+
#include "../src/unicode.h"
8+
#include "../src/llama-grammar.h"
9+
910
#include <cassert>
1011
#include <string>
1112
#include <vector>

0 commit comments

Comments
 (0)