Lines Matching full:variable

382   # Set the output variable in the parent scope
409 # with a name accessible through the variable ZEPHYR_CURRENT_LIBRARY.
411 # The variable ZEPHYR_CURRENT_LIBRARY should seldom be needed since
937 # variable `ACTIVE_BOARD_REVISION` with the selected revision.
1158 key_value # Output variable
1538 # Writes 1 to the output variable 'ok' if
1560 # pow2round(<variable>)
1572 # n = Variable containing the number to round
1612 # zephyr_build_string(<out-variable>
1614 # [SHORT <out-variable>]
1620 # zephyr_build_string(<out-variable>
1626 # <out-variable>: Output variable where the build string will be returned.
1627 # SHORT <out-variable>: Output variable where the shortened build string will be returned.
1879 # CMake namespace. List all created variable names in the 'keys'
1880 # output variable if present.
1884 # <keys> : output variable which will be populated with variable
1916 # If the provided value is n, then the corresponding CMake variable or
1928 # Otherwise, the variable/property will be set to the provided value.
2143 function(set_ifndef variable value)
2144 if(NOT ${variable})
2145 set(${variable} ${value} ${ARGN} PARENT_SCOPE)
2300 # Writes 1 to the output variable 'ok' for the language 'lang' if
2629 # variable
2653 # APPLICATION_ROOT <path>: Check all paths in provided variable, and convert
2735 # The cached variable is relative path, i.e. provided by `-D<var>` or
2736 # `set(<var> CACHE)`, so let's update current scope variable to absolute
2749 # Let's check if anyone uses relative path as scoped variable, and fail
2753 "Relative path encountered in scoped variable: ${ZFILE_APPLICATION_ROOT}, value=${path}\n \
3011 # `_<suffix>` extension to them and if so, updates the supplied variable/list with the new
3014 # <filename>: Variable (singlular or list) of absolute path filename(s) which should be checked
3018 # Returns an updated variable of absolute path(s)
3025 # If the file suffix variable is not known then there is nothing to do, return early
3050 # Update supplied variable if it differs
3078 message(FATAL_ERROR "Function zephyr_string() called without a return variable")
3099 # [OUTPUT_VARIABLE <output variable])
3117 # an alternative variable to store the result
3149 # zephyr_var_name(<variable> <scope> <out>)
3151 # Internal function for construction of scoped variable name expansion string.
3153 # reading a current scope FOO variable is identical to expand ${FOO}.
3154 # reading a cache scope FOO variable is identical to expand $CACHE{FOO}.
3158 function(zephyr_var_name variable scope out)
3160 if(DEFINED ${scope}{${variable}})
3161 set(${out} "$${scope}{${variable}}" PARENT_SCOPE)
3166 if(DEFINED ${scope}_${variable})
3167 set(${out} "${${scope}_${variable}}" PARENT_SCOPE)
3175 # zephyr_get(<variable> [MERGE [REVERSE]] [SYSBUILD [LOCAL|GLOBAL]] [VAR <var1> ...])
3177 # Return the value of <variable> as local scoped variable of same name. If MERGE
3183 # VAR can be used either to store the result in a variable with a different
3196 # - BOARD is considered a global sysbuild cache variable
3197 # - blinky_BOARD is considered a local sysbuild cache variable only for the
3210 function(zephyr_get variable)
3228 set(GET_VAR_VAR ${variable})
3260 set(${variable} "")
3271 list(APPEND ${variable} ${scope_value})
3273 set(${variable} ${scope_value} PARENT_SCOPE)
3276 # Set the environment variable in CMake cache, so that a build
3278 # environment variable still being available / have identical value.
3279 set(${var} $ENV{${var}} CACHE INTERNAL "Cached environment variable ${var}")
3285 # Variable exists as current scoped variable, defined in a CMakeLists.txt
3288 message(WARNING "environment variable '${var}' is hiding local "
3289 "variable of same name.\n"
3303 list(REVERSE ${variable})
3304 list(REMOVE_DUPLICATES ${variable})
3305 list(REVERSE ${variable})
3307 list(REMOVE_DUPLICATES ${variable})
3309 set(${variable} ${${variable}} PARENT_SCOPE)
3311 endfunction(zephyr_get variable)
3334 # <result>: Variable to set with result.
3353 # <output> : Variable to store the value in
3354 # <scope> : Scope for the variable look up
3372 # zephyr_set(<variable> <value> SCOPE <scope> [APPEND])
3374 # Zephyr extension of CMake set which allows a variable to be set in a specific
3376 # handling when a variable it set in multiple scopes.
3378 # <variable> : Name of variable
3379 # <value> : Value of variable, multiple values will create a list.
3381 # SCOPE <scope>: Name of scope for the variable
3382 # APPEND : Append values to the already existing variable in <scope>
3384 function(zephyr_set variable)
3399 ${SET_VAR_SCOPE}_scope:${variable} ${SET_VAR_UNPARSED_ARGUMENTS}
3404 # zephyr_check_cache(<variable> [REQUIRED])
3406 # Check the current CMake cache for <variable> and warn the user if the value
3414 # variable: Name of <variable> to check and set, for example BOARD.
3415 # REQUIRED: Optional flag. If specified, then an unset <variable> will be
3417 # WATCH: Optional flag. If specified, watch the variable and print a warning if
3418 # the variable is later being changed.
3421 # <variable> can be set by 3 sources.
3422 # - Using CMake argument, -D<variable>
3423 # - Using an environment variable
3430 # cache as CACHED_<variable>. This allows the Zephyr build system to detect
3431 # when a user reconfigures a sticky variable.
3434 # E.g. always specifies -D<variable>= on the command line,
3435 # always has an environment <variable> set, or always has a set(<variable> foo)
3438 # The selected <variable> can be accessed through the variable '<variable>' in
3441 # If the user tries to change <variable> to a new value, then a warning will
3442 # be printed, and the previously cached value (CACHED_<variable>) will be
3446 # <variable> the build directory must be cleaned.
3448 function(zephyr_check_cache variable)
3450 string(TOLOWER ${variable} variable_text)
3453 get_property(cached_value CACHE ${variable} PROPERTY VALUE)
3456 # then CACHED_${variable} is set. The CACHED_${variable} setting takes
3461 # If user uses -D<variable>=<new_value>, then cli_argument will hold the new
3464 if(cli_argument STREQUAL CACHED_${variable})
3465 # The is no changes to the <variable> value.
3469 set(app_cmake_lists ${${variable}})
3470 if(cached_value STREQUAL ${variable})
3471 # The app build scripts did not set a default, The variable we are
3476 if(DEFINED CACHED_${variable})
3477 # Warn the user if it looks like he is trying to change the variable
3480 …if(NOT ((CACHED_${variable} STREQUAL cli_argument) OR (${variable}_DEPRECATED STREQUAL cli_argumen…
3483 "Current value=\"${CACHED_${variable}}\", "
3488 if(CACHED_${variable})
3489 set(${variable} ${CACHED_${variable}} PARENT_SCOPE)
3490 set(${variable} ${CACHED_${variable}})
3492 set(${variable} ${CACHED_${variable}} CACHE STRING "Selected ${variable_text}" FORCE)
3494 unset(${variable} PARENT_SCOPE)
3495 unset(${variable} CACHE)
3498 zephyr_get(${variable})
3501 if(${CACHE_VAR_REQUIRED} AND NOT DEFINED ${variable})
3502 message(FATAL_ERROR "${variable} is not being defined on the CMake command-line,"
3507 if(DEFINED ${variable})
3508 # Store the specified variable in parent scope and the cache
3509 set(${variable} ${${variable}} PARENT_SCOPE)
3510 set(${variable} ${${variable}} CACHE STRING "Selected ${variable_text}")
3512 set(CACHED_${variable} ${${variable}} CACHE STRING "Selected ${variable_text}")
3515 # The variable is now set to its final value.
3516 zephyr_boilerplate_watch(${variable})
3518 endfunction(zephyr_check_cache variable)
3524 # Inform the build system that SOME_BOILERPLATE_VAR, a variable
3529 # if the variable is set after it returns.
3530 function(zephyr_boilerplate_watch variable)
3531 variable_watch(${variable} zephyr_variable_set_too_late)
3534 function(zephyr_variable_set_too_late variable access value current_list_file)
3542 * CMake variable ${variable} set to \"${value}\" in:
3547 * Hint: ${variable} must be set before calling find_package(Zephyr ...).
3638 # RESULT <out-variable>)
3650 # RESULT: Output variable, where the topologically sorted list of target
3825 # <var> : Return variable where the node path will be stored
3866 # # The variable 'path' will be left undefined for a nonexistent
3871 # variable will be left undefined if the alias does not exist.
3873 # <var> : Return variable where the node path will be stored
3918 # <var> : Return variable where the check result will be returned
3962 # <var> : Return variable where the check result will be returned
4045 # <var> : Return variable where the property value will be stored
4106 # <var> : Return variable where the property value will be stored
4164 # <var> : Return variable where the property value will be stored
4208 # <var> : Return variable where the address value will be stored
4268 # <var> : Return variable where the size value will be stored
4347 # <var> : Return variable
4380 # variable will be left undefined if the chosen node does not exist.
4382 # <var> : Return variable where the node path will be stored
4410 # variable 'var'. This resolves aliases, if any. Child nodes may be
4464 # Failed search; ensure return variable is undefined.
5880 # The resulting generator expression will be stored in the variable <outvar>.