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

CMake Improvements #14

Open
kkauder opened this issue Jun 29, 2022 · 1 comment
Open

CMake Improvements #14

kkauder opened this issue Jun 29, 2022 · 1 comment

Comments

@kkauder
Copy link

kkauder commented Jun 29, 2022

  1. When trying to compile against ROOT built with c++14 and up (as is necessary for the latest version), the build crashes because the version is fixed to c++11. cmake can actually pick up the required standard for root, it just requires a slightly more modern syntax
    a) In all subdirectories, replace
target_link_libraries( xyz ${ROOT_LIBRARIES} )

with

target_link_libraries( xyz ROOT::Core ROOT::Rint ROOT::RIO ROOT::RooFit ROOT::MathMore ROOT::EG ROOT::GenVector )

The list can maybe be shortened and it's annoying to have to put it together by trial and error, but it's more robust for various environments
b) Something in the jpacPhoto cmake configurations is a bit off, so in order to pick up the dependence, add one line:

    add_library( jpacBox SHARED ${BOX_INC} ${BOX_SRC} )
    target_link_libraries( jpacBox ROOT::Core )
  1. You need a version check on boost. The old version at BNL (I think 1.53) is too old for boost/math/quadrature/gauss_kronrod.hpp and breaks.

I have fixes for 1), I can send them to you. I'll try and address 2) by finding a better boost in my system :)

@dglazier
Copy link
Owner

Thanks very much for pointing this out, it is very helpful. I will make the changes next week.

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

2 participants