Replies: 2 comments 10 replies
-
The path of least resistance is to use another CMake setup and just Part of doing that route means the build_info automatically will get built with cmake, and thus becomes a non-problem. |
Beta Was this translation helpful? Give feedback.
-
Can you check if these changes to the diff --git a/CMakeLists.txt b/CMakeLists.txt
index a3132063..3af0250b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -70,8 +70,10 @@ option(LLAMA_BUILD_SERVER "llama: build server example" ${LLAMA_STANDALONE})
# 3rd party libs
option(LLAMA_CURL "llama: use libcurl to download model from an URL" OFF)
-# Required for relocatable CMake package
-include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/build-info.cmake)
+if (LLAMA_BUILD_EXAMPLES)
+ # Required for relocatable CMake package
+ include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/build-info.cmake)
+endif()
# override ggml options
set(GGML_SANITIZE_THREAD ${LLAMA_SANITIZE_THREAD})
@@ -188,7 +190,9 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/llama.pc"
# programs, examples and tests
#
-add_subdirectory(common)
+if (LLAMA_BUILD_EXAMPLES OR LLAMA_BUILD_TESTS)
+ add_subdirectory(common)
+endif()
if (LLAMA_BUILD_TESTS AND NOT CMAKE_JS_VERSION)
include(CTest) |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What is the purpose of the
build_info
command in theCMakeLists
for thecommon
lib? I would like to be able to build llama.cpp without it being a part of a GitHub repo, but it seems without.git
,build_info
fails, causing the overall build to fail.I haven't succeeded in turning this off.
Beta Was this translation helpful? Give feedback.
All reactions