<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/meta/classes/cmake.bbclass, branch uninative-2.10</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=uninative-2.10</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=uninative-2.10'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2020-08-10T17:14:59+00:00</updated>
<entry>
<title>cmake.bbclass: Rework compiler program variables for allarch</title>
<updated>2020-08-10T17:14:59+00:00</updated>
<author>
<name>Nathan Rossi</name>
<email>nathan@nathanrossi.com</email>
</author>
<published>2020-08-08T12:08:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=9e2c0e57df29122272e28834148ca7956c396e3e'/>
<id>urn:sha1:9e2c0e57df29122272e28834148ca7956c396e3e</id>
<content type='text'>
CMake projects can specify the NONE project type. Projects that do this
do not use any C or C++ compiler, this currently works fine with caveat
that when changing the machine/arch the compiler is different causing
signature hash differences.

To avoid the signature hash differences clear the associated C/CXX
compiler variables. In order to achieve this with overrides, simplify
the existing construction of the values using a python function and
variable setting and remove the anonymous variable setup.

(From OE-Core rev: e0657ff13453deedbdcf7c2f8a8854f601c659bd)

Signed-off-by: Nathan Rossi &lt;nathan@nathanrossi.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/cmake: Fix host detection</title>
<updated>2020-07-22T11:45:56+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>JPEWhacker@gmail.com</email>
</author>
<published>2020-07-21T17:52:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=3afe7395eedc02aa8f680f606e6bd4b6e57eade8'/>
<id>urn:sha1:3afe7395eedc02aa8f680f606e6bd4b6e57eade8</id>
<content type='text'>
Fixes the class to use HOST_OS and HOST_ARCH to set the cmake SYSTEM
variables. The HOST variables should be used instead of
TARGET_OS/TARGET_ARCH because we want to control how cmake compiles for
where the package is going to run (the host), not what it will be
generating output for (the target). The distinction is only really
relevant when building canadian cross recipes.

Also fix up the host OS detection to account for MinGW by setting
CMAKE_SYSTEM_NAME to "Windows". This eliminates the need for meta-mingw
to patch this in all the cmake recipes it builds.

(From OE-Core rev: 01245db2893e39ffb5d4a00e4689f048d0698974)

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cmake: fix Python executable with cmake</title>
<updated>2020-04-05T10:46:38+00:00</updated>
<author>
<name>Martin Kelly</name>
<email>mkelly@xevo.com</email>
</author>
<published>2020-04-02T20:56:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=1b15cc6e65c18cda7888a2eef1f55bf0a660ae7e'/>
<id>urn:sha1:1b15cc6e65c18cda7888a2eef1f55bf0a660ae7e</id>
<content type='text'>
Currently, CMake has two ways of finding Python executables:
FindPythonInterp and FindPython/FindPython3. FindPythonInterp is
deprecated and may be removed at some point. Currently, python3native
sets PYTHON_EXECUTABLE, which FindPythonInterp uses. This is a problem
for a few reasons:

- Setting PYTHON_EXECUTABLE as an environment variable doesn't work, as
  CMake needs it to be set as an explicit CMake option via -D.
- Projects using the newer FindPython/FindPython3 don't pickup the right
  Python, as the newer routines use Python_EXECUTABLE and
  Python3_EXECUTABLE.

Fix this by setting PYTHON_EXECUTABLE, Python_EXECUTABLE, and
Python3_EXECUTABLE using -D options to EXTRA_OECMAKE.

The CMake routines are documented below:
https://cmake.org/cmake/help/latest/module/FindPythonInterp.html
https://cmake.org/cmake/help/latest/module/FindPython.html
https://cmake.org/cmake/help/latest/module/FindPython3.html

(From OE-Core rev: a22200a646eaf42cd4902a2fe3358d29717ac129)

Signed-off-by: Martin Kelly &lt;mkelly@xevo.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cmake: prefer CMAKE_BUILD_PARALLEL_LEVEL</title>
<updated>2020-02-04T15:56:29+00:00</updated>
<author>
<name>Daniel McGregor</name>
<email>daniel.mcgregor@vecima.com</email>
</author>
<published>2020-01-23T21:44:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=a26efa2875e99ae9abf68dffe7bd988c3fd8598a'/>
<id>urn:sha1:a26efa2875e99ae9abf68dffe7bd988c3fd8598a</id>
<content type='text'>
cmake 3.12 introduced this environment variable. Prefer it to passing
PARALLEL_MAKE and PARALLEL_MAKEINST on the cmake command line, because
it gets passed to second stage cmake invocations while command-line
arguments do not (for example, multi-stage clang builds)

(From OE-Core rev: cdd44c93f02bb8cc2fa773e13c8ce36e3da23921)

Signed-off-by: Daniel McGregor &lt;daniel.mcgregor@vecima.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cmake.bbclass: Define LIB_SUFFIX</title>
<updated>2019-12-30T23:39:09+00:00</updated>
<author>
<name>Khem Raj</name>
<email>raj.khem@gmail.com</email>
</author>
<published>2019-12-29T18:44:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c6d9f9342260de64b2c2fcd32cb12e8bdcee3c96'/>
<id>urn:sha1:c6d9f9342260de64b2c2fcd32cb12e8bdcee3c96</id>
<content type='text'>
This variable is used in lot of cmake based packages to denote libdir in
multilib environments, now a days there is a better way to include
GNUInstallDirs module but thats upto these packages to adopt. Defining
this helps compiling a bunch of recipes in extended layers when using
multilibbed builds.

