Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hcana
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
jlab
hallc
analyzer_software
hcana
Commits
6e7c2485
Commit
6e7c2485
authored
11 years ago
by
Edward Brash
Browse files
Options
Downloads
Patches
Plain Diff
Implement 'scons cppcheck=1'
Generate cppcheck_report.txt in the top level directory.
parent
7a9ba6d3
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
README.md
+2
-0
2 additions, 0 deletions
README.md
SConstruct.py
+31
-0
31 additions, 0 deletions
SConstruct.py
darwin64.py
+5
-0
5 additions, 0 deletions
darwin64.py
linux32.py
+5
-0
5 additions, 0 deletions
linux32.py
linux64.py
+5
-0
5 additions, 0 deletions
linux64.py
with
48 additions
and
0 deletions
README.md
+
2
−
0
View file @
6e7c2485
...
...
@@ -44,6 +44,8 @@ To compile with debug capabilities, do
`scons debug=1`
To compile the standalone codes the are part of podd, do
`scons standalone=1`
To run cppcheck (if installed) on the Hall C src diretory, do
`scons cppcheck=1`
Running
-------
...
...
This diff is collapsed.
Click to expand it.
SConstruct.py
+
31
−
0
View file @
6e7c2485
...
...
@@ -105,6 +105,37 @@ except OSError:
bld
=
Builder
(
action
=
rootcint
)
baseenv
.
Append
(
BUILDERS
=
{
'
RootCint
'
:
bld
})
######## cppcheck ###########################
def
which
(
program
):
import
os
def
is_exe
(
fpath
):
return
os
.
path
.
isfile
(
fpath
)
and
os
.
access
(
fpath
,
os
.
X_OK
)
fpath
,
fname
=
os
.
path
.
split
(
program
)
if
fpath
:
if
is_exe
(
program
):
return
program
else
:
for
path
in
os
.
environ
[
"
PATH
"
].
split
(
os
.
pathsep
):
path
=
path
.
strip
(
'"'
)
exe_file
=
os
.
path
.
join
(
path
,
program
)
if
is_exe
(
exe_file
):
return
exe_file
return
None
proceed
=
"
1
"
or
"
y
"
or
"
yes
"
or
"
Yes
"
or
"
Y
"
if
baseenv
.
subst
(
'
$CPPCHECK
'
)
==
proceed
:
is_cppcheck
=
which
(
'
cppcheck
'
)
print
"
Path to cppcheck is %s
\n
"
%
is_cppcheck
if
(
is_cppcheck
==
None
):
print
(
'
!!! cppcheck not found on this system. Check if cppcheck is installed and in your PATH.
'
)
Exit
(
1
)
else
:
cppcheck_command
=
baseenv
.
Command
(
'
cppcheck_report.txt
'
,[],
"
cppcheck --quiet --enable=all src/ 2> $TARGET
"
)
baseenv
.
AlwaysBuild
(
cppcheck_command
)
####### Start of main SConstruct ############
hallclib
=
'
HallC
'
...
...
This diff is collapsed.
Click to expand it.
darwin64.py
+
5
−
0
View file @
6e7c2485
...
...
@@ -5,6 +5,8 @@ def config(env,args):
debug
=
args
.
get
(
'
debug
'
,
0
)
standalone
=
args
.
get
(
'
standalone
'
,
0
)
cppcheck
=
args
.
get
(
'
cppcheck
'
,
0
)
if
int
(
debug
):
env
.
Append
(
CXXFLAGS
=
'
-g -O0
'
)
else
:
...
...
@@ -14,6 +16,9 @@ def config(env,args):
if
int
(
standalone
):
env
.
Append
(
STANDALONE
=
'
1
'
)
if
int
(
cppcheck
):
env
.
Append
(
CPPCHECK
=
'
1
'
)
#env.Append(CXXFLAGS = '-Wall -Woverloaded-virtual -pthread -rdynamic')
env
.
Append
(
CXXFLAGS
=
'
-Wall -Woverloaded-virtual -pthread
'
)
env
.
Append
(
CPPDEFINES
=
'
-DMACVERS
'
)
...
...
This diff is collapsed.
Click to expand it.
linux32.py
+
5
−
0
View file @
6e7c2485
...
...
@@ -5,6 +5,8 @@ def config(env,args):
debug
=
args
.
get
(
'
debug
'
,
0
)
standalone
=
args
.
get
(
'
standalone
'
,
0
)
cppcheck
=
args
.
get
(
'
cppcheck
'
,
0
)
if
int
(
debug
):
env
.
Append
(
CXXFLAGS
=
'
-g -O0
'
)
else
:
...
...
@@ -14,6 +16,9 @@ def config(env,args):
if
int
(
standalone
):
env
.
Append
(
STANDALONE
=
'
1
'
)
if
int
(
cppcheck
):
env
.
Append
(
CPPCHECK
=
'
1
'
)
env
.
Append
(
CXXFLAGS
=
'
-m32 -Wall -Woverloaded-virtual
'
)
env
.
Append
(
CPPDEFINES
=
'
-DLINUXVERS
'
)
...
...
This diff is collapsed.
Click to expand it.
linux64.py
+
5
−
0
View file @
6e7c2485
...
...
@@ -5,6 +5,8 @@ def config(env,args):
debug
=
args
.
get
(
'
debug
'
,
0
)
standalone
=
args
.
get
(
'
standalone
'
,
0
)
cppcheck
=
args
.
get
(
'
cppcheck
'
,
0
)
if
int
(
debug
):
env
.
Append
(
CXXFLAGS
=
'
-g -O0
'
)
else
:
...
...
@@ -14,6 +16,9 @@ def config(env,args):
if
int
(
standalone
):
env
.
Append
(
STANDALONE
=
'
1
'
)
if
int
(
cppcheck
):
env
.
Append
(
CPPCHECK
=
'
1
'
)
env
.
Append
(
CXXFLAGS
=
'
-Wall -Woverloaded-virtual
'
)
env
.
Append
(
CPPDEFINES
=
'
-DLINUXVERS
'
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment