llama: fix whole source code rebuilt on each new commit (#28278)

This commit is contained in:
Xuan-Son Nguyen
2026-09-03 23:53:04 +02:00
committed by GitHub
parent c5a5535e6e
commit d230ddd763
3 changed files with 7 additions and 5 deletions
+2 -5
View File
@@ -52,12 +52,9 @@ set_target_properties(llama PROPERTIES
MACHO_CURRENT_VERSION 0 # keep macOS linker from seeing oversized version number
)
target_compile_definitions(llama PRIVATE
LLAMA_VERSION="${LLAMA_VERSION}"
LLAMA_COMMIT="${LLAMA_BUILD_COMMIT}"
)
configure_file(llama-version.h.in ${CMAKE_CURRENT_BINARY_DIR}/llama-version.h @ONLY)
target_include_directories(llama PRIVATE .)
target_include_directories(llama PRIVATE . ${CMAKE_CURRENT_BINARY_DIR})
target_include_directories(llama PUBLIC ../include)
target_compile_features (llama PRIVATE cxx_std_17) # don't bump
+4
View File
@@ -0,0 +1,4 @@
#pragma once
#define LLAMA_VERSION "@LLAMA_VERSION@"
#define LLAMA_COMMIT "@LLAMA_BUILD_COMMIT@"
+1
View File
@@ -1,6 +1,7 @@
#include "llama.h"
#include "llama-impl.h"
#include "llama-version.h"
#include "llama-chat.h"
#include "llama-context.h"