diff options
Diffstat (limited to 'src/SConscript')
| -rw-r--r-- | src/SConscript | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/SConscript b/src/SConscript index f09db093..cd2d8a52 100644 --- a/src/SConscript +++ b/src/SConscript @@ -67,7 +67,6 @@ env.Uic(env.Glob('*.ui')) env.RequireLibraries('uibase', 'shared', 'bsatk', 'esptk')
-
env.AppendUnique(LIBS = [
'shell32',
'user32',
@@ -114,8 +113,9 @@ env.AppendUnique(LINKFLAGS = [ # modeltest is optional and it doesn't compile anyway...
cpp_files = [
- x for x in Glob('*.cpp')
- if x.name != 'modeltest.cpp' and x.name != 'aboutdialog.cpp'
+ x for x in env.Glob('*.cpp', source = True)
+ if x.name != 'modeltest.cpp' and x.name != 'aboutdialog.cpp' and \
+ not x.name.startswith('moc_') # I think this is a strange bug
]
about_env = env.Clone()
@@ -143,6 +143,14 @@ env.AppendUnique(LIBS = 'zlibstatic') prog = env.Program('ModOrganizer',
cpp_files + env.Glob('*.qrc') + other_sources)
+###############################################################################
+# I'd like to automatically add this to every .o generation.
+if 'IWYU' in env:
+ for f in cpp_files + [ env.File('aboutdialog.cpp') ]:
+ env.AddPostAction(prog, "-$IWYU $IWYU_FLAGS -Xiwyu --mapping_file=$IWYU_MAPPING_FILE $IWYU_COMCOM " + str(f))
+ env.Depends(prog, env['IWYU_MAPPING_FILE'])
+###############################################################################
+
env.InstallModule(prog)
for subdir in ('tutorials', 'stylesheets'):
|
