Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regenerate dictionaries on header change #32

Open
wdconinc opened this issue Jul 24, 2017 · 1 comment
Open

Regenerate dictionaries on header change #32

wdconinc opened this issue Jul 24, 2017 · 1 comment

Comments

@wdconinc
Copy link
Member

Few things are more frustrating than spending 4 days trying to debug a phony problem that is caused by out-of-date dictionaries. With increases in development, more frequent changes in headers, and no automatic way of recompiling dictionaries, we're bound to run into more issues (which may not lead to a crash and only manifest in strange results).

@wdconinc
Copy link
Member Author

cmake/modules/FindROOT.cmake causes the following dictionary command in ROOT_GENERATE_DICTIONARY:

add_custom_command(OUTPUT ${dictionary}.cxx ${dictionary}.h
  COMMAND ${ROOTCINT_EXECUTABLE} -cint -f  ${dictionary}.cxx 
          -c ${ARG_OPTIONS} ${includedirs} ${headerfiles} ${linkdefs}
  DEPENDS ${headerfiles} ${linkdefs})
/usr/local/root/pro/bin/rootcint -cint -f  remollDict.cxx -c \
  -I/home/wdconinc/git/remoll_develop/build/include \
  /home/wdconinc/git/remoll_develop/include/remollRunData.hh;/home/wdconinc/git/remoll_develop/include/remollTextFile.hh \
  /home/wdconinc/git/remoll_develop/include/remollLinkDef.h

The semicolon-separated list is what is given to cmake as the dependencies list, and cmake maybe wants a space-separated list?

We call this as:

ROOT_GENERATE_DICTIONARY(
    remollDict                         # path to dictionary to generate
    "include/remollRunData.hh"         # list of classes to process
    "include/remollTextFile.hh"
    LINKDEF "include/remollLinkDef.h"  # ROOT linkDef file
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant