mirror of
https://github.com/browsermt/bergamot-translator.git
synced 2024-09-11 05:35:33 +03:00
Generate project version file for native builds
- The header file exposes a function that provides version information for native binaries
This commit is contained in:
parent
2e5880d3d4
commit
0ad583cc34
@ -1,3 +1,7 @@
|
|||||||
|
# Generate version file
|
||||||
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/project_version.h.in
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/project_version.h @ONLY)
|
||||||
|
|
||||||
add_library(bergamot-translator STATIC
|
add_library(bergamot-translator STATIC
|
||||||
byte_array_util.cpp
|
byte_array_util.cpp
|
||||||
text_processor.cpp
|
text_processor.cpp
|
||||||
|
19
src/translator/project_version.h.in
Normal file
19
src/translator/project_version.h.in
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
/*
|
||||||
|
* File project_version.h is generated using CMake. Do not modify project_version.h manually!
|
||||||
|
* Edit project_version.h.in file instead.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
|
namespace marian {
|
||||||
|
namespace bergamot {
|
||||||
|
|
||||||
|
std::string bergamotBuildVersion() {
|
||||||
|
// e.g. v1.2.3-alpha.1.1+abc123d
|
||||||
|
return "@PROJECT_VERSION_STRING_FULL@";
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace bergamot
|
||||||
|
} // namespace marian
|
Loading…
Reference in New Issue
Block a user