summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryg2f <yoann@terminajones.com>2015-04-01 17:04:41 +0200
committeryg2f <yoann@terminajones.com>2015-04-01 17:04:41 +0200
commit7ea3482c38a1d18af687aa6a08d7dea9f346a2e9 (patch)
tree627ea2f37e2e62021efd1fc60f2ea7f6c8e6c00a
parent3920c497b3811b3c0c970631599c13025c81ff14 (diff)
add scons extra suffix option
makes it possible to add a custom extra suffix to the base filename of all generated binary files. example : scons p=windows extra_suffix=yourBranchName or scons p=windows bits=32 extra_suffix=v20150401_1642 or scons p=windows extra_suffix=msvc2010_git20150401
-rw-r--r--SConstruct4
1 files changed, 4 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct
index 2dc9fa1e70..922dc64fe3 100644
--- a/SConstruct
+++ b/SConstruct
@@ -121,6 +121,7 @@ opts.Add("LINKFLAGS", "Custom flags for the linker");
opts.Add('disable_3d', 'Disable 3D nodes for smaller executable (yes/no)', "no")
opts.Add('disable_advanced_gui', 'Disable advance 3D gui nodes and behaviors (yes/no)', "no")
opts.Add('colored', 'Enable colored output for the compilation (yes/no)', 'no')
+opts.Add('extra_suffix', 'Custom extra suffix added to the base filename of all generated binary files.', '')
# add platform specific options
@@ -176,6 +177,9 @@ if selected_platform in platform_list:
env = env_base.Clone()
env.extra_suffix=""
+
+ if env["extra_suffix"] != '' :
+ env.extra_suffix += '.'+env["extra_suffix"]
CCFLAGS = env.get('CCFLAGS', '')
env['CCFLAGS'] = ''