LDMX-Software / fire

Event-by-event processing framework using HDF5 and C++17
https://ldmx-software.github.io/fire/
GNU General Public License v3.0
1 stars 0 forks source link

Use cmake_dependent_option for root reading #34

Closed tomeichlersmith closed 2 years ago

tomeichlersmith commented 2 years ago

Describe the solution you'd like use cmake_dependent_option to have the fire_USE_ROOT option only available if ROOT is found.

Describe alternatives you've considered Current solution is best known alternative I believe.

Additional context Found while parsing EUDAQ's cmake infrastructre

include(CMakeDependentOption)
find_package(Qt5Widgets CONFIG)

cmake_dependent_option(EUDAQ_BUILD_GUI "Compile GUI executables (requires QT5)" ON
  "Qt5Widgets_FOUND" OFF)

if(NOT EUDAQ_BUILD_GUI)
    message(STATUS "GUIs of executables (euRun, euLog) are NOT to be built (EUDAQ_BUILD_GUI=OFF)")
  return()
endif()
message(STATUS "GUIs of executables (euRun, euLog) are to be built (EUDAQ_BUILD_GUI=ON)")