Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-codegen
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
Service Desk
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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Christian Heinigk
dune-codegen
Commits
060560df
Commit
060560df
authored
7 years ago
by
Dominic Kempf
Browse files
Options
Downloads
Patches
Plain Diff
[cmake] Add EXCLUDE_FROM_ALL option to add_generated_executable
parent
bcded456
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmake/modules/DunePerftoolMacros.cmake
+13
-2
13 additions, 2 deletions
cmake/modules/DunePerftoolMacros.cmake
cmake/modules/GeneratedSystemtests.cmake
+1
-3
1 addition, 3 deletions
cmake/modules/GeneratedSystemtests.cmake
with
14 additions
and
5 deletions
cmake/modules/DunePerftoolMacros.cmake
+
13
−
2
View file @
060560df
...
...
@@ -39,6 +39,12 @@
# Additional dependencies of the generated executable (changes in those
# will retrigger generation)
#
# .. cmake_param:: EXCLUDE_FROM_ALL
# :option:
#
# Set this option, if you do not want the target to be automatically
# built. This option is forwarded to the builtin command add_executable.
#
# Add an executable to the project that gets automatically
# generated at configure time with the form compiler uf2pdelab.
# Regeneration is triggered correctly if the UFL file or the
...
...
@@ -65,7 +71,7 @@ endif()
file
(
GLOB_RECURSE UFL2PDELAB_SOURCES
${
UFL2PDELAB_GLOB_PATTERN
}
)
function
(
add_generated_executable
)
set
(
OPTIONS
)
set
(
OPTIONS
EXCLUDE_FROM_ALL
)
set
(
SINGLE TARGET SOURCE UFLFILE INIFILE
)
set
(
MULTI FORM_COMPILER_ARGS DEPENDS
)
include
(
CMakeParseArguments
)
...
...
@@ -108,6 +114,11 @@ function(add_generated_executable)
CMAKE_MODULES
)
configure_file
(
${
perftool_path
}
/StandardMain.cmake
${
GEN_SOURCE
}
)
endif
()
if
(
GEN_EXCLUDE_FROM_ALL
)
set
(
GEN_EXCLUDE_FROM_ALL
"EXCLUDE_FROM_ALL"
)
else
()
set
(
GEN_EXCLUDE_FROM_ALL
""
)
endif
()
# Generate a list of generated headers to teach CMake about
dune_execute_process
(
COMMAND
${
CMAKE_BINARY_DIR
}
/run-in-dune-env python
${
perftool_path
}
/deplist.py
${
GEN_INIFILE
}
${
GEN_TARGET
}
...
...
@@ -125,7 +136,7 @@ function(add_generated_executable)
COMMENT
"Generating operators for the target
${
GEN_TARGET
}
"
)
add_executable
(
${
GEN_TARGET
}
${
GEN_SOURCE
}
${
GEN_DRIVER
}
${
header_deps
}
)
add_executable
(
${
GEN_TARGET
}
${
GEN_EXCLUDE_FROM_ALL
}
${
GEN_SOURCE
}
${
GEN_DRIVER
}
${
header_deps
}
)
target_include_directories
(
${
GEN_TARGET
}
PUBLIC
${
CMAKE_CURRENT_BINARY_DIR
}
)
add_dependencies
(
generation
${
GEN_TARGET
}
)
endfunction
()
...
...
This diff is collapsed.
Click to expand it.
cmake/modules/GeneratedSystemtests.cmake
+
1
−
3
View file @
060560df
...
...
@@ -51,11 +51,9 @@ function(dune_add_formcompiler_system_test)
UFLFILE
${
SYSTEMTEST_UFLFILE
}
INIFILE
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
inifile
}
"
DEPENDS
${
SYSTEMTEST_INIFILE
}
EXCLUDE_FROM_ALL
)
# Exclude the target from all
set_property
(
TARGET
${
tname
}
PROPERTY EXCLUDE_FROM_ALL 1
)
# Add dependency on the metatarget for this systemtest
if
(
NOT
${
INIINFO_
${
inifile
}
_suffix
}
STREQUAL
"__empty"
)
add_dependencies
(
${
SYSTEMTEST_BASENAME
}
${
tname
}
)
...
...
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