On Wed, Mar 10, 2021 at 3:38 AM Robert P. J. Day <rpj...@crashcourse.ca> wrote:
> On Mon, 8 Mar 2021, Khem Raj wrote: > > > > > > > On 3/8/21 3:22 AM, Robert P. J. Day wrote: > > > > > > collecting some examples of inheritance of class functions using > > > EXPORT_FUNCTIONS, and ran across this routine in cmake.bbclass: > > > > > > ... snip ... > > > cmake_runcmake_build() { > > > bbnote ... > > > eval ... > > > } > > > > > > cmake_do_compile() { > > > cmake_runcmake_build --target ${OECMAKE_TARGET_COMPILE} > > > } > > > ... snip ... > > > > > > what puzzles me is that the routine cmake_runcmake_build(), despite > > > having a "cmake_" prefix, is not being exported with EXPORT_FUNCTIONS, > > > so while that's a perfectly respectable function, it's not clear why > > > it would have a "cmake_" prefix. is there some value to that prefix, > > > or is it just arbitrary? > > > > it does not intend to provide a default function like do_compile > do_install > > exporting it is not necessary > > no, that part i understand ... the nitpicky observation was the use > of the "cmake_" prefix for a function which was not intended to be > exported for the purpose of inheritance. sure, it's perfectly legal, > but in a stylistic sense, it just leaves open the possibility of > misinterpretation by someone reading the code. > > a simpler style rule might be, "reserve classname_ prefixes for only > those routines you plan on exporting." but i admit this is a quibble. This is more towards code styling issue and we have not really bothered to define such namespaces they cause more confusion than the problem they solve since such things should be checked by linters other wise they fall apart > > > rday >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#149239): https://lists.openembedded.org/g/openembedded-core/message/149239 Mute This Topic: https://lists.openembedded.org/mt/81171462/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-