Skip to content

Commit 98e9865

Browse files
committed
try workaround for windows
This commit adds ggml.c to the test-backend-ops compilation unit as on windows the linker cannot resolve some of the functions that have been moved into test-backend-ops, like ggml_hash_set_new. I'm not sure we will keep this moving but for now this will at least allow the test to be run on windows as well.
1 parent 50c1e6e commit 98e9865

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,8 @@ if (NOT LLAMA_SANITIZE_ADDRESS)
202202
endif()
203203
llama_build_and_test(test-gguf.cpp)
204204
llama_build_and_test(test-backend-ops.cpp)
205+
target_sources(test-backend-ops PRIVATE ${PROJECT_SOURCE_DIR}/ggml/src/ggml.c)
206+
target_compile_definitions(test-backend-ops PRIVATE GGML_BUILD GGML_VERSION=\"${GGML_VERSION}\" GGML_COMMIT=\"${GGML_COMMIT}\")
205207
target_include_directories(test-backend-ops PRIVATE ${PROJECT_SOURCE_DIR}/ggml/src)
206208

207209
llama_build_and_test(test-model-load-cancel.cpp LABEL "model")

0 commit comments

Comments
 (0)