mirror of
https://github.com/ttroy50/cmake-examples.git
synced 2025-12-18 12:14:36 +03:00
spelling fixes
This commit is contained in:
@@ -84,7 +84,7 @@ $ tree
|
||||
1 directory, 4 files
|
||||
----
|
||||
|
||||
By defaut these are output to +/tmp/scanbuildout/{run folder}+. You can change this using `scan-build -o /output/folder`.
|
||||
By default these are output to +/tmp/scanbuildout/{run folder}+. You can change this using `scan-build -o /output/folder`.
|
||||
|
||||
# Building the example
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ foreach(EXCLUDE_PATTERN ${CLANG_FORMAT_EXCLUDE_PATTERNS})
|
||||
list(APPEND EXCLUDE_PATTERN_ARGS "--exclude=${EXCLUDE_PATTERN}")
|
||||
endforeach()
|
||||
|
||||
# call the script to chech changed files in git
|
||||
# call the script to check changed files in git
|
||||
add_custom_target(format-check-changed
|
||||
COMMENT "Checking changed files in git"
|
||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
|
||||
|
||||
@@ -142,7 +142,7 @@ def cli():
|
||||
description='Checks if files chagned in git match the .clang-format specification')
|
||||
parser.add_argument("--file-extensions", type=str,
|
||||
default=".cpp,.h,.cxx,.hxx,.hpp,.cc,.ipp",
|
||||
help="Comma seperated list of file extensions to check")
|
||||
help="Comma separated list of file extensions to check")
|
||||
parser.add_argument('--exclude', action='append', default=[],
|
||||
help='Will not match the files / directories with these in the name')
|
||||
parser.add_argument('--clang-format-bin', type=str, default="clang-format",
|
||||
|
||||
@@ -61,7 +61,7 @@ $ wget https://github.com/danmar/cppcheck/archive/1.79.tar.gz \
|
||||
|
||||
## Adding Custom Package Modules
|
||||
|
||||
As with the previous example I use a custom module to find CppCheck. This version is slightly different to the pervious one and
|
||||
As with the previous example I use a custom module to find CppCheck. This version is slightly different to the previous one and
|
||||
will automatically add a `make cppcheck-analysis` target.
|
||||
|
||||
[source,cmake]
|
||||
|
||||
@@ -41,7 +41,7 @@ if(CPPCHECK_BIN)
|
||||
set(CPPCHECK_THREADS_ARG "-j4" CACHE STRING "The number of threads to use")
|
||||
set(CPPCHECK_PROJECT_ARG "--project=${PROJECT_BINARY_DIR}/compile_commands.json")
|
||||
set(CPPCHECK_BUILD_DIR_ARG "--cppcheck-build-dir=${PROJECT_BINARY_DIR}/analysis/cppcheck" CACHE STRING "The build directory to use")
|
||||
# Don't show thise errors
|
||||
# Don't show these errors
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/.cppcheck_suppressions")
|
||||
set(CPPCHECK_SUPPRESSIONS "--suppressions-list=${CMAKE_SOURCE_DIR}/.cppcheck_suppressions" CACHE STRING "The suppressions file to use")
|
||||
else()
|
||||
|
||||
@@ -23,7 +23,7 @@ macro(add_analysis _target _sources)
|
||||
set(ALL_ANALYSIS_TARGETS "${ALL_ANALYSIS_TARGETS}" PARENT_SCOPE)
|
||||
|
||||
# This is used to make the command run correctly on the command line.
|
||||
# The COMMAND argumetn expects a list and this does the change
|
||||
# The COMMAND argument expects a list and this does the change
|
||||
# I need to check which version works with 2.7
|
||||
if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VESION} GREATER 2.7)
|
||||
separate_arguments(tmp_args UNIX_COMMAND ${CPPCHECK_ARG})
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
find_program(CPPCHECK_BIN NAMES cppcheck)
|
||||
|
||||
#
|
||||
# Arugments are
|
||||
# Arguments are
|
||||
# -j use multiple threads (and thread count)
|
||||
# --quite only show errors / warnings etc
|
||||
# --error-exitcode The code to exit with if an error shows up
|
||||
# --enabled Comman seperated list of the check types. Can include warning,performance,style
|
||||
# --enabled Comma separated list of the check types. Can include warning,performance,style
|
||||
# Note nightly build on earth changes error-exitcode to 0
|
||||
set (CPPCHECK_THREADS "-j 4" CACHE STRING "The -j argument to have cppcheck use multiple threads / cores")
|
||||
|
||||
@@ -34,4 +34,4 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(
|
||||
mark_as_advanced(
|
||||
CPPCHECK_BIN
|
||||
CPPCHECK_THREADS
|
||||
CPPCHECK_ARG)
|
||||
CPPCHECK_ARG)
|
||||
|
||||
Reference in New Issue
Block a user