Don't build tests on windows.
authorCarl Hetherington <cth@carlh.net>
Thu, 23 Oct 2014 08:42:34 +0000 (09:42 +0100)
committerCarl Hetherington <cth@carlh.net>
Thu, 23 Oct 2014 08:42:34 +0000 (09:42 +0100)
cscript
test/wscript
wscript

diff --git a/cscript b/cscript
index 1b6412f1fdd66d82d4027674d482a2340d30f4b0..c81493a6e4a8b7b7e2731bef97bba88a34afba38 100644 (file)
--- a/cscript
+++ b/cscript
@@ -7,7 +7,7 @@ def build(target, options):
     if target.debug:
         cmd += ' --enable-debug'
     if target.platform == 'windows':
-        cmd += ' --target-windows'
+        cmd += ' --target-windows --disable-tests'
 
     target.command(cmd)
     target.command('./waf build install')
index 8e9b2a7515cfa278319c51e1adddc36f701eb9be..50f9e9bf074dd8aca5da90d0f471c09fdc60ed44 100644 (file)
@@ -1,4 +1,5 @@
 def configure(conf):
+    boost_lib_suffix = ''
     if conf.env.TARGET_WINDOWS:
         boost_lib_suffix = '-mt'
 
diff --git a/wscript b/wscript
index f083692c6d8206ad851aacd8e2559ff506f8b6d8..81582e68d626209eecefb713390f298f2c089767 100644 (file)
--- a/wscript
+++ b/wscript
@@ -9,6 +9,7 @@ def options(opt):
     opt.add_option('--enable-debug', action='store_true', default=False, help='build with debugging information and without optimisation')
     opt.add_option('--static', action='store_true', default=False, help='build libsub statically and link statically to cxml')
     opt.add_option('--target-windows', action='store_true', default=False, help='set up to do a cross-compile to make a Windows package')
+    opt.add_option('--disable-tests', action='store_true', default=False, help='disable building of tests')
 
 def configure(conf):
     conf.load('compiler_cxx')
@@ -18,6 +19,7 @@ def configure(conf):
     conf.env.ENABLE_DEBUG = conf.options.enable_debug
     conf.env.STATIC = conf.options.static
     conf.env.TARGET_WINDOWS = conf.options.target_windows
+    conf.env.DISABLE_TESTS = conf.options.disable_tests
 
     if conf.options.enable_debug:
         conf.env.append_value('CXXFLAGS', '-g')
@@ -66,7 +68,8 @@ def configure(conf):
                    lib=['boost_locale%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix],
                    uselib_store='BOOST_LOCALE')
 
-    conf.recurse('test')
+    if not conf.env.DISABLE_TESTS:
+        conf.recurse('test')
 
 def build(bld):
     create_version_cc(bld, VERSION)
@@ -78,7 +81,8 @@ def build(bld):
         install_path='${LIBDIR}/pkgconfig')
 
     bld.recurse('src')
-    bld.recurse('test')
+    if not bld.env.DISABLE_TESTS:
+        bld.recurse('test')
     bld.recurse('tools')
 
     bld.add_post_fun(post)