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

Cody P Schafer dev at codyps.com
Tue May 2 15:49:15 UTC 2017


>>  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).

>
>> -       base_do_compile VERBOSE=1
>> +       VERBOSE=1 cmake --build '${B}'
>
> This looks like it will cause parallel make and EXTRA_OEMAKE options
> to be ignored?

That is a good point. I don't think EXTRA_OEMAKE should matter here
too much as configuration for cmake-based builds all is read at
configure time, but the ${PARALLEL_MAKE} flag is definitely an issue.

Doing this could work:

    VERBOSE=1 cmake --build '${B}' -- ${EXTRA_OEMAKE}

(And similar for install)

And for the case of `-jN` like flags, make & ninja happen to be
compatible (they share a few other flags, like `-l` and `-n`.

Another alternative is passing ${PARALLEL_MAKE} (and
${PARALLEL_MAKEINST}) instead of directly using ${EXTRA_OEMAKE}.

Also: I took a look at what else `run_oemake` is doing, and it
contains some output printing (`bbnote`s the make command & `die`s on
make failure), which could be added directly around the `cmake
--build` invocations instead.



More information about the Openembedded-core mailing list