I have a scons project that includes several header files as a compiler flag.
env.Append(CCFLAGS = ['/FIinclude.h'])
These files are not included by any files in the project. I need to add an explicit dependency for them.
forced_include_headers = ['include.h']
# Trying to add an explicit dependency for each build target
for object in BUILD_TARGETS:
env.Depends(object, forced_include_headers)
The problem I ran into is that the list is BUILD_TARGETSempty. It seems that it contains only those things that were transferred from COMMAND_LINE_TARGETSor DEFAULT_TARGETS. All goals in our project are built implicitly. We do not use env.Default, etc. Is there a way to get an implicit target list, or do I need to manually create it? I noticed that it is TARGETSreserved and does not seem to contain what I want.
I can add env.Depends(target, forced_include_headers)for all purposes in my respective SConscript files, but the project is quite large.