scons: ignore .hpp files in parse_source_list()
authorGeorge Kyriazis <george.kyriazis@intel.com>
Wed, 9 Nov 2016 22:33:10 +0000 (16:33 -0600)
committerTim Rowley <timothy.o.rowley@intel.com>
Mon, 21 Nov 2016 18:44:46 +0000 (12:44 -0600)
Drivers that contain C++ .hpp files need to ignore them too, along
with .h files, when building source file lists.

Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
scons/custom.py

index bdb4039b8afbf0a2cea1a856c4977082394862d0..544b15de1a4a2e8d154e0eec3abb026e5d9616a8 100644 (file)
@@ -281,7 +281,7 @@ def parse_source_list(env, filename, names=None):
                     # cause duplicate actions.
                     f = f[len(cur_srcdir + '/'):]
                 # do not include any headers
-                if f.endswith('.h'):
+                if f.endswith(tuple(['.h','.hpp'])):
                     continue
                 srcs.append(f)