[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    [CMake] How to handle dependencies of protobuf files ?
From:       Alexander Neundorf <neundorf () kde ! org>
Date:       2018-04-26 21:23:43
Message-ID: 52580760.EqS8eMovER () linux-l7nd
[Download RAW message or body]

Hi,

I stumbled upon a problem with protobuf files, I attached a testcase.
There is a MyBase.proto, which is "imported" by Complex.proto.
If MyBase.proto is modified, protoc is run again in MyBase.proto, but not on 
Complex.proto, although it should.
You can have a look at the attached example.

The message MyData (in Complex.proto) has a member MyBase b1.
If I rename the message MyBase (in MyBase.proto) e.g. to MyBaseXYZ, then the 
build fails, because Complex.pb.h was not regenerated, so it still refered to 
the now not existing class MyBase.

Is there already a solution to handle this ?

I think to do it properly, there would have to be a dependency scanning for 
proto files like there is for C/C++ headers.
Parsing at the proto-files at cmake time wouldn't be good enough (since editing 
a proto file doesn't trigger a cmake run).

Comments ?

Alex

["protodeps.tar.gz" (protodeps.tar.gz)]

@Zmo:Oat)mR"ݖj&MB-*Osoj}d	U؝r~ñ_RD,Ƿm_ʕ`K؀mʜl2M;2l(RIT \
q?1 R߀Z^ˡy\׆?W#,ž9{sm<hbg?Zo
"npMhRgVXo{mԇwN' \
s0&5Vx^	I/GIIRQ[/ \
cY6<ULaę"z{ƝA)J(42Ir_^&чlw vv{" \
iRr$*L)yVZ+1Md0)e%UHjiҶR̈}`| \
=6|ţx{q>_.kr_>sLx6<0TV_̺zyo$u[]2Ʌ"OC|cyW1=[ut٘%ZoMk: \
f=H,N4(:.edM.Ư	=ø [Zi}	uedtM  Pe,+ݢ}0>?>}{2
NƓO~'wg}ӎ@Ţ+R(Ea6eXueBwZIDQ g2''\ \
_=6,+$ngZVt|49G_=?&_}!T?0]wߖ׸]?KEu^@<dAAAAAAAAAAd|hP




-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: \
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information \
on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at \
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic