Skip to content

CMake Improvements #14

@kkauder

Description

@kkauder
  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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions