Move include of config.h from source to some header files
Summary
Remove includes of config.h from most source files and add a corresponding include of dune-common-config.hh
to some header files
With !1262 (merged) we can remove the include of config.h
in all source files. Instead, we include the public config file dune-common-config.hh
in those header files that depend on some config dependent preprocessor defines. We have already reduced these defines. Now only optional-dependencies that cannot be activated later are included.
ToDo
-
Check that only those header files that really need the config.hh
file to be included (depend on a config variable introduced in a config file) actually are included. -
Check that source files include private config files if additional variables are checked. -
Needs !1314 (merged) to be merged before.
Merge request reports
Activity
added buildsystem label
added 1 commit
- daada219 - Undo some changes in python introduced by rebase
- Resolved by Simon Praetorius
What I don't like about the recent changes introduced in !1262 (merged) is the form of the include statements
#include <dune-common-config.hh>
It simply looks so unusual. One is tempted to change it to
#include <dune/common/config.hh>
I know that we had the discussion (!1262 (comment 130985)) that this cannot be done automatically, but maybe we can look again into the old proposal !924 (closed) that has found a solution.
Edited by Simon Praetorius
added 1 commit
- 1e79b61e - Cleanup the header and test files for config.hh includes
mentioned in merge request !1317 (merged)
marked the checklist item Needs !1314 (merged) to be merged before. as completed
added 137 commits
-
1e79b61e...7eea319e - 136 commits from branch
master
- fd410812 - Move include of config.h from source to header
-
1e79b61e...7eea319e - 136 commits from branch
added 1 commit
- 173e5f85 - Move include of config.h from source to header
added 1 commit
- 9db46b3b - Move include of config.h from source to header
added 1 commit
- 0602ec3e - Move include of config.h from source to header
added 1 commit
- a6966c99 - Move include of config.h from source to header
Is this intended for DUNE 2.10.0?
For me, this MR was a direct consequence of !1262 (merged). But it should be properly tested.
This MR implies follow-up merge requests in all core modules: dune-localfunctions!270 (merged), dune-grid!741 (merged), dune-geometry!246 (merged), dune-istl!566 (merged)
Some MRs are marked ready. There I need someone to take a look and approve. Others are still marked Draft, there are some specific open points to discuss
Edited by Simon Praetorius
mentioned in merge request dune-istl!566 (merged)