blob: fba1b7ffbafddeb20856decfc311253fa5955edf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# Check for CMake invalid option warnings
cmake_warn_check() {
if [[ -n ${PORTAGE_LOG_FILE} && -r ${PORTAGE_LOG_FILE} ]] ; then
local cat=cat
[[ ${PORTAGE_LOG_FILE} == *.gz ]] && cat=zcat
local vars=()
while read -r l; do
vars+=( "${l}" )
done < <( "${cat}" "${PORTAGE_LOG_FILE}" \
| sed -n -e '/Manually-specified variables were not used by the project/,/^--/{/^ /p}' \
| LC_ALL=C sort -u)
if [[ ${vars} ]]; then
eqawarn "QA Notice: One or more CMake variables were not used by the project:"
local v
for v in "${vars[@]}"; do
eqawarn " ${v}"
done
fi
fi
}
cmake_warn_check
: # guarantee successful exit
# vim:ft=sh
|