Enable the semantic version mechanism for WAMR (#1374)
Use the semantic versioning (https://semver.org) to replace the current date versioning system, which is more general and is requested by some developers, e.g. issue #1357. There are three parts in the new version string: - major. Any incompatible modification on ABIs and APIs will lead to an increment in the value of major, which mainly includes: AOT calling conventions, AOT file format, wasm_export.h, wasm_c_api.h, and so on. - minor. It represents new features, including MVP/POST-MVP features, libraries, WAMR private ones, and so one. - patch. It represents patches. The new version will start from 1.0.0. Update the help info and version showing for iwasm and wamrc.
This commit is contained in:
@ -116,6 +116,24 @@ else ()
|
||||
unset (LLVM_AVAILABLE_LIBS)
|
||||
endif ()
|
||||
|
||||
########################################
|
||||
## semantic version information
|
||||
|
||||
if (NOT DEFINED WAMR_VERSION_MAJOR)
|
||||
set (WAMR_VERSION_MAJOR 1)
|
||||
endif ()
|
||||
|
||||
if (NOT DEFINED WAMR_VERSION_MINOR)
|
||||
set (WAMR_VERSION_MINOR 0)
|
||||
endif ()
|
||||
|
||||
if (NOT DEFINED WAMR_VERSION_PATCH)
|
||||
set (WAMR_VERSION_PATCH 0)
|
||||
endif ()
|
||||
|
||||
configure_file(${WAMR_ROOT_DIR}/core/version.h.in ${WAMR_ROOT_DIR}/core/version.h @ONLY)
|
||||
########################################
|
||||
|
||||
message ("-- Build Configurations:")
|
||||
message (" Build as target ${WAMR_BUILD_TARGET}")
|
||||
message (" CMAKE_BUILD_TYPE " ${CMAKE_BUILD_TYPE})
|
||||
|
||||
Reference in New Issue
Block a user