Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-xt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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-xt
Commits
7f706fa3
Commit
7f706fa3
authored
9 years ago
by
Dr. Felix Tobias Schindler
Browse files
Options
Downloads
Patches
Plain Diff
[cmake] add add_dune_alugrid_compile_flags()
parent
6d97020d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmake/modules/AddALUGridCompileFlags.cmake
+55
-0
55 additions, 0 deletions
cmake/modules/AddALUGridCompileFlags.cmake
with
55 additions
and
0 deletions
cmake/modules/AddALUGridCompileFlags.cmake
0 → 100644
+
55
−
0
View file @
7f706fa3
# This file is part of the dune-stuff project:
# https://github.com/wwu-numerik/dune-stuff
# Copyright holders: Rene Milk, Felix Schindler
# License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
# Module providing a convenience method to add ALUGrid compile flags.
#
# Provides add_dune_alugrid_compile_flags(target1 target2 ...), which
# adds ALUGrid flags to the targets for compilation only (see
# add_dune_alugrid_flags in dune-grid for compilation and linking).
# This function is essentially copied from AddALUGridFlags.cmake
#
# This is needed if you define an object like
#
# add_library(obj_foo
# OBJECT
# EXCLUDE_FROM_ALL
# foo.cc)
#
# to be used in a library
#
# add_library(lib_foo
# STATIC
# EXCLUDE_FROM_ALL
# $<TARGET_OBJECTS:obj_foo>
#
# that is used by a target
#
# target_link_libraries(bar lib_foo)
#
# becaus while we ca use add_dune_alugrid_flags on lib_foo we can not use it
# on obj_foo. Instead we can use
#
# add_dune_alugrid_compile_flags(obj_foo)
#
# to make it compile.
function
(
add_dune_alugrid_compile_flags
)
if
(
ALUGRID_FOUND
)
cmake_parse_arguments
(
ADD_ALU
"SOURCE_ONLY;OBJECT"
""
""
${
ARGN
}
)
if
(
ADD_ALU_SOURCE_ONLY
)
set
(
_prefix SOURCE
)
set
(
_source_only SOURCE_ONLY
)
else
()
if
(
ADD_ALU_OBJECT
)
set
(
_object OBJECT
)
endif
(
ADD_ALU_OBJECT
)
set
(
_prefix TARGET
)
endif
()
include_directories
(
${
ALUGRID_INCLUDES
}
)
set_property
(
${
_prefix
}
${
ADD_ALU_UNPARSED_ARGUMENTS
}
APPEND PROPERTY
COMPILE_DEFINITIONS ENABLE_ALUGRID=1
)
endif
(
ALUGRID_FOUND
)
endfunction
(
add_dune_alugrid_compile_flags
)
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