(From OE-Core rev: 24f630ce36e803c54ad6cff00215abd0e7b77b77)

Signed-off-by: Khem Raj &lt;raj.khem@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cmake: Add a knob for cmake VERBOSE settings</title>
<updated>2019-12-30T08:47:13+00:00</updated>
<author>
<name>Khem Raj</name>
<email>raj.khem@gmail.com</email>
</author>
<published>2019-12-28T07:56:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d54ccf9f89be67acd57126ec732e1d3831c2614d'/>
<id>urn:sha1:d54ccf9f89be67acd57126ec732e1d3831c2614d</id>
<content type='text'>
Setting VERBOSE always, while is fine on one hand for debugging, its
coming at an expense of creating lots and lots of logs, e.g. qtwebkit
compile logs alone with VERBOSE is 163MB, there are many other large
packages which use cmake e.g. WPE, webkitgtk etc which are in same range
with out this option on, the logs reduce to 861K and also speeds up
build a notch

If user needs to disable these logs for a recipe or globally

CMAKE_VERBOSE = ""

in recipe or in global metadata e.g. local.conf

(From OE-Core rev: f8d2cd0025f97819898da26041f353d527a27952)

Signed-off-by: Khem Raj &lt;raj.khem@gmail.com&gt;
Cc: Ross Burton &lt;ross.burton@intel.com&gt;
Cc: Andre McCurdy &lt;armccurdy@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>classes/cmake: Use relative RPATHs</title>
<updated>2019-11-27T13:25:18+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>jpewhacker@gmail.com</email>
</author>
<published>2019-11-21T16:59:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=9582fec24abac64ce691ee482de6a4816fff6dc0'/>
<id>urn:sha1:9582fec24abac64ce691ee482de6a4816fff6dc0</id>
<content type='text'>
In most cases, the RPATH is stripped out when the ELF file is packages,
but by then the damage is done from a reproducible perspective because
this absolute path is hashed as part of the build-id generated at link
time ([1] has a good explanation). Fortunately, newer cmake has an
option to generated relative RPATHs that use $ORIGIN to set the path, so
set it in the toolchain file.

[1]: https://gitlab.kitware.com/cmake/cmake/issues/18413

(From OE-Core rev: 44e77d3f97af4cd4ad8bc0984f093a116a830986)

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cmake.bbclass: add HOSTTOOLS_DIR to CMAKE_FIND_ROOT_PATH</title>
<updated>2019-10-23T15:30:35+00:00</updated>
<author>
<name>Michael Ho</name>
<email>Michael.Ho@bmw.de</email>
</author>
<published>2019-08-14T15:05:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=dbba06d9153ae588c9496b40e5db18b3602bfad1'/>
<id>urn:sha1:dbba06d9153ae588c9496b40e5db18b3602bfad1</id>
<content type='text'>
The find_program command will fail if it is used on a tool that is listed in
ASSUME_PROVIDED. This is because these tools are in the hosttools directory
which is not listed in CMAKE_FIND_ROOT_PATH so cmake will not find them.

Adding the directory HOSTTOOLS_DIR to the CMAKE_FIND_ROOT_PATH variable fixes
the initial issue of needing to search for tools in ASSUME_PROVIDED.

Note that this change alone does not fix the issue because find_program will
by default only look into the subdirectories bin and usr/bin under the paths
in CMAKE_FIND_ROOT_PATH to find the programs and the hosttools directory has
instead the symlinks directly present without these subdirectories.

Set CMAKE_PROGRAM_PATH to by default include the root directory so
find_program can search the hosttools directory without needing the prefix
directories.

(From OE-Core rev: 7847f431cd8db59fce8c9401a603c4b0678ee16d)

Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cmake: Clarify comment in cmake toolchain file</title>
<updated>2019-06-20T12:14:22+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2019-06-20T10:15:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=70b6880c550c0a9c5ee36ac3c4d7884a17683843'/>
<id>urn:sha1:70b6880c550c0a9c5ee36ac3c4d7884a17683843</id>
<content type='text'>
The comment is misleading and there was confusion in a bug report. In the native
case STAGING_DATADIR would be equal to the native value so there isn't any issue
but tweak the comment.

[YOCTO #12761]

(From OE-Core rev: 0fdf76305a3cb543c23d6122c523ce5c2af04a0c)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cmake: Avoid passing empty prefix to os.path.relpath</title>
<updated>2019-06-12T09:54:40+00:00</updated>
<author>
<name>Mike Crowe</name>
<email>mac@mcrowe.com</email>
</author>
<published>2017-11-12T16:39:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=03830e2eb94bd49caa25a056d85a2068f5a63c13'/>
<id>urn:sha1:03830e2eb94bd49caa25a056d85a2068f5a63c13</id>
<content type='text'>
With meta-micro, ${prefix} is the empty string. This means that
CMAKE_INSTALL_BINDIR:PATH and friends end up containing paths starting with
many instances of "../", presumably due to os.path.relpath attempting to
find its way to the current directory.

Let's avoid this by ensuring that the root path always ends in a slash. If
it already ends in a slash then adding another one shouldn't cause any
problems.

(From OE-Core rev: 67b19414c1c17f71f39c971b9f9fdd1f776516a1)

Signed-off-by: Mike Crowe &lt;mac@mcrowe.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
