Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
orangecat
ollama
Commits
217903ab
Commit
217903ab
authored
Nov 13, 2024
by
xuxzh1
🎱
Browse files
update
parent
2c686647
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
llm/llama.cpp/.gitignore
llm/llama.cpp/.gitignore
+1
-0
llm/llama.cpp/common/cmake/build-info-gen-cpp.cmake
llm/llama.cpp/common/cmake/build-info-gen-cpp.cmake
+24
-0
No files found.
llm/llama.cpp/.gitignore
View file @
217903ab
...
...
@@ -43,6 +43,7 @@ lcov-report/
tags
.build/
build*
!build-info-gen-cpp.cmake
!build-info.cmake
!build-info.cpp.in
!build-info.sh
...
...
llm/llama.cpp/common/cmake/build-info-gen-cpp.cmake
0 → 100644
View file @
217903ab
include
(
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake/build-info.cmake
)
set
(
TEMPLATE_FILE
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/common/build-info.cpp.in"
)
set
(
OUTPUT_FILE
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/common/build-info.cpp"
)
# Only write the build info if it changed
if
(
EXISTS
${
OUTPUT_FILE
}
)
file
(
READ
${
OUTPUT_FILE
}
CONTENTS
)
string
(
REGEX MATCH
"LLAMA_COMMIT =
\"
([^
\"
]*)
\"
;"
_
${
CONTENTS
}
)
set
(
OLD_COMMIT
${
CMAKE_MATCH_1
}
)
string
(
REGEX MATCH
"LLAMA_COMPILER =
\"
([^
\"
]*)
\"
;"
_
${
CONTENTS
}
)
set
(
OLD_COMPILER
${
CMAKE_MATCH_1
}
)
string
(
REGEX MATCH
"LLAMA_BUILD_TARGET =
\"
([^
\"
]*)
\"
;"
_
${
CONTENTS
}
)
set
(
OLD_TARGET
${
CMAKE_MATCH_1
}
)
if
(
NOT OLD_COMMIT STREQUAL BUILD_COMMIT OR
NOT OLD_COMPILER STREQUAL BUILD_COMPILER OR
NOT OLD_TARGET STREQUAL BUILD_TARGET
)
configure_file
(
${
TEMPLATE_FILE
}
${
OUTPUT_FILE
}
)
endif
()
else
()
configure_file
(
${
TEMPLATE_FILE
}
${
OUTPUT_FILE
}
)
endif
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment