Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-gdt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
ag-ohlberger
dune-community
dune-gdt
Commits
438cca74
Commit
438cca74
authored
3 years ago
by
Tobias Leibner
Browse files
Options
Downloads
Patches
Plain Diff
Fix cmake-lint errors
parent
b21f4f41
No related branches found
No related tags found
1 merge request
!3
Add pre-commit hooks, general CI improvements
Pipeline
#107243
passed
3 years ago
Stage: images
Stage: cpp
Stage: headercheck
Stage: python
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmake/modules/CMakeLists.txt
+2
-2
2 additions, 2 deletions
cmake/modules/CMakeLists.txt
examples/CMakeLists.txt
+12
-11
12 additions, 11 deletions
examples/CMakeLists.txt
with
14 additions
and
13 deletions
cmake/modules/CMakeLists.txt
+
2
−
2
View file @
438cca74
...
@@ -10,5 +10,5 @@
...
@@ -10,5 +10,5 @@
# René Fritze (2018)
# René Fritze (2018)
# ~~~
# ~~~
set
(
modules DuneGdtMacros.cmake
)
set
(
_
modules DuneGdtMacros.cmake
)
install
(
FILES
"
${
modules
}
"
DESTINATION
${
CMAKE_INSTALL_DATAROOTDIR
}
/cmake/modules
)
install
(
FILES
"
${
_
modules
}
"
DESTINATION
${
CMAKE_INSTALL_DATAROOTDIR
}
/cmake/modules
)
This diff is collapsed.
Click to expand it.
examples/CMakeLists.txt
+
12
−
11
View file @
438cca74
...
@@ -11,20 +11,21 @@
...
@@ -11,20 +11,21 @@
# Tobias Leibner (2018)
# Tobias Leibner (2018)
# ~~~
# ~~~
macro
(
cleanup_target_name arg
)
# Removes directory path, .cc suffix and leading __, replaces / with __
string
(
REPLACE
${
PROJECT_SOURCE_DIR
}
""
targname
${
arg
}
)
macro
(
CLEANUP_TARGET_NAME arg
)
string
(
REPLACE
".cc"
""
targname
${
targname
}
)
string
(
REPLACE
${
PROJECT_SOURCE_DIR
}
""
_targname
${
arg
}
)
string
(
REGEX REPLACE
"/"
"__"
targname
${
targname
}
)
string
(
REPLACE
".cc"
""
_targname
${
_targname
}
)
string
(
REGEX REPLACE
"^__"
""
targname
${
targname
}
)
string
(
REGEX REPLACE
"/"
"__"
_targname
${
_targname
}
)
endmacro
(
cleanup_target_name
)
string
(
REGEX REPLACE
"^__"
""
_targname
${
_targname
}
)
endmacro
(
CLEANUP_TARGET_NAME
)
file
(
GLOB_RECURSE example_sources
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/*.cc"
)
file
(
GLOB_RECURSE example_sources
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/*.cc"
)
foreach
(
source
${
example_sources
}
)
# do some name conversion
foreach
(
source
${
example_sources
}
)
# do some name conversion
set
(
targname
${
source
}
)
set
(
_
targname
${
source
}
)
cleanup_target_name
(
${
targname
}
)
cleanup_target_name
(
${
_
targname
}
)
add_executable
(
${
targname
}
${
source
}
)
add_executable
(
${
_
targname
}
${
source
}
)
list
(
APPEND examples_targets
${
targname
}
)
list
(
APPEND examples_targets
${
_
targname
}
)
endforeach
(
source
${
example_sources
}
)
endforeach
(
source
${
example_sources
}
)
add_custom_target
(
examples
)
add_custom_target
(
examples
COMMENT
"Selected examples showing some of dune-gdt's features."
)
add_dependencies
(
examples
${
examples_targets
}
)
add_dependencies
(
examples
${
examples_targets
}
)
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