All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Khem Raj" <raj.khem@gmail.com>
To: "Robert P. J. Day" <rpjday@crashcourse.ca>
Cc: OE Core mailing list <openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core] any reason for "cmake_" prefix on cmake_runcmake_build()?
Date: Wed, 10 Mar 2021 08:35:39 -0800	[thread overview]
Message-ID: <CAMKF1soLYJS7Gn8f6mYxhnesv5uXd2uA+NLZ=bNoixFdLMypRQ@mail.gmail.com> (raw)
In-Reply-To: <ed7fc1ff-d861-a0b9-e749-627193f3db66@crashcourse.ca>

[-- Attachment #1: Type: text/plain, Size: 1803 bytes --]

On Wed, Mar 10, 2021 at 3:38 AM Robert P. J. Day <rpjday@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
>

[-- Attachment #2: Type: text/html, Size: 2521 bytes --]

  reply	other threads:[~2021-03-10 16:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-08 11:22 any reason for "cmake_" prefix on cmake_runcmake_build()? Robert P. J. Day
2021-03-08 18:37 ` [OE-core] " Khem Raj
2021-03-10 11:38   ` Robert P. J. Day
2021-03-10 16:35     ` Khem Raj [this message]
2021-03-10 21:27     ` Richard Purdie
2021-03-11  9:15       ` Robert P. J. Day

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAMKF1soLYJS7Gn8f6mYxhnesv5uXd2uA+NLZ=bNoixFdLMypRQ@mail.gmail.com' \
    --to=raj.khem@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=rpjday@crashcourse.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.