File tree Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -402,6 +402,7 @@ if (LLAMA_ALL_WARNINGS)
402
402
-Wstrict-prototypes
403
403
-Wpointer-arith
404
404
-Wmissing-prototypes
405
+ -Werror=implicit-int
405
406
)
406
407
set (cxx_flags
407
408
-Wall
Original file line number Diff line number Diff line change 1
1
# Define the default target now so that it is always the first target
2
- BUILD_TARGETS = main quantize quantize-stats perplexity embedding vdot train-text-from-scratch convert-llama2c-to-ggml simple save-load-state server embd-input-test gguf llama-bench baby-llama beam_search
2
+ BUILD_TARGETS = main quantize quantize-stats perplexity embedding vdot train-text-from-scratch convert-llama2c-to-ggml simple save-load-state server embd-input-test gguf llama-bench baby-llama beam_search tests/test-c.o
3
3
4
4
# Binaries only useful for tests
5
5
TEST_TARGETS = tests/test-llama-grammar tests/test-grammar-parser tests/test-double-float tests/test-grad0 tests/test-opt tests/test-quantize-fns tests/test-quantize-perf tests/test-sampling tests/test-tokenizer-0-llama tests/test-tokenizer-0-falcon tests/test-tokenizer-1
64
64
65
65
# warnings
66
66
CFLAGS += -Wall -Wextra -Wpedantic -Wcast-qual -Wdouble-promotion -Wshadow -Wstrict-prototypes -Wpointer-arith \
67
- -Wmissing-prototypes
67
+ -Wmissing-prototypes -Werror=implicit-int
68
68
CXXFLAGS += -Wall -Wextra -Wpedantic -Wcast-qual -Wno-unused-function -Wno-multichar
69
69
70
70
# OS specific
@@ -369,7 +369,7 @@ libllama.so: llama.o ggml.o $(OBJS)
369
369
$(CXX ) $(CXXFLAGS ) -shared -fPIC -o $@ $^ $(LDFLAGS )
370
370
371
371
clean :
372
- rm -vf * .o * .so * .dll benchmark-matmult build-info.h $(BUILD_TARGETS ) $(TEST_TARGETS )
372
+ rm -vf * .o tests/ * .o * .so * .dll benchmark-matmult build-info.h $(BUILD_TARGETS ) $(TEST_TARGETS )
373
373
374
374
#
375
375
# Examples
@@ -489,3 +489,6 @@ tests/test-tokenizer-0-llama: tests/test-tokenizer-0-llama.cpp build-info.h ggml
489
489
490
490
tests/test-tokenizer-1 : tests/test-tokenizer-1.cpp build-info.h ggml.o llama.o common.o $(OBJS )
491
491
$(CXX ) $(CXXFLAGS ) $(filter-out % .h,$^ ) -o $@ $(LDFLAGS )
492
+
493
+ tests/test-c.o : tests/test-c.c llama.h
494
+ $(CC ) $(CFLAGS ) -c $(filter-out % .h,$^ ) -o $@
Original file line number Diff line number Diff line change @@ -37,3 +37,8 @@ llama_build_and_test_executable(test-grammar-parser.cpp)
37
37
llama_build_and_test_executable (test -llama-grammar.cpp )
38
38
llama_build_and_test_executable (test -grad0.cpp ) # SLOW
39
39
# llama_build_and_test_executable(test-opt.cpp) # SLOW
40
+
41
+ # dummy executable - not installed
42
+ get_filename_component (TEST_TARGET test -c.c NAME_WE )
43
+ add_executable (${TEST_TARGET} test -c.c )
44
+ target_link_libraries (${TEST_TARGET} PRIVATE llama )
Original file line number Diff line number Diff line change
1
+ #include "llama.h"
2
+
3
+ int main (void ) {}
You can’t perform that action at this time.
0 commit comments