From c8caaaaabd6cde190ae53171eb2156a9ad36fef2 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Fri, 19 Nov 2004 00:01:24 +0000 Subject: [PATCH] make glob rule robust against non-existant directories SVN-Revision: 2107 --- SConstruct | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/SConstruct b/SConstruct index eab36088c..d4ddd385b 100644 --- a/SConstruct +++ b/SConstruct @@ -6,9 +6,13 @@ def Glob(dirs, pattern = '*' ): import os, fnmatch files = [] for dir in dirs: - for file in os.listdir( Dir(dir).srcnode().abspath ): - if fnmatch.fnmatch(file, pattern) : - files.append( os.path.join( dir, file ) ) + try: + for file in os.listdir( Dir(dir).srcnode().abspath ): + if fnmatch.fnmatch(file, pattern) : + files.append( os.path.join( dir, file ) ) + except: + print "Warning, couldn't find directory " + dir + return files # thanks to Michael P Jung @@ -84,7 +88,7 @@ else: if env['VARIANT'] == "optimize": - env.Append(CXXFLAGS = "-O2 -g") + env.Append(CXXFLAGS = "-O2 -g -Wall") elif env['VARIANT'] == "debug": env.Append(CXXFLAGS = "-O0 -g3 -Wall -Werror") env.Append(CPPDEFINES = { "DEBUG":"1" }) -- 2.11.0