Generate the version string in scons, so it doesn't
have to be defined several potential places
This commit is contained in:
@@ -10,6 +10,12 @@ version_info = {
|
|||||||
'version_patch': 0 ,
|
'version_patch': 0 ,
|
||||||
'version_revision': revision,
|
'version_revision': revision,
|
||||||
}
|
}
|
||||||
|
version_info['version_str'] = "%d.%d.%d.%s" % (
|
||||||
|
version_info['version_major'],
|
||||||
|
version_info['version_minor'],
|
||||||
|
version_info['version_patch'],
|
||||||
|
version_info['version_revision'])
|
||||||
|
|
||||||
|
|
||||||
AddOption('--build_type',
|
AddOption('--build_type',
|
||||||
dest = 'build_type',
|
dest = 'build_type',
|
||||||
|
|||||||
+1
-1
@@ -5,6 +5,6 @@ const int ucore_version_major = @version_major@;
|
|||||||
const int ucore_version_minor = @version_minor@;
|
const int ucore_version_minor = @version_minor@;
|
||||||
const int ucore_version_patch = @version_patch@;
|
const int ucore_version_patch = @version_patch@;
|
||||||
|
|
||||||
const char ucore_version_str[] = "@version_major@.@version_minor@.@version_patch@.@version_revision@";
|
const char ucore_version_str[] = "@version_str@";
|
||||||
const char ucore_build_host[] = "@build_host@";
|
const char ucore_build_host[] = "@build_host@";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user