Skip to content
This repository was archived by the owner on Apr 13, 2021. It is now read-only.

Commit f9d21e4

Browse files
committed
Merge pull request #221 from swift-nav/checkoutput-diff-change
improve checkoutput script, doxygen
2 parents 3faffde + eb9ab5e commit f9d21e4

File tree

5 files changed

+17
-18
lines changed

5 files changed

+17
-18
lines changed

checks/checkoutput.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
#echo "HEY: git diff $1 | $2 --no-tree - > check_output.txt"
2-
git diff $1 | $2 --no-tree - > check_output.txt
1+
unset GIT_DIR
2+
cmd="$(git rev-parse --show-toplevel)/checks/checkpatch.pl"
3+
git diff origin/master --staged | eval "\"$cmd\"" --no-tree - > style_check_output.txt

checks/pre-commit

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
echo "precommit running. checking build located at ${subdir}."
22
cd "${subdir}"
3-
make check-coverage
3+
make check-style

docs/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ if (BUILD_DOCUMENTATION)
1414
add_subdirectory(diagrams)
1515

1616
configure_file(Doxyfile.in
17-
${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
17+
"${CMAKE_CURRENT_BINARY_DIR}/Doxyfile"
1818
@ONLY
1919
)
2020

2121
add_custom_target(docs
22-
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
23-
COMMENT "Building Doxygen documentation"
22+
${DOXYGEN_EXECUTABLE} "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile"
23+
COMMENT "Building Doxygen documentation\nWriting warnings/errors to WARN_LOGFILE"
2424
DEPENDS diagrams Doxyfile.in
2525
)
2626

2727
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES
28-
${CMAKE_CURRENT_BINARY_DIR}/html
28+
"${CMAKE_CURRENT_BINARY_DIR}/html"
2929
)
3030

3131
endif (BUILD_DOCUMENTATION)

docs/Doxyfile.in

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ PROJECT_LOGO =
5252
# If a relative path is entered, it will be relative to the location
5353
# where doxygen was started. If left blank the current directory will be used.
5454

55-
OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@
55+
OUTPUT_DIRECTORY = "@CMAKE_CURRENT_BINARY_DIR@"
5656

5757
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
5858
# 4096 sub-directories (in 2 levels) under the output directory of each output
@@ -140,7 +140,7 @@ FULL_PATH_NAMES = YES
140140
# relative paths, which will be relative from the directory where doxygen is
141141
# started.
142142

143-
STRIP_FROM_PATH = @PROJECT_SOURCE_DIR@
143+
STRIP_FROM_PATH = "@PROJECT_SOURCE_DIR@"
144144

145145
# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
146146
# the path mentioned in the documentation of a class, which tells
@@ -655,9 +655,9 @@ WARN_LOGFILE = doxygen_warnings.txt
655655
# directories like "/usr/src/myproject". Separate the files or directories
656656
# with spaces.
657657

658-
INPUT = @PROJECT_SOURCE_DIR@/src/ \
659-
@PROJECT_SOURCE_DIR@/include/ \
660-
@PROJECT_SOURCE_DIR@/docs/
658+
INPUT = "@PROJECT_SOURCE_DIR@/src/" \
659+
"@PROJECT_SOURCE_DIR@/include/" \
660+
"@PROJECT_SOURCE_DIR@/docs/"
661661

662662
# This tag can be used to specify the character encoding of the source files
663663
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
@@ -767,7 +767,7 @@ EXAMPLE_RECURSIVE = NO
767767
# directories that contain image that are included in the documentation (see
768768
# the \image command).
769769

770-
IMAGE_PATH = @CMAKE_CURRENT_BINARY_DIR@/diagrams/
770+
IMAGE_PATH = "@CMAKE_CURRENT_BINARY_DIR@/diagrams/"
771771

772772
# The INPUT_FILTER tag can be used to specify a program that doxygen should
773773
# invoke to filter for each input file. Doxygen will invoke the filter program

src/CMakeLists.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,9 @@ install(FILES ${libswiftnav_HEADERS} DESTINATION include/libswiftnav)
6969
MESSAGE("${PROJECT_SOURCE_DIR}")
7070

7171
add_custom_command(
72-
OUTPUT checkpatch_output.txt
72+
OUTPUT checkpatch
7373
DEPENDS ${libswiftnav_SRCS}
7474
VERBATIM
75-
COMMAND "${PROJECT_SOURCE_DIR}/checks/checkoutput.sh"
76-
"${PROJECT_SOURCE_DIR}/src/*.c"
77-
"${PROJECT_SOURCE_DIR}/checks/checkpatch.pl")
75+
COMMAND "${PROJECT_SOURCE_DIR}/checks/checkoutput.sh")
7876

79-
add_custom_target(checkpatch DEPENDS checkpatch_output.txt)
77+
add_custom_target(checkpatch DEPENDS checkpatch)

0 commit comments

Comments
 (0)