title: How do I filter an SCons Glob result?
body: <p>I sometimes want to exclude certain source files from a Glob result in SCons. Usually it's because I want to compile that source file with different options. Something like this:</p>
  
  <pre><code>objs = env.Object(Glob('*.cc'))
  objs += env.Object('SpeciallyTreatedFile.cc', CXXFLAGS='-O0')
  </code></pre>
  
  <p>Of course, that creates a problem for SCons:</p>
  
  <pre><code>scons: *** Two environments with different actions were specified
         for the same target: SpeciallyTreatedFile.o
  </code></pre>
  
  <p>I usually work around this using the following idiom:</p>
  
  <pre><code>objs = env.Object([f for f in Glob('*.cc')
    if 'SpeciallyTreatedFile.cc' not in f.path])
  </code></pre>
  
  <p>But that's pretty ugly, and gets even uglier if there's more than one file to be filtered out.</p>
  
  <p>Is there a clearer way to do this?</p>