Skip to content

Commit

Permalink
[cmake] Make unfold optional so it can be disabled:
Browse files Browse the repository at this point in the history
It is GPL licensed and ROOT binaries must not have it enabled.
  • Loading branch information
Axel-Naumann committed Sep 27, 2023
1 parent e251a3a commit 3d87d7d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
8 changes: 7 additions & 1 deletion cmake/modules/RootBuildOptions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ ROOT_BUILD_OPTION(tmva-sofie OFF "Build TMVA with support for sofie - fast infer
ROOT_BUILD_OPTION(tmva-pymva ON "Enable support for Python in TMVA (requires numpy)")
ROOT_BUILD_OPTION(tmva-rmva OFF "Enable support for R in TMVA")
ROOT_BUILD_OPTION(spectrum ON "Enable support for TSpectrum")
ROOT_BUILD_OPTION(unfold OFF "Enable the unfold package [GPL]")
ROOT_BUILD_OPTION(unuran OFF "Enable support for UNURAN (package for generating non-uniform random numbers) [GPL]")
ROOT_BUILD_OPTION(uring OFF "Enable support for io_uring (requires liburing and Linux kernel >= 5.1)")
ROOT_BUILD_OPTION(vc OFF "Enable support for Vc (SIMD Vector Classes for C++)")
Expand Down Expand Up @@ -400,10 +401,15 @@ if(tmva-gpu)
endif(tmva-gpu)

if(cudnn AND NOT cuda)
message(STATUS "Cannot select cudnn without selecting cuda or tmva-gpu. Option is ignored")
message(STATUS "Cannot enable cudnn without enabling cuda or tmva-gpu: cudnn is disabled.")
set(cudnn OFF)
endif()

if(unfold AND NOT xml)
message(STATUS "Cannot enable unfold without enabling xml: unfold is disabled.")
set(unfold OFF)
endif()

if (NOT builtin_cling)
if (builtin_clang OR builtin_llvm)
message(WARNING "No need to build internal llvm or clang. Consider turning builtin_clang=Off and builtin_llvm=Off")
Expand Down
2 changes: 1 addition & 1 deletion hist/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ if (spectrum)
add_subdirectory(spectrum)
add_subdirectory(spectrumpainter) # special CMakeLists.txt
endif()
if(xml)
if(unfold)
add_subdirectory(unfold)
endif()
if(CMAKE_Fortran_COMPILER)
Expand Down
7 changes: 5 additions & 2 deletions tutorials/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,11 @@ endif()

if(NOT ROOT_xml_FOUND)
set(xml_veto xml/*.C
histfactory/*.C # histfactory requires xml
unfold/*.C) # unfold requires xml
histfactory/*.C) # histfactory requires xml
endif()

if(NOT ROOT_unfold_FOUND)
set(xml_veto unfold/*.C)
endif()

if(NOT ROOT_mpi_FOUND)
Expand Down

0 comments on commit 3d87d7d

Please sign in to comment.