Skip to content

WIP: Make custom target for source files.

maxka requested to merge feature/cmakelists-sources-target into master

I'd like to add all source files to custom targets in cmake. The commit in the feature branch shows this exemplary for dune/solvers/common and dune/solvers/iterationsteps.

This way GUIs (like QTCreator) will automatically consider them as part of the project and display them appropriately in the project view (currently, there is no mechanism actually relating the source files to a project apart from being included in an executable-target). I am aware that this is a weak reasoning. However I cannot see a disadvantage. One could even add more substructure to the files (e.g. separate .cc and .hh).

Additionally, one could invoke a GLOB to obtain all source files which would simplify adding new source files in the sense that they don't need to be added to the CMakeLists.txt manually anymore. This however is considered bad practice and I did not dare to propose such.

Note: The merge conflict should originate from a file listed that currently is not in the master branch. I will fix that if this request approaches acceptance.

Merge request reports