]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
cmake.bbclass: do not search host paths for find_program()
authorChen Qi <Qi.Chen@windriver.com>
Thu, 1 Jun 2023 14:47:38 +0000 (07:47 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 2 Jun 2023 13:41:47 +0000 (14:41 +0100)
commitf4ea12f6635125ee793f4dd801c538c0186f9dc3
tree7be83582515cab18a53dc4994f02a32e778732a7
parent3ded8b83cebb6d2b9f9da1c0325148f8da4ed23b
cmake.bbclass: do not search host paths for find_program()

OECMAKE_FIND_ROOT_PATH_MODE_PROGRAM[1] controls the search
behavior of find_program(). When this variable's value was
first used in OE, it was deliberately set to BOTH to allow
searching of host tools. This is to ensure the necessary tools
from host could be used. The downside is that the configure
behavior may differ on different host environments.

Later, this cmake.bbclass was added the ability to search tools
under the HOSTTOOLS_DIR. This means we no longer needs cmake to
search the host paths. So we remove the class-native setting of
BOTH.

[1] https://cmake.org/cmake/help/latest/variable/CMAKE_FIND_ROOT_PATH_MODE_PROGRAM.html

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/cmake.bbclass