-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FileLock.cmake to serialize sub-make build for native targets
- Loading branch information
Showing
3 changed files
with
30 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# CMake script that synchronizes process execution on a given file lock. | ||
# | ||
# Input variables: | ||
# LOCK_FILE_PATH - The file to be locked for the scope of the process of this cmake script. | ||
# COMMAND - The command to be executed. | ||
|
||
file(LOCK ${LOCK_FILE_PATH}) | ||
string(REPLACE "@" ";" command_args ${COMMAND}) | ||
execute_process(COMMAND ${command_args} COMMAND_ERROR_IS_FATAL ANY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters