IAP GITLAB
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
corsika
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue 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
Air Shower Physics
corsika
Commits
fbdb239d
Commit
fbdb239d
authored
5 years ago
by
ralfulrich
Browse files
Options
Downloads
Patches
Plain Diff
also run clang-format checking automatically as unit test
parent
becf084a
No related branches found
No related tags found
1 merge request
!123
Copyright
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CMakeLists.txt
+4
-1
4 additions, 1 deletion
CMakeLists.txt
do-clang-format.sh
+10
-1
10 additions, 1 deletion
do-clang-format.sh
with
14 additions
and
2 deletions
CMakeLists.txt
+
4
−
1
View file @
fbdb239d
...
...
@@ -67,9 +67,12 @@ endif()
#add_custom_target (corsika_pre_build)
#add_custom_command (TARGET corsika_pre_build PRE_BUILD COMMAND "${PROJECT_SOURCE_DIR}/pre_compile.py")
# add call to do-
interaction
to run as unit-test-case
# add call to
./
do-
copyright.py
to run as unit-test-case
add_test
(
NAME copyright_notices COMMAND
"./do-copyright.py"
WORKING_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
)
# add call to do-clang-format.sh checking to run as unit-test-case
add_test
(
NAME clang_format COMMAND ./do-clang-format.sh check WORKING_DIRECTORY
${
CMAKE_CURRENT_SOURCE_DIR
}
)
find_package
(
Pythia8
)
# optional
find_package
(
Eigen3 REQUIRED
)
...
...
This diff is collapsed.
Click to expand it.
do-clang-format.sh
+
10
−
1
View file @
fbdb239d
clang-format
-i
-style
=
file
`
find
.
-iregex
'^.*\.\(cc\|h\)$'
-not
-path
'./ThirdParty/*'
`
#!/bin/bash
command
=
"clang-format -style=file
`
find
.
-iregex
'^.*\.\(cc\|h\)$'
-not
-path
'./ThirdParty/*'
`
"
if
[
"
$1
"
==
"check"
]
;
then
!
${
command
}
-output-replacements-xml
|
grep
-c
"<replacement "
else
${
command
}
-i
fi
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