zephyr/cmake/modules
Kesavan Yogeswaran d5fc087690 cmake: Fix warning if a Zephyr library is created in app-mode
zephyr_append_cmake_library attempts to warn the user if a user calls it
to create a Zephyr library while the build is in application mode. At
that stage of the build, the list of Zephyr libraries has already been
processed so the function is effectively a no-op.

This heuristic used to determine if the build was in kernel mode or
application mode checked for the presence of the zephyr_prebuilt target.
This check was broken by a previous commit that renamed this target.

This commit fixes the heuristic by checking for the zephyr_pre0 target.

This was tested by calling zephyr_append_cmake_library from some
application build files, building the application, and seeing the
warning only for the call I added. No warnings were printed for any
Zephyr internal libraries.

Link: https://github.com/zephyrproject-rtos/zephyr/pull/35887
Link: https://github.com/zephyrproject-rtos/zephyr/pull/39959

Signed-off-by: Kesavan Yogeswaran <hikes@google.com>
2025-06-09 15:02:01 -07:00
..
arch.cmake infrastructure: Remove hwmv1 support 2025-03-13 16:53:07 +00:00
basic_settings.cmake sysbuild: Use UTF-8 encoding for cache 2024-06-13 05:31:50 -04:00
boards.cmake infrastructure: Remove hwmv1 support 2025-03-13 16:53:07 +00:00
ccache.cmake
configuration_files.cmake cmake: Remove build type 2025-01-30 16:19:57 +01:00
doc.cmake cmake: doc: created a doc.cmake CMake module in Zephyr CMake modules dir 2022-02-22 10:02:39 -08:00
dts.cmake cmake: modules: Add zephyr_dt_import 2025-05-22 13:44:18 +02:00
extensions.cmake cmake: Fix warning if a Zephyr library is created in app-mode 2025-06-09 15:02:01 -07:00
Findarmclang.cmake cmake: armclang version detection 2023-09-13 16:23:30 +02:00
FindBabbleSim.cmake nrf5_bsim cmake: Check that the simulator version is new enough 2024-03-19 21:18:13 -05:00
FindDeprecated.cmake cmake: Remove previously deprecated look-ups 2025-03-24 07:53:31 +01:00
FindDtc.cmake cmake: cleanup search for devicetree compiler, dtc 2022-09-01 15:59:43 +02:00
FindGnuLd.cmake cmake: modules/FindGnuLd: support an additional obselete version format 2025-01-27 13:24:52 +01:00
FindHostTools.cmake cmake: Remove previously deprecated look-ups 2025-03-24 07:53:31 +01:00
FindLlvmLld.cmake cmake: Fix FindLlvmLld usage of unimported package 2023-06-26 12:40:03 +00:00
FindoneApi.cmake cmake: Fix FindLlvmLld usage of unimported package 2023-06-26 12:40:03 +00:00
FindScaTools.cmake cmake: implement build infrastructure for supporting SCA tools. 2023-01-27 20:28:58 +09:00
FindTargetTools.cmake cmake: improve Zephyr link phase 2024-10-04 16:34:35 +01:00
FindThreads.cmake cmake: modules: fix FindThreads use of deprecated PTHREAD config 2024-06-20 17:03:57 -04:00
FindZephyr-sdk.cmake cmake: support range for find_package(Zephyr-sdk) 2024-10-24 14:06:45 +02:00
generated_file_directories.cmake build: namespace the generated headers with zephyr/ 2024-05-28 22:03:55 +02:00
git.cmake cmake: Create git module 2024-09-12 10:04:05 +02:00
hwm_v2.cmake cmake: scripts: support SoC extension 2024-10-26 17:14:06 +02:00
kconfig.cmake cmake: kconfig: auto-generate boolean board revision option 2025-05-16 16:11:48 +02:00
kernel.cmake CMake: Add support for .mot binary file format 2025-05-02 09:18:16 +02:00
pre_dt.cmake dts: Move vendor-specific dtsi to dedicated folder 2025-04-29 13:00:03 +02:00
python.cmake cmake: Remove previously deprecated look-ups 2025-03-24 07:53:31 +01:00
root.cmake sysbuild: Add support for snippets 2024-12-27 07:18:13 +01:00
shields.cmake shields: scripts: cmake: use list_shields.py in shields.cmake 2025-05-23 17:19:58 +02:00
snippets.cmake cmake: snippets: Add snippet help message 2025-02-13 16:43:20 +01:00
soc.cmake infrastructure: Remove hwmv1 support 2025-03-13 16:53:07 +00:00
unittest.cmake cmake: clean up gen_kobject_list.py invocations 2025-05-07 15:10:05 +02:00
user_cache.cmake cmake: Fix USER_CACHE_DIR path generation 2023-05-10 15:27:54 +02:00
version.cmake cmake: Added "-" support to EXTRAVERSION 2025-01-21 15:13:36 +01:00
west.cmake cmake: cleanup old west version support 2023-08-24 10:47:00 +02:00
yaml.cmake yaml: save intermediate files in the build directory 2025-05-08 19:46:18 +02:00
zephyr_default.cmake infrastructure: Remove hwmv1 support 2025-03-13 16:53:07 +00:00
zephyr_module.cmake cmake: fix Zephyr module ext order 2025-04-03 13:16:56 +02:00