openwrt-mirror/include
Eneas U de Queiroz e495645135
cmake: set CMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER
According to CMake documentation[1]:

  [CMAKE_FIND_ROOT_PATH] is a list of directories that contain the
  target environment.

  [CMAKE_FIND_ROOT_PATH_MODE_PROGRAM] sets the default behavior for the
  find_program command.

  In most cases, find_program is used to search for an executable which
  will then be executed, e.g. using execute_process or
  add_custom_command. So in most cases an executable from the build host
  is required, so setting CMAKE_FIND_ROOT_PATH_MODE_PROGRAM to NEVER is
  normally preferred.

Since CMAKE_FIND_ROOT_PATH is set to the target staging dir, and the
toolchain root dir, it will find target programs before the host ones.

An example of this problem is if you try to build antiblock from the
packages feed after llvm from the video feeds is built.  Antiblock will
search for clang-format, pickup the target version, and fail to build.

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>

[1] https://cmake.org/cmake/help/book/mastering-cmake/chapter/Cross%20Compiling%20With%20CMake.html
Link: https://github.com/openwrt/openwrt/pull/20656

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2025-11-05 16:57:51 +01:00
..
site build: remove ac_cv_header_netinet_sctp_h=no from pre-cached variables 2024-09-22 16:04:09 +02:00
autotools.mk include: autotools: do not symlink files in autoreconf 2024-08-29 20:04:02 +02:00
bpf.mk build: bpf: fix LLVM tool paths with host toolchain 2025-04-09 09:52:21 +02:00
cmake.mk cmake: set CMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER 2025-11-05 16:57:51 +01:00
debug.mk build: use SPDX license tags 2021-02-05 14:54:47 +01:00
default-packages.mk imagebuilder: move handling of DEFAULT_PACKAGES into shareable place 2024-11-17 19:29:06 +01:00
depends.mk build: make find_md5 reproducible with AUTOREMOVE 2022-09-30 22:26:51 +02:00
device_table.txt image: ensure that /dev/console exist in rootfs images 2013-08-27 12:02:58 +00:00
download.mk build: parsing "git log" breaks with gpg signature verification 2025-09-23 21:49:54 +02:00
feeds.mk build: fix ipkg-remove: add support for removing apk files 2025-07-15 20:48:45 +02:00
hardened-ld-pie.specs build: add hardened builds with PIE (ASLR) support 2018-01-27 16:46:45 +01:00
hardening.mk build: Add _FORTIFY_SOURCE=3 support 2025-10-26 01:43:01 +02:00
host-build.mk build: add support for host building in a subdirectory 2024-07-27 20:32:20 +02:00
image-commands.mk image: move mkits.sh outside lock section 2025-10-23 18:14:01 +02:00
image.mk build: remove iwinfo dependency 2025-09-27 22:04:57 +02:00
kernel-build.mk kernel-build.mk: Fix multi-core build warning. 2024-10-06 13:49:39 +02:00
kernel-defaults.mk kernel: fix rootfs initramfs not updating on subsequent single build 2025-01-20 17:22:06 +01:00
kernel-version.mk kernel: move kernel version files to linux/generic directory 2025-04-22 19:22:44 +02:00
kernel.mk loongarch64: new target 2024-05-04 14:14:16 +08:00
logo.png include: update logo with better kerning 2021-01-18 09:31:39 -10:00
logo.svg include: update logo with better kerning 2021-01-18 09:31:39 -10:00
meson.mk meson: allow using staging python 2024-12-02 19:30:22 +00:00
netfilter.mk iptables: update to 1.8.10 2024-10-22 00:52:03 +02:00
nls.mk nls.mk: fixup cmake packages 2022-11-27 00:52:06 +01:00
openssl-module.mk openssl: add legacy provider 2023-04-05 08:24:49 -03:00
optee-os.mk optee-os.mk: override default PATH to not use hostpkg python 2025-03-15 13:43:14 +01:00
package-bin.mk build: allow package to be built for all variants 2021-11-15 00:38:46 +01:00
package-defaults.mk build: handle --root feeds script feature 2025-10-20 13:50:15 +02:00
package-dumpinfo.mk build: remove duplicate MAINTAINER from package-dumpinfo.mk 2024-05-07 22:24:10 +02:00
package-pack.mk package: do not sign individual APK packages 2025-10-09 12:52:43 +02:00
package-seccomp.mk build: use SPDX license tags 2021-02-05 14:54:47 +01:00
package.mk build: handle --root feeds script feature 2025-10-20 13:50:15 +02:00
prereq-build.mk prereq: use staging_dir's compiler 2025-10-20 00:55:06 +02:00
prereq.mk prereq: use staging_dir's compiler 2025-10-20 00:55:06 +02:00
quilt.mk quilt.mk: don't error on refresh/update if patches doesn't exist 2023-10-06 21:59:29 +02:00
rootfs.mk imagebuilder: fix APK for packages dir and cache 2024-11-09 16:46:35 +01:00
scan.awk build: propagate override information to .packageinfo 2015-02-09 12:09:31 +00:00
scan.mk scan.mk: do not silence output of dump phase 2023-11-13 14:01:24 +01:00
shell.sh build: use mkhash to replace various quirky md5sum/openssl calls 2017-01-05 11:09:12 +01:00
subdir.mk kernel-build.mk: add support for compiling only DTS 2024-02-08 19:57:28 +01:00
target.mk build: remove iwinfo dependency 2025-09-27 22:04:57 +02:00
toolchain-build.mk toolchain: fix dangling symlink to self in FixupLibdir 2022-07-01 19:17:36 +02:00
toplevel.mk build: remove targetinfo invalidation based on .config 2024-12-02 12:28:52 +01:00
trusted-firmware-a.mk include/trusted-firmware-a.mk: support LTS releases 2025-04-06 14:21:07 +03:00
u-boot.mk u-boot.mk: support Python 3.12 and 3.13 2025-07-01 20:07:46 +03:00
uclibc++.mk uclibc++: remove 2021-10-24 18:20:50 +02:00
unpack.mk include: use libdeflate's gzip to decompress 2023-01-17 21:40:18 +01:00
verbose.mk verbose.mk: fallback to standard file descriptors 2024-01-05 16:25:14 +01:00
version.mk build: lock versions for special APK packages 2025-02-04 13:48:59 +00:00