Very basic DCP verification in the player (#1238).
[dcpomatic.git] / wscript
diff --git a/wscript b/wscript
index ab86865b25cac7c4b5279fccfa2b5b0ab9eb8c00..6a4854052ab6ea2176f2290e31ad3fcae41edea9 100644 (file)
--- a/wscript
+++ b/wscript
@@ -27,7 +27,16 @@ import distutils.spawn
 from waflib import Logs, Context
 
 APPNAME = 'dcpomatic'
-VERSION = '2.13.0devel'
+
+this_version = subprocess.Popen(shlex.split('git tag -l --points-at HEAD'), stdout=subprocess.PIPE).communicate()[0]
+last_version = subprocess.Popen(shlex.split('git describe --abbrev=0'), stdout=subprocess.PIPE).communicate()[0]
+
+if this_version == '':
+    VERSION = '%sdevel' % last_version[1:].strip()
+else:
+    VERSION = this_version[1:].strip()
+
+print 'Version: %s' % VERSION
 
 def options(opt):
     opt.load('compiler_cxx')
@@ -81,8 +90,6 @@ def configure(conf):
                                        '-Wcast-align',
                                        '-Wextra',
                                        '-Wwrite-strings',
-                                       '-Wunsafe-loop-optimizations',
-                                       '-Wlogical-op',
                                        # Remove auto_ptr warnings from libxml++-2.6
                                        '-Wno-deprecated-declarations',
                                        '-D_FILE_OFFSET_BITS=64'])
@@ -140,6 +147,7 @@ def configure(conf):
     # POSIX
     if conf.env.TARGET_LINUX or conf.env.TARGET_OSX:
         conf.env.append_value('CXXFLAGS', '-DDCPOMATIC_POSIX')
+        conf.env.append_value('CXXFLAGS', ['-Wunsafe-loop-optimizations', '-Wlogical-op'])
         boost_lib_suffix = ''
         boost_thread = 'boost_thread'
         conf.env.append_value('LINKFLAGS', '-pthread')