mirror of
1
0
Fork 0
modern-cmake/examples/root-dict
Henry Schreiner 23accc0f01 chore: update version to 3.29.0 2024-03-26 06:27:52 +00:00
..
CMakeLists.txt chore: update version to 3.29.0 2024-03-26 06:27:52 +00:00
CheckLoad.C Examples all build and test 2018-03-29 12:27:23 +02:00
DictExample.cxx Adding nice examples 2018-03-29 13:26:47 +02:00
DictExample.h Adding nice examples 2018-03-29 13:26:47 +02:00
DictLinkDef.h Adding nice examples 2018-03-29 13:26:47 +02:00
README.md style: run pre-commit 2022-06-02 14:30:14 -04:00

README.md

Dictionary Example

This is an example of building a module that includes a dictionary in CMake. Instead of using the ROOT suggested flags, we will manually add threading via find_package, which is the only important flag in the list on most systems.

examples/root-dict/CMakeLists.txt

import:'main', lang:'cmake'

Supporting files

This is just a simple-as-possible class definition, with one method:

examples/root-dict/DictExample.cxx

import, lang:'c_cpp'

examples/root-dict/DictExample.h

import, lang:'c_cpp'

We need a LinkDef.h, as well.

examples/root-dict/DictLinkDef.h

import, lang:'c_cpp'

Testing it

This is an example of a macro that tests the correct generation from the files listed above.

examples/root-dict/CheckLoad.C

import, lang:'c_cpp'