mirror of https://gitlab.com/ita1024/waf.git
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;
|
package udp.tc.tests;
|
||||||
|
|
||||||
|
import "message_inc.proto";
|
||||||
|
|
||||||
option java_package = "com.udp.tc.tests";
|
option java_package = "com.udp.tc.tests";
|
||||||
option java_outer_classname = "MessageProtos";
|
option java_outer_classname = "MessageProtos";
|
||||||
option cc_generic_services = false;
|
option cc_generic_services = false;
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
message IncludeMe {
|
||||||
|
required int32 test = 1;
|
||||||
|
optional uint32 blah = 2;
|
||||||
|
}
|
|
@ -12,7 +12,7 @@ def configure(conf):
|
||||||
def build(bld):
|
def build(bld):
|
||||||
bld(
|
bld(
|
||||||
features = 'cxx cxxshlib',
|
features = 'cxx cxxshlib',
|
||||||
source = ['inc/message.proto'],
|
source = ['inc/message_inc.proto','inc/message.proto'],
|
||||||
target = 'somelib',
|
target = 'somelib',
|
||||||
includes = ['inc'])
|
includes = ['inc'])
|
||||||
|
|
||||||
|
|
|
@ -60,8 +60,8 @@ class protoc(Task):
|
||||||
m = re.search(r'^import\s+"(.*)";.*(//)?.*', line)
|
m = re.search(r'^import\s+"(.*)";.*(//)?.*', line)
|
||||||
if m:
|
if m:
|
||||||
dep = m.groups()[0]
|
dep = m.groups()[0]
|
||||||
for incpath in self.env.INCPATHS:
|
for incnode in self.generator.includes_nodes:
|
||||||
found = self.generator.includes_nodes.find_resource(dep)
|
found = incnode.find_resource(dep)
|
||||||
if found:
|
if found:
|
||||||
nodes.append(found)
|
nodes.append(found)
|
||||||
parse_node(found)
|
parse_node(found)
|
||||||
|
|
Loading…
Reference in New Issue