Commit 671e4e1f authored by Vermeeren's avatar Vermeeren

Merge remote-tracking branch 'upstream/master'

parents bcea4047 90491717
Pipeline #1576 passed with stages
in 1 minute and 50 seconds
......@@ -5,6 +5,10 @@ Reverse chronologically sorted, i.e. newest on top.
For details view the associated milestone of a release which are linked below.
View the commit history for minor fixes and improvements.
## 1.8.0 / 2018-07-20
https://git.mel.vin/template/c/milestones/14
## 1.7.0 / 2018-07-14
https://git.mel.vin/template/c/milestones/13
......
......@@ -23,7 +23,7 @@ endif()
unset(PROJECT_LANGUAGES)
project(doc_template
VERSION 1.7.0
VERSION 1.8.0
DESCRIPTION "__DESCRIPTION__"
LANGUAGES ${PROJECT_LANGUAGES})
set(PROJECT_VERSION_SUFFIX "") # alpha/beta/rc, e.g. "-rc0"
......
#!/bin/bash
set -e
shopt -s globstar
shopt -s nullglob
case "$1" in
'check')
;;
'format')
;;
*)
printf '%s\n' \
"usage: $0 check|format [clang-tidy path]
always call from root of repo
check
check sources and report replacements
format
format sources in place
[clang-tidy path]
path to clang-tidy, defaults to searching path
EXIT CODE
0 [check] no replacements
[format] completed ok
1 [check] found replacements
2 internal error
* when any commands fails because of 'set -e'"
exit 2
;;
esac
if [[ $2 ]]
then
clang_format="$2"
else
clang_format="$(which clang-format)"
fi
# set targets
targets=({src,include,test}/**/*.{c,h,cpp,hpp})
# run format if requested
if [[ $1 == 'format' ]]
then
"$clang_format" -i -style=file "${targets[@]}"
exit 0
fi
# checking logic otherwise
xml="$("$clang_format" -output-replacements-xml -style=file "${targets[@]}")"
# do not fail when no replacements
set +e
replacements="$(echo "$xml" | grep -cv \
-e "^<?xml version='1.0'?>\$" \
-e "^<replacements xml:space='preserve' incomplete_format='false'>\$" \
-e "^</replacements>\$")"
case $? in
0)
printf '%i replacement(s)\n' "$replacements"
printf '%s\n' "$xml"
exit 1
;;
1)
exit 0
;;
*)
printf 'internal error\n'
exit 2
;;
esac
Subproject commit 71a5e562be2603d0243eee9ce1c59f33d71a9a5f
Subproject commit 383262f4896d258a555886be07f5790d5d092d03
......@@ -43,6 +43,10 @@ configure_file(
"${DOC_SRC}/conf.py.in"
"${DOC_TMP}/sphinx/conf.py"
@ONLY)
configure_file(
"${DOC_SRC}/_static/theme_overrides.css.in"
"${DOC_TMP}/sphinx/_static/theme_overrides.css"
COPYONLY)
add_custom_target(doc ALL
COMMAND "${CMAKE_COMMAND}" -E echo
......
/* override table width restrictions */
@media screen and (min-width: 767px) {
.wy-table-responsive table td, .wy-table-responsive table th {
/* !important prevents the common CSS stylesheets from overriding
this as on RTD they are loaded after this stylesheet */
white-space: normal !important;
}
.wy-table-responsive {
overflow: visible !important;
}
}
......@@ -103,7 +103,15 @@ if '@DOC@' == 'html':
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = []
html_static_path = ['_static']
# Fix table line wrapping for RTD theme
# https://rackerlabs.github.io/docs-rackspace/tools/rtd-tables.html
# https://github.com/rtfd/sphinx_rtd_theme/pull/432
html_context = {
'css_files': ['_static/theme_overrides.css']
}
# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment