Lines Matching +full:created +full:- +full:for
1 #-------------------------------------------------------------------------------
6 # SPDX-License-Identifier: BSD-3-Clause
8 #-------------------------------------------------------------------------------
18 # WORKING_DIRECTORY - working directory where patches should be applied.
19 # PATCH_FILES - list of patches. Patches will be applied in alphabetical order.
22 # Step 1 - keep changes in stash with random message/name to detect
23 # that stash has been created by git
25 set(STASH_NAME "tfm-remote_library-apply_patches-${STASH_NAME}")
26 execute_process(COMMAND "${GIT_EXECUTABLE}" stash push -u -m "${STASH_NAME}"
31 # Step 2 - get list of stashes to validate that stash has been created
39 # Look for stash message to detect stash creation
42 # Stash is not created, most probably because there is no changes
45 # Step 3 - restore changes with git stash apply
55 # Step 4 - revert patches in reverse order
57 # Sort list of patches in descending order for validation
60 execute_process(COMMAND "${GIT_EXECUTABLE}" apply --reverse --verbose "${PATCH}"
72 # Step 5 - pop stash to restore original state
75 execute_process(COMMAND "${GIT_EXECUTABLE}" clean -df
79 execute_process(COMMAND "${GIT_EXECUTABLE}" reset --hard
83 execute_process(COMMAND "${GIT_EXECUTABLE}" stash pop --index
89 execute_process(COMMAND "${GIT_EXECUTABLE}" clean -df
93 execute_process(COMMAND "${GIT_EXECUTABLE}" reset --hard
104 set(EXECUTE_COMMAND "${GIT_EXECUTABLE}" apply --verbose ${PATCH_FILES})
119 # REPO_URL_VAR - name of variable which receives repository URL.
120 # TAG_VAR - name of variable which receives reference to commit.
137 # See https://gitlab.kitware.com/cmake/cmake/-/issues/16341 for details
140 # [in] KEY - option name
141 # [out] KEY_VAR - name of variable that is set to ${KEY} on exit if value is not
143 # [out] VALUE_VAR - name of variable that is set to option value for ${KEY}.
144 # [in/out] ARG_LIST_VAR - name of variable that holds list of key/value pairs - arguments.
145 # Function looks for key/value pair specified by ${KEY} variable in
155 # # Extract key/value for option "GIT_SUBMODULES"
166 # # Extract key/value for option "GIT_SUBMODULES"
179 message(FATAL_ERROR "Missing option value for ${KEY}")
209 # [in] LIB_NAME <name> - library name
210 # [in/out] LIB_SOURCE_PATH_VAR <var> - name of variable which holds path to library source
214 # [out] LIB_BINARY_PATH_VAR <var> - optional name of variable which is updated to
215 # directory intended for use as a corresponding build directory if
217 # [in] LIB_BASE_DIR <path> - is used to set FETCHCONTENT_BASE_DIR.
218 # [in] LIB_PATCH_DIR <path> - optional path to local folder which contains patches
220 # [in] LIB_FORCE_PATCH - optional argument to force applying patches when the path
222 # [in] GIT_REPOSITORY, GIT_TAG, ... - see https://cmake.org/cmake/help/latest/module/ExternalPr…
223 # for more details
226 # Because of https://gitlab.kitware.com/cmake/cmake/-/issues/20579 CMP0097 is
227 # non-functional until cmake 3.18.0.
228 # See https://cmake.org/cmake/help/latest/policy/CMP0097.html for more info.
244 # See https://gitlab.kitware.com/cmake/cmake/-/issues/16341 for details
251 math(EXPR EMPTY_KEY_INDEX "${EMPTY_VALUE_INDEX} - 1")
254 … message(FATAL_ERROR "fetch_remote_library: Unexpected empty string value for ${EMPTY_KEY}. "
255 …ase, validate arguments or update fetch_remote_library to support empty value for ${EMPTY_KEY}!!!")
282 # look for patch files
286 # Apply patches for existing sources