koboldcpp/examples/test-cmake
Jim Wu 885c5bbe8e
Some checks are pending
Python Type-Check / python type-check (push) Waiting to run
tests : replace personal home directory paths with generic placeholders (#27043)
Scrub developer-specific /home/<user>/ paths from example docs and test
fixtures so they don't leak into the tree.

- examples/test-cmake/README.md: /home/danbev/... -> /path/to/llama.cpp/...
- tests/test-chat.cpp: /home/jarvis/... -> /home/user/... (input and
  expected string kept identical so the parser test still passes)

Co-authored-by: Jim Wu <ywu@xilinx.com>
2026-08-14 10:32:59 +02:00
..
.gitignore cmake : introduce semantic versioning (#26839) 2026-08-12 14:15:03 +02:00
build-install.sh cmake : introduce semantic versioning (#26839) 2026-08-12 14:15:03 +02:00
build.sh cmake : introduce semantic versioning (#26839) 2026-08-12 14:15:03 +02:00
CMakeLists.txt cmake : introduce semantic versioning (#26839) 2026-08-12 14:15:03 +02:00
README.md tests : replace personal home directory paths with generic placeholders (#27043) 2026-08-14 10:32:59 +02:00
test-cmake.cpp cmake : introduce semantic versioning (#26839) 2026-08-12 14:15:03 +02:00

cmake-test

This is just for manually testing/developing of a llama.cpp installation to enable troubleshooting issues and exploration. The idea is that this can be used after making changes to llama.cpp installation cmake configuration and then verify it locally.

Usage

The following will configure, build, and install llama.cpp

Configuring/build/install:

./build-install.sh

The above command will create a directory named install in the current directory which will have the follwing files in its lib directory:

(venv) $ ls install/lib/
cmake                   libggml.so          libllama-common.so.0      libllama.so.0.1.0  llama.cpp
libggml-base.so         libggml.so.0        libllama-common.so.0.1.0  libmtmd.so         pkgconfig
libggml-base.so.0       libggml.so.0.19.0   libllama.so               libmtmd.so.0
libggml-base.so.0.19.0  libllama-common.so  libllama.so.0             libmtmd.so.0.1.0

Build/run this project using the installation created above:

(venv) $ ./build.sh
-- Configuring done (0.0s)
-- Generating done (0.0s)
-- Build files have been written to: /path/to/llama.cpp/examples/test-cmake/build
[100%] Built target test-cmake
[test-cmake] Using llama.cpp version 0.1.0-dev-b10335
[test-cmake] Initializing backend...
load_backend: loaded CPU backend from /path/to/llama.cpp/examples/test-cmake/install/lib/llama.cpp/libggml-cpu-alderlake.so
[test-cmake] Backend initialized.