]> code.ossystems Code Review - openembedded-core.git/commit
cmake.bbclass: use `cmake --build` to build & install
authorCody P Schafer <dev@codyps.com>
Thu, 4 May 2017 17:50:42 +0000 (13:50 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 23 May 2017 16:43:58 +0000 (17:43 +0100)
commit2b06cb961edbe52ff66e8edccd007edd0795c30b
tree00465c67b3a280befbb90b28cc02fb66676ec226
parent59921b3ce23fe0d391558425f7a5ade45cbcbd80
cmake.bbclass: use `cmake --build` to build & install

Rather than presuming `make` is the generator, use cmake's generic
`cmake --build` feature (which knows to call the appropriate generator).

Both DESTDIR and VERBOSE still behave as intended when used as
environment variables instead of make variable-arguments.

As cmake-based builds don't do any configuration with `make`
invocations, we only pass `PARALLEL_MAKE{,INST}` (via a
EXTRA_OECMAKE_BUILD variable) to the underlying build tool. Make &
ninja support the same `-j N` option (and a few others), so this does
happen to work for both.

This makes it more straight forward for others to select other cmake
generators (many folks have been reaching for `ninja` lately).

CC: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Cody P Schafer <dev@codyps.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/classes/cmake.bbclass