diff options
-rw-r--r-- | SConstruct | 30 |
1 files changed, 17 insertions, 13 deletions
@@ -781,22 +781,26 @@ Default(libVmime) # Tests if env['build_tests'] == 'yes': - libUnitpp = env.StaticLibrary( - target = 'tests/unit++', - source = libunitpp_sources - ) + if env['debug'] == 'yes': + libUnitpp = env.StaticLibrary( + target = 'tests/unit++', + source = libunitpp_sources + ) - Default(libUnitpp) + Default(libUnitpp) - for test in libvmimetest_sources: - Default( - env.Program( - target = test[0], - source = test[1], - LIBS=['unit++', packageVersionedGenericName + '-debug'], - LIBPATH=['.', './tests/'] + 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) ######################## |