[OE-core] [PATCH] cmake.bbclass: use `cmake --build` to build & install

Cody P Schafer dev at codyps.com
Tue May 2 19:07:54 UTC 2017


On Tue, May 2, 2017 at 12:49 PM, Andre McCurdy <armccurdy at gmail.com> wrote:
> On Tue, May 2, 2017 at 8:49 AM, Cody P Schafer <dev at codyps.com> wrote:
>>>>  do_compile[progress] = "percent"
>>>>  cmake_do_compile()  {
>>>> -       cd ${B}
>>>
>>> Removing the redundant "cd ${B}" should perhaps be a separate commit?
>>
>> I'm not really seeing that as useful, change right now can be viewed
>> as "moves the ${B} from being in `cd` to being part of the command
>> line for `cmake --build`". Is fairly straight forward because cmake
>> requires a path be specified (where `make` makes it optional).
>
> If ${B} is the default directory for both these tasks then "cd ${B}"
> is redundant and can be removed. If it is not the default directory,
> then removing it will potentially break do_compile_append() and
> do_install_append() functions which rely on running in ${B}. That
> logic doesn't depend on whether or not "cmake --build" takes care of
> changing directory on it's own, so if "cd ${B}" is redundant, then
> removing it should be standalone commit.

    meta/classes/base.bbclass
    307:do_configure[dirs] = "${B}"
    326:do_compile[dirs] = "${B}"

${B} is the default dir for do_compile & do_configure.

Are we concerned about prepend scripts changing the directory to
something not-${B} & appends implicitly relying on ${B} being the
directory?

It seems that prepends/appends should avoid changing directories &/or
avoid depending on a specific directory. Many (but not all) of the
appends I've seen are pretty explicitly about the dirs they need
(Using ${B}, ${S}, and ${WORKDIR} as needed instead of assuming the
dir). Is there a policy on what the right thing to do is w.r.t. cwd
changes within tasks & specifically within appends/prepends to tasks?



More information about the Openembedded-core mailing list