Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
60175141
Unverified
Commit
60175141
authored
Sep 24, 2021
by
Gagik Vardanyan
Committed by
GitHub
Sep 24, 2021
Browse files
Merge pull request #32460 from DavidFair/cppcheck_rhel
Handle RHEL using cmake3 instead of cmake in cppcheck
parents
0bc884fc
32774e63
Changes
1
Hide whitespace changes
Inline
Side-by-side
buildconfig/Jenkins/cppcheck.sh
View file @
60175141
...
...
@@ -27,15 +27,24 @@ cd $WORKSPACE/build
find
-name
cppcheck.xml
-delete
# configure cmake
if
[
$(
command
-v
scl
)
]
;
then
CMAKE_EXE
=
cmake3
SCL_ENABLE
=
"scl enable devtoolset-7"
else
CMAKE_EXE
=
cmake
SCL_ENABLE
=
""
fi
$SCL_ENABLE
"
$CMAKE_EXE
--version"
if
[
"
$(
command
-v
ninja
)
"
]
;
then
CMAKE_GENERATOR
=
"-G Ninja"
elif
[
"
$(
command
-v
ninja-build
)
"
]
;
then
CMAKE_GENERATOR
=
"-G Ninja"
fi
cmake
${
CMAKE_GENERATOR
}
-DCMAKE_BUILD_TYPE
=
Debug
-DCPPCHECK_GENERATE_XML
=
TRUE
-DCPPCHECK_NUM_THREADS
=
$BUILD_THREADS
..
$SCL_ENABLE
"
$CMAKE_EXE
${
CMAKE_GENERATOR
}
-DCMAKE_BUILD_TYPE=Debug -DCPPCHECK_GENERATE_XML=TRUE -DCPPCHECK_NUM_THREADS=
$BUILD_THREADS
..
"
# run cppcheck
cmake
--build
.
--target
cppcheck
$SCL_ENABLE
"
$CMAKE_EXE
--build . --target cppcheck
"
# Generate HTML report
cppcheck-htmlreport
--file
=
cppcheck.xml
--title
=
Embedded
--report-dir
=
cppcheck-report
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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