Lines Matching +full:sysbuild +full:- +full:cmake
1 # Copyright (c) 2021-2023 Nordic Semiconductor
3 # SPDX-License-Identifier: Apache-2.0
11 # All CMake cache variables are stored in a custom target which is identified by
23 file(STRINGS "${LOAD_CACHE_BINARY_DIR}/CMakeCache.txt" cache_strings ENCODING UTF-8)
25 # Using a regex for matching whole 'VAR_NAME:TYPE=VALUE' will strip semi-colons
29 # This method ensures that both quoted values and ;-separated list stays intact.
33 string(SUBSTRING "${str}" ${variable_identifier_length} -1 variable_value)
47 # sysbuild_get(<variable> IMAGE <image> [VAR <image-variable>] <KCONFIG|CACHE>)
70 # <variable>: variable used for returning CMake cache value. Also used as lookup
73 # VAR: name of the CMake cache variable name to lookup.
75 # CACHE: Flag indicating that a CMake cache variable should be fetched.
86 "Please use sysbuild_get(<variable> ... VAR <image-variable>) "
113 # This function works on the sysbuild cache for sysbuild managed applications.
116 # CREATE : Create or update existing sysbuild cache file for the application.
117 # The sysbuild cache is only updated if it contain changes.
119 # CMAKE_RERUN : Force a CMake rerun for the application during next build
120 # invocation if the sysbuild cache has changed. It is
123 # guaranteed to be up-to-date.
136 # being emitted due to a cmake bug: https://gitlab.kitware.com/cmake/cmake/-/issues/24555
139 # We don't want to pass internal CMake variables.
140 # Required CMake variable to be passed, like CMAKE_BUILD_TYPE must be
141 # passed using `-D` on command invocation.
161 # The sysbuild BOARD is exported through sysbuild cache, and will be used
171 execute_process(COMMAND ${CMAKE_COMMAND} -E compare_files
209 # and where user defined settings should be passed on as-is
211 # For example, -DCONF_FILES=<files> will be passed on to the
214 # BUILD_ONLY <bool>: Mark the application as build-only. If <bool> evaluates to
261 set(sysbuild_image_conf_dir ${APP_DIR}/sysbuild)
262 set(sysbuild_image_name_conf_dir ${APP_DIR}/sysbuild/${ZBUILD_APPLICATION})
263 # User defined `-D<image>_CONF_FILE=<file.conf>` takes precedence over anything else.
267 CACHE INTERNAL "Application configuration dir controlled by sysbuild"
271 # Check for sysbuild related configuration fragments.
301 …set(${ZBUILD_APPLICATION}_${type}_ROOT ${abs_path} CACHE PATH "Sysbuild adjusted absolute path" FO…
305 # CMake variables which must be known by all Zephyr CMake build systems
306 # Those are settings which controls the build and must be known to CMake at
307 # invocation time, and thus cannot be passed though the sysbuild cache file.
321 "-D${shared_var}:${var_type}=$CACHE{${ZBUILD_APPLICATION}_${shared_var}}"
326 "-D${shared_var}:${var_type}=$CACHE{${shared_var}}"
350 set(image_extra_kconfig_targets "-DEXTRA_KCONFIG_TARGETS=$CACHE{EXTRA_KCONFIG_TARGETS}")
354 … -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_${target}=$CACHE{EXTRA_KCONFIG_TARGET_COMMAND_FOR_${target}}
366 CMAKE_ARGS -DSYSBUILD:BOOL=True
367 -DSYSBUILD_CACHE:FILEPATH=${sysbuild_cache_file}
370 BUILD_COMMAND ${CMAKE_COMMAND} --build .
377 "# sysbuild controlled configuration settings\n"
387 set(image_default "${CMAKE_SOURCE_DIR}/image_configurations/ALL_image_default.cmake")
390 …ND image_default "${CMAKE_SOURCE_DIR}/image_configurations/${ZBUILD_APP_TYPE}_image_default.cmake")
397 # The sysbuild BOARD is exported through sysbuild cache, and will be used
435 # This function invokes the CMake configure step on an external Zephyr project
475 set(image_banner "* Running CMake for ${ZCMAKE_APPLICATION} *")
496 set(dotconfigsysbuild ${BINARY_DIR}/zephyr/.config.sysbuild)
504 -G${CMAKE_GENERATOR}
506 -DFORCED_CONF_FILE:FILEPATH=${dotconfigsysbuild}
507 -B${BINARY_DIR}
508 -S${SOURCE_DIR}
515 "CMake configure failed for Zephyr project: ${ZCMAKE_APPLICATION}\n"
522 # This custom target informs CMake how the BYPRODUCTS are generated if a target
526 COMMAND ${CMAKE_COMMAND} -E true
535 # This function invokes the sysbuild hook provided as <hook> for <modules>.
543 # PRE_CMAKE : Invoke pre-CMake call for modules before CMake configure is invoked for images
544 # POST_CMAKE : Invoke post-CMake call for modules after CMake configure has been invoked for
545 # PRE_IMAGE_CMAKE : Invoke pre-CMake call for modules before CMake configure is invoked for each
547 # POST_IMAGE_CMAKE: Invoke post-CMake call for modules after CMake configure has been invoked for
549 # PRE_DOMAINS : Invoke pre-domains call for modules before creating domains yaml
550 # POST_DOMAINS : Invoke post-domains call for modules after creation of domains yaml
591 # This function will set the specified value of the sysbuild cache variable in
602 # <variable>: Name of variable in CMake cache.
635 # when cmake is reran.
672 # recursive processing of the sysbuild images added via <source_dir>.
675 # and include() its sysbuild.cmake file (if found). If more images get added at
676 # this stage, their sysbuild.cmake files will be included as well, and so on.
702 include(${SOURCE_DIR}/sysbuild.cmake OPTIONAL)
708 # sysbuild_add_dependencies(<CONFIGURE | FLASH> <image> [<image-dependency> ...])
711 # flashing order. Each image named "<image-dependency>" will be ordered before
714 # CONFIGURE: Add CMake configuration dependencies. This will determine the order