Skip to content

Documentation: add more notes to dict generation

Hi @henryiii, thanks for this resource; it's been very useful as a point-of-reference for some of the new CMake features.

This PR intends to add more information about using the MODULE feature of the root_generate_dictionary CMake function. I needed this because I wanted to generate the ROOT dictionaries after already setting up a build target for a shared library.

Without this, I ran in to some issues when using generator expressions for my include locations. Looking at the macro source code, it seems likely to me that I could probably have used root_generate_dictionary to create my shared library and then used the same fixes that it uses in order to resolve things, but I find the "CMake-first, ROOT-second" approach cleaner.

There are a few things I anticipate you might want to discuss:

  1. The replacement of a version comment with an if( ... VERSION_LESS ... ) statement
  2. The inclusion of the automatic module generation as a comment rather than another example

RFC!

Edited by Angus Hollands

Merge request reports