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
32774e63
Commit
32774e63
authored
Sep 09, 2021
by
David Fairbrother
Browse files
Handle RHEL using cmake3 instead of cmake in cppcheck
This explicitly checks which instance we have instead of hard coding
parent
77ea7fe3
Changes
1
Hide whitespace changes
Inline
Side-by-side
buildconfig/Jenkins/cppcheck.sh
View file @
32774e63
...
...
@@ -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