Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
sft
lcgcmake
Commits
f991114c
Commit
f991114c
authored
Dec 09, 2019
by
Pere Mato Vila
Browse files
Changed the way to set a file lock to update concurrently buuild summary
parent
69992571
Pipeline
#1284347
passed with stage
in 5 minutes and 10 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
cmake/modules/lcgsoft-macros.cmake
View file @
f991114c
...
...
@@ -290,10 +290,12 @@ macro(LCGPackage_Add name)
COMMAND
${
CMAKE_COMMAND
}
-E touch
${
CMAKE_BINARY_DIR
}
/timestamps/
${
targetname
}
-start.timestamp
COMMAND
${
CMAKE_COMMAND
}
-E touch
${
CMAKE_BINARY_DIR
}
/timestamps/
${
targetname
}
-stop.timestamp
COMMAND
${
CMAKE_COMMAND
}
-E remove
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
tarname
}
COMMAND
${
LOCKFILE
}
-l 1200
${
CMAKE_BINARY_DIR
}
/summary.lock
COMMAND
${
CMAKE_COMMAND
}
-DNAME=
${
name
}
-DSUMFILE=
${
CMAKE_BINARY_DIR
}
/LCG_
${
LCG_VERSION
}
_
${
LCG_system
}
.txt
-DINSTALLDIR=
${
CMAKE_INSTALL_PREFIX
}
/
${
install_path
}
-P
${
CMAKE_SOURCE_DIR
}
/cmake/scripts/UpdateSummaryFile.cmake
COMMAND
${
LOCKFILE
}
--unlock
${
CMAKE_BINARY_DIR
}
/summary.lock
COMMENT
"
${
targetname
}
binary already existing in
${
tarurl
}
. Downloading and installing it."
)
#---Do not have the buildinfo from the binary package
set
(
${
targetname
}
_buildinfo
"# PLACEHOLDER for package
${
name
}
"
)
...
...
cmake/scripts/UpdateSummaryFile.cmake
View file @
f991114c
...
...
@@ -15,7 +15,6 @@ if(EXISTS ${INSTALLDIR}/.buildinfo_${NAME}.txt)
if
(
NOT
${
buildinfo
}
MATCHES
"DIRECTORY:"
)
string
(
REPLACE
"VERSION:"
"DIRECTORY:
${
NAME
}
, VERSION:"
buildinfo
${
buildinfo
}
)
endif
()
file
(
LOCK lock_summary.cmake TIMEOUT 10
)
file
(
READ
${
SUMFILE
}
summary
)
while
(
NOT summary
)
message
(
"retrying to update summary for
${
NAME
}
..."
)
...
...
@@ -23,7 +22,7 @@ if(EXISTS ${INSTALLDIR}/.buildinfo_${NAME}.txt)
endwhile
()
string
(
REPLACE
"# PLACEHOLDER for package
${
NAME
}
"
"
${
buildinfo
}
"
summary
"
${
summary
}
"
)
file
(
WRITE
${
SUMFILE
}
${
summary
}
)
file
(
LOCK lock_summary.cmake RELEASE
)
message
(
"==== Updated
${
SUMFILE
}
with .buildinfo_
${
NAME
}
.txt"
)
else
()
message
(
"==== .buildinfo_
${
NAME
}
.txt file not found"
)
endif
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment