From bd384e05d1ba53c2d0c77841455d6d63ddc23b5d Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Fri, 28 Jan 2005 18:00:50 +0000 Subject: [PATCH] Ensure debugging mode is enabled when building tests. --- SConstruct | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/SConstruct b/SConstruct index c1ce20ef..ebe67885 100644 --- a/SConstruct +++ b/SConstruct @@ -781,23 +781,27 @@ Default(libVmime) # Tests if env['build_tests'] == 'yes': - libUnitpp = env.StaticLibrary( - target = 'tests/unit++', - source = libunitpp_sources - ) - - Default(libUnitpp) - - for test in libvmimetest_sources: - Default( - env.Program( - target = test[0], - source = test[1], - LIBS=['unit++', packageVersionedGenericName + '-debug'], - LIBPATH=['.', './tests/'] - ) + if env['debug'] == 'yes': + libUnitpp = env.StaticLibrary( + target = 'tests/unit++', + source = libunitpp_sources ) + Default(libUnitpp) + + for test in libvmimetest_sources: + Default( + env.Program( + target = test[0], + source = test[1], + LIBS=['unit++', packageVersionedGenericName + '-debug'], + LIBPATH=['.', './tests/'] + ) + ) + else: + print 'Debug mode must be enabled to build tests!' + Exit(1) + ######################## # Installation rules #