mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-22 01:46:15 +01:00
Fix protoc #2009
Fix bug described in #2009 and extend example in playground to include described scenario.
This commit is contained in:
parent
c3fee6620c
commit
d2f48b5d89
@ -1,5 +1,7 @@
|
||||
package udp.tc.tests;
|
||||
|
||||
import "message_inc.proto";
|
||||
|
||||
option java_package = "com.udp.tc.tests";
|
||||
option java_outer_classname = "MessageProtos";
|
||||
option cc_generic_services = false;
|
||||
|
4
playground/protoc/inc/message_inc.proto
Normal file
4
playground/protoc/inc/message_inc.proto
Normal file
@ -0,0 +1,4 @@
|
||||
message IncludeMe {
|
||||
required int32 test = 1;
|
||||
optional uint32 blah = 2;
|
||||
}
|
@ -12,7 +12,7 @@ def configure(conf):
|
||||
def build(bld):
|
||||
bld(
|
||||
features = 'cxx cxxshlib',
|
||||
source = ['inc/message.proto'],
|
||||
source = ['inc/message_inc.proto','inc/message.proto'],
|
||||
target = 'somelib',
|
||||
includes = ['inc'])
|
||||
|
||||
|
@ -60,8 +60,8 @@ class protoc(Task):
|
||||
m = re.search(r'^import\s+"(.*)";.*(//)?.*', line)
|
||||
if m:
|
||||
dep = m.groups()[0]
|
||||
for incpath in self.env.INCPATHS:
|
||||
found = self.generator.includes_nodes.find_resource(dep)
|
||||
for incnode in self.generator.includes_nodes:
|
||||
found = incnode.find_resource(dep)
|
||||
if found:
|
||||
nodes.append(found)
|
||||
parse_node(found)
|
||||
|
Loading…
Reference in New Issue
Block a user