Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-common
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
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
Show more breadcrumbs
Timo Koch
dune-common
Commits
2f6aa790
Commit
2f6aa790
authored
9 years ago
by
Christoph Grüninger
Browse files
Options
Downloads
Plain Diff
Merge branch 'feature/config.h.cmake-insource'
parents
b20014e9
96654e29
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmake/modules/DuneMacros.cmake
+8
-8
8 additions, 8 deletions
cmake/modules/DuneMacros.cmake
with
8 additions
and
8 deletions
cmake/modules/DuneMacros.cmake
+
8
−
8
View file @
2f6aa790
...
...
@@ -38,11 +38,11 @@
#
# dune_regenerate_config_cmake()
#
# Creates a new config.h.cmake file in ${CMAKE_CURRENT_BINARY_DIR) that
# Creates a new config
_collected
.h.cmake file in ${CMAKE_CURRENT_BINARY_DIR) that
# consists of entries from ${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake
# and includes non-private entries from the files config.h.cmake files
# and includes non-private entries from the files config
_collected
.h.cmake files
# of all dependent modules.
# Finally config.h is created from config.h.cmake.
# Finally config.h is created from config
_collected
.h.cmake.
#
#
# dune_add_library(<basename> [NO_EXPORT] [ADD_LIBS <lib1> [<lib2> ...]]
...
...
@@ -689,7 +689,7 @@ endmacro(dune_project)
# create a new config.h file and overwrite the existing one
macro
(
dune_regenerate_config_cmake
)
set
(
CONFIG_H_CMAKE_FILE
"
${
CMAKE_BINARY_DIR
}
/config.h.cmake"
)
set
(
CONFIG_H_CMAKE_FILE
"
${
CMAKE_BINARY_DIR
}
/config
_collected
.h.cmake"
)
if
(
EXISTS
${
CMAKE_SOURCE_DIR
}
/config.h.cmake
)
file
(
READ
${
CMAKE_SOURCE_DIR
}
/config.h.cmake _file
)
string
(
REGEX MATCH
...
...
@@ -697,8 +697,8 @@ macro(dune_regenerate_config_cmake)
_myfile
"
${
_file
}
"
)
endif
(
EXISTS
${
CMAKE_SOURCE_DIR
}
/config.h.cmake
)
# overwrite file with new content
file
(
WRITE
${
CONFIG_H_CMAKE_FILE
}
"/* config.h. Generated from config.h.cmake by CMake.
It was generated from config.h.cmake which in turn is generated automatically
file
(
WRITE
${
CONFIG_H_CMAKE_FILE
}
"/* config.h. Generated from config
_collected
.h.cmake by CMake.
It was generated from config
_collected
.h.cmake which in turn is generated automatically
from the config.h.cmake files of modules this module depends on. */"
)
...
...
@@ -869,12 +869,12 @@ endif()
message
(
STATUS
"Adding custom target for config.h generation"
)
dune_regenerate_config_cmake
()
# add a target to generate config.h.cmake
add_custom_target
(
OUTPUT config.h.cmake
add_custom_target
(
OUTPUT config
_collected
.h.cmake
COMMAND
dune_regenerate_config_cmake
()
DEPENDS stamp-regenerate-config-h
)
# actually write the config.h file to disk
# using generated file
configure_file
(
${
CMAKE_CURRENT_BINARY_DIR
}
/config.h.cmake
configure_file
(
${
CMAKE_CURRENT_BINARY_DIR
}
/config
_collected
.h.cmake
${
CMAKE_CURRENT_BINARY_DIR
}
/config.h
)
else
(
"
${
ARGC
}
"
EQUAL
"1"
)
message
(
STATUS
"Not adding custom target for config.h generation"
)
...
...
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