Generate the version string in scons, so it doesn't

have to be defined several potential places
This commit is contained in:
Nils O. Selåsdal
2013-10-29 22:23:09 +01:00
parent eceda7be70
commit f0b4d46784
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -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
View File
@@ -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@";