Re: [CMake] protobuf and imports relative to root (and --proto_path)

2018-10-01 Thread David Jobet
Tx Alexander. Unfortunately, the version of cmake that we use (2.6.0) does not have a --dependency_out arg. So I just coded a small python parser that recursively check for imports and create a ninja depfile out of it. (injected with DEPFILE in custom command) It looks like it works fine thanks

Re: [CMake] protobuf and imports relative to root (and --proto_path)

2018-09-25 Thread Alexander Neundorf
On 2018 M09 25, Tue 16:53:27 CEST David Jobet wrote: > > What I do have a problem is rerunning protoc automatically on proto-files > > which import proto files that have been modified. > > How do you handle this ? > > I just found out I don't. > Any idea on that one ? here are some suggestions:

Re: [CMake] protobuf and imports relative to root (and --proto_path)

2018-09-25 Thread David Jobet
> What I do have a problem is rerunning protoc automatically on proto-files > which > import proto files that have been modified. > How do you handle this ? I just found out I don't. Any idea on that one ? Otherwise I'm going to create a small .proto parser (python) that will just list the

Re: [CMake] protobuf and imports relative to root (and --proto_path)

2018-08-28 Thread David Jobet
Hello, thanks for your answer. Here's a mockup : projectroot/lib1 projectroot/lib1/CMakeLists.txt projectroot/lib1/a.proto projectroot/lib1/b.proto projectroot/lib1/test.cc See below for the content of the files. Here's the cmake output : $ cmake --build build [0/1] Re-running CMake... --

Re: [CMake] protobuf and imports relative to root (and --proto_path)

2018-08-23 Thread Alexander Neundorf
On 2018 M08 23, Thu 12:50:14 CEST David Jobet wrote: > Hello, > > I'm trying to port an existing project from premake to cmake. > I'm trying to avoid modifying the source files while doing so. > > Right now, we have several libraries (read in different directories) using > proto files with

[CMake] protobuf and imports relative to root (and --proto_path)

2018-08-23 Thread David Jobet
Hello, I'm trying to port an existing project from premake to cmake. I'm trying to avoid modifying the source files while doing so. Right now, we have several libraries (read in different directories) using proto files with imports between them. All imports are made relative to the root of the