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
OpenDAS
llama.cpp
Commits
cfb179e7
Commit
cfb179e7
authored
Dec 02, 2024
by
xuxzh1
🎱
Browse files
Upload New File
parent
c4211f66
Pipeline
#2027
canceled with stages
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
common/cmake/build-info-gen-cpp.cmake
common/cmake/build-info-gen-cpp.cmake
+24
-0
No files found.
common/cmake/build-info-gen-cpp.cmake
0 → 100644
View file @
cfb179e7
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