-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
118 lines (108 loc) · 3.75 KB
/
CMakeLists.txt
File metadata and controls
118 lines (108 loc) · 3.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# Copyright (C) 1995-2019, Rene Brun and Fons Rademakers.
# All rights reserved.
#
# For the licensing terms see $ROOTSYS/LICENSE.
# For the list of contributors see $ROOTSYS/README/CREDITS.
############################################################################
# CMakeLists.txt file for building ROOT rootfit/histfactory package
# @author Pere Mato, CERN
############################################################################
# The ConfigParser can create HistFactory models from XML files. It uses TXML,
# so we won't build it if the xml build option is OFF.
if (xml)
set(HISTFACTORY_XML_HEADERS RooStats/HistFactory/ConfigParser.h)
set(HISTFACTORY_XML_SOURCES src/ConfigParser.cxx)
set(HISTFACTORY_XML_LIBRARIES XMLParser)
endif()
set (EXTRA_DICT_OPTS)
if (runtime_cxxmodules AND WIN32)
set (EXTRA_DICT_OPTS NO_CXXMODULE)
endif()
set(HISTFACTORY_HEADERS
RooStats/HistFactory/Detail/HistFactoryImpl.h
RooStats/HistFactory/FlexibleInterpVar.h
RooStats/HistFactory/HistFactoryException.h
RooStats/HistFactory/HistFactoryModelUtils.h
RooStats/HistFactory/HistFactoryNavigation.h
RooStats/HistFactory/HistoToWorkspaceFactoryFast.h
RooStats/HistFactory/LinInterpVar.h
RooStats/HistFactory/MakeModelAndMeasurementsFast.h
RooStats/HistFactory/Measurement.h
RooStats/HistFactory/ParamHistFunc.h
RooStats/HistFactory/PiecewiseInterpolation.h
RooStats/HistFactory/RooBarlowBeestonLL.h
)
ROOT_STANDARD_LIBRARY_PACKAGE(HistFactory
HEADERS
${HISTFACTORY_HEADERS}
${HISTFACTORY_XML_HEADERS}
SOURCES
src/FlexibleInterpVar.cxx
src/HistFactoryImpl.cxx
src/HistFactoryModelUtils.cxx
src/HistFactoryNavigation.cxx
src/HistoToWorkspaceFactoryFast.cxx
src/LinInterpVar.cxx
src/MakeModelAndMeasurementsFast.cxx
src/Measurement.cxx
src/ParamHistFunc.cxx
src/PiecewiseInterpolation.cxx
src/RooBarlowBeestonLL.cxx
${HISTFACTORY_XML_SOURCES}
DICTIONARY_OPTIONS
"-writeEmptyRootPCM"
LIBRARIES
RooBatchCompute
${HISTFACTORY_XML_LIBRARIES}
DEPENDENCIES
RooFit
RooFitCore
Tree
RIO
Hist
Matrix
MathCore
Graf
Gpad
RooStats
${EXTRA_DICT_OPTS}
)
# For recent clang, this can facilitate auto-vectorisation.
# In RooFit, the errno side effect is not needed, anyway:
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
target_compile_options(HistFactory PUBLIC -fno-math-errno)
endif()
# The hist2workspace executable uses the HistFactory::ConfigParser to read the
# XML model specification. The ConfigParser is only built when xml is ON, so we
# can't build hist2workspace without xml.
if(xml)
ROOT_EXECUTABLE(hist2workspace hist2workspace.cxx LIBRARIES HistFactory CMAKENOEXPORT)
target_compile_definitions(HistFactory PUBLIC HISTFACTORY_XML)
endif()
if(MSVC)
set(prepareHistFactory_script prepareHistFactory.bat)
else()
set(prepareHistFactory_script prepareHistFactory)
endif()
file(COPY config/${prepareHistFactory_script} DESTINATION ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
install(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${prepareHistFactory_script}
PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ
GROUP_EXECUTE GROUP_READ
WORLD_EXECUTE WORLD_READ
DESTINATION ${CMAKE_INSTALL_BINDIR})
set(RELATIVE_INC_HEADERS ${HISTFACTORY_HEADERS} ${HISTFACTORY_XML_HEADERS})
list(TRANSFORM RELATIVE_INC_HEADERS PREPEND inc/)
if(NOT CMAKE_VERSION VERSION_LESS "3.23.0")
target_sources(
HistFactory
PRIVATE
FILE_SET private_header_files
TYPE HEADERS
BASE_DIRS inc/
FILES
${RELATIVE_INC_HEADERS}
inc/LinkDef.h # seemingly not being used by ROOT_STL_PACKAGE call
inc/HFMsgService.h # not part of list above
)
endif()
ROOT_ADD_TEST_SUBDIRECTORY(test)