Protoc: Fix bug in src-path

The tool was using an relative path for the includes, but an absolute
for the src-files. Protoc cannot distinguish between relative and
absolute paths and is not able to find sources when relative and
absolute paths are combined.

Tested with protoc 2.6.1, python 3.5.1
This commit is contained in:
Roman C. Podolski 2017-07-23 15:20:26 +08:00 committed by ita1024
parent df1767728f
commit a6f4ad6e1d
1 changed files with 1 additions and 2 deletions

View File

@ -35,8 +35,7 @@ Notes when using this tool:
"""
class protoc(Task):
# protoc expects the input proto file to be an absolute path.
run_str = '${PROTOC} ${PROTOC_FLAGS} ${PROTOC_ST:INCPATHS} ${SRC[0].abspath()}'
run_str = '${PROTOC} ${PROTOC_FLAGS} ${PROTOC_ST:INCPATHS} ${SRC[0].bldpath()}'
color = 'BLUE'
ext_out = ['.h', 'pb.cc']
def scan(self):