changeset 7cc44c7913f2 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=7cc44c7913f2
description:
build: Place proto output in the same directory, also for EXTRAS
This patch changes the ProtoBuf builder such that the generated source
and header is placed in the build directory of the proto file. This
was previously not the case for the directories included as EXTRAS. To
make this work, we also ensure that the build directory for the EXTRAS
are added to the include path (which does not seem to automatically be
the case).
diffstat:
src/SConscript | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r d6f0e70fd0d4 -r 7cc44c7913f2 src/SConscript
--- a/src/SConscript Thu Oct 17 10:20:45 2013 -0500
+++ b/src/SConscript Thu Oct 17 10:20:45 2013 -0500
@@ -246,8 +246,8 @@
# Currently, we stick to generating the C++ headers, so we
# only need to track the source and header.
- self.cc_file = File(joinpath(self.dirname, modname + '.pb.cc'))
- self.hh_file = File(joinpath(self.dirname, modname + '.pb.h'))
+ self.cc_file = File(modname + '.pb.cc')
+ self.hh_file = File(modname + '.pb.h')
class UnitTest(object):
'''Create a UnitTest'''
@@ -335,6 +335,11 @@
for extra_dir in extras_dir_list:
prefix_len = len(dirname(extra_dir)) + 1
+
+ # Also add the corresponding build directory to pick up generated
+ # include files.
+ env.Append(CPPPATH=Dir(joinpath(env['BUILDDIR'], extra_dir[prefix_len:])))
+
for root, dirs, files in os.walk(extra_dir, topdown=True):
# if build lives in the extras directory, don't walk down it
if 'build' in dirs:
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev