Skip to content

Commit 025f24a

Browse files
committed
[RF] Add RooFit header to private CMake filesets
To improve IDE experience. See also root-project#18419 and root-project#20515
1 parent c42bcea commit 025f24a

File tree

12 files changed

+647
-352
lines changed

12 files changed

+647
-352
lines changed

roofit/batchcompute/CMakeLists.txt

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,31 @@ set(shared_object_sources src/RooBatchCompute.cxx src/ComputeFunctions.cxx)
1818
ROOT_LINKER_LIBRARY(RooBatchCompute_GENERIC ${shared_object_sources} TYPE SHARED DEPENDENCIES RooBatchCompute)
1919
target_compile_options(RooBatchCompute_GENERIC PRIVATE ${common-flags} -DRF_ARCH=GENERIC)
2020

21+
if(NOT CMAKE_VERSION VERSION_LESS "3.23.0")
22+
target_sources(
23+
RooBatchCompute
24+
PRIVATE
25+
FILE_SET private_header_files
26+
TYPE HEADERS
27+
BASE_DIRS res/
28+
FILES
29+
res/RooBatchCompute.h
30+
)
31+
target_sources(
32+
RooBatchCompute_GENERIC
33+
PRIVATE
34+
FILE_SET private_header_files
35+
TYPE HEADERS
36+
BASE_DIRS src/ res/
37+
FILES
38+
res/RooBatchComputeTypes.h
39+
res/RooHeterogeneousMath.h
40+
res/RooNaNPacker.h
41+
src/Batches.h
42+
src/RooVDTHeaders.h
43+
)
44+
endif()
45+
2146
# Windows platform and ICC compiler need special code and testing, thus the feature has not been implemented yet for these.
2247
if (ROOT_PLATFORM MATCHES "linux|macosx" AND CMAKE_SYSTEM_PROCESSOR MATCHES x86_64 AND CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
2348

@@ -43,6 +68,17 @@ if (cuda)
4368
set(shared_object_sources_cu src/RooBatchCompute.cu src/ComputeFunctions.cu src/CudaInterface.cu)
4469
ROOT_LINKER_LIBRARY(RooBatchCompute_CUDA ${shared_object_sources_cu} TYPE SHARED DEPENDENCIES RooBatchCompute)
4570
target_compile_options(RooBatchCompute_CUDA PRIVATE -lineinfo --expt-relaxed-constexpr)
71+
if(NOT CMAKE_VERSION VERSION_LESS "3.23.0")
72+
target_sources(
73+
RooBatchCompute_CUDA
74+
PRIVATE
75+
FILE_SET private_header_files
76+
TYPE HEADERS
77+
BASE_DIRS src/
78+
FILES
79+
src/CudaInterface.h
80+
)
81+
endif()
4682
endif()
4783

4884
if(vdt OR builtin_vdt)

roofit/codegen/CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,16 @@ ROOT_STANDARD_LIBRARY_PACKAGE(RooFitCodegen
2121
RooFitCore
2222
HistFactory
2323
)
24+
25+
if(NOT CMAKE_VERSION VERSION_LESS "3.23.0")
26+
target_sources(
27+
RooFitCodegen
28+
PRIVATE
29+
FILE_SET private_header_files
30+
TYPE HEADERS
31+
BASE_DIRS inc/
32+
FILES
33+
# LinkDef.h # empty, not being used by ROOT_STL_PACKAGE call
34+
inc/RooFit/CodegenImpl.h
35+
)
36+
endif()

roofit/histfactory/CMakeLists.txt

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,24 @@ if (runtime_cxxmodules AND WIN32)
2222
set (EXTRA_DICT_OPTS NO_CXXMODULE)
2323
endif()
2424

25+
set(HISTFACTORY_HEADERS
26+
RooStats/HistFactory/Detail/HistFactoryImpl.h
27+
RooStats/HistFactory/FlexibleInterpVar.h
28+
RooStats/HistFactory/HistFactoryException.h
29+
RooStats/HistFactory/HistFactoryModelUtils.h
30+
RooStats/HistFactory/HistFactoryNavigation.h
31+
RooStats/HistFactory/HistoToWorkspaceFactoryFast.h
32+
RooStats/HistFactory/LinInterpVar.h
33+
RooStats/HistFactory/MakeModelAndMeasurementsFast.h
34+
RooStats/HistFactory/Measurement.h
35+
RooStats/HistFactory/ParamHistFunc.h
36+
RooStats/HistFactory/PiecewiseInterpolation.h
37+
RooStats/HistFactory/RooBarlowBeestonLL.h
38+
)
39+
2540
ROOT_STANDARD_LIBRARY_PACKAGE(HistFactory
2641
HEADERS
27-
RooStats/HistFactory/Detail/HistFactoryImpl.h
28-
RooStats/HistFactory/FlexibleInterpVar.h
29-
RooStats/HistFactory/HistFactoryException.h
30-
RooStats/HistFactory/HistFactoryModelUtils.h
31-
RooStats/HistFactory/HistFactoryNavigation.h
32-
RooStats/HistFactory/HistoToWorkspaceFactoryFast.h
33-
RooStats/HistFactory/LinInterpVar.h
34-
RooStats/HistFactory/MakeModelAndMeasurementsFast.h
35-
RooStats/HistFactory/Measurement.h
36-
RooStats/HistFactory/ParamHistFunc.h
37-
RooStats/HistFactory/PiecewiseInterpolation.h
38-
RooStats/HistFactory/RooBarlowBeestonLL.h
42+
${HISTFACTORY_HEADERS}
3943
${HISTFACTORY_XML_HEADERS}
4044
SOURCES
4145
src/FlexibleInterpVar.cxx
@@ -95,4 +99,20 @@ install(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${prepareHistFactory_script}
9599
WORLD_EXECUTE WORLD_READ
96100
DESTINATION ${CMAKE_INSTALL_BINDIR})
97101

102+
set(RELATIVE_INC_HEADERS ${HISTFACTORY_HEADERS} ${HISTFACTORY_XML_HEADERS})
103+
list(TRANSFORM RELATIVE_INC_HEADERS PREPEND inc/)
104+
if(NOT CMAKE_VERSION VERSION_LESS "3.23.0")
105+
target_sources(
106+
HistFactory
107+
PRIVATE
108+
FILE_SET private_header_files
109+
TYPE HEADERS
110+
BASE_DIRS inc/
111+
FILES
112+
${RELATIVE_INC_HEADERS}
113+
inc/LinkDef.h # seemingly not being used by ROOT_STL_PACKAGE call
114+
inc/HFMsgService.h # not part of list above
115+
)
116+
endif()
117+
98118
ROOT_ADD_TEST_SUBDIRECTORY(test)

roofit/hs3/CMakeLists.txt

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,14 @@
99
# @author Carsten Burgard, CERN
1010
############################################################################
1111

12+
set (ROOFITHS3_HEADERS
13+
RooFitHS3/JSONIO.h
14+
RooFitHS3/RooJSONFactoryWSTool.h
15+
)
16+
1217
ROOT_STANDARD_LIBRARY_PACKAGE(RooFitHS3
1318
HEADERS
14-
RooFitHS3/JSONIO.h
15-
RooFitHS3/RooJSONFactoryWSTool.h
19+
${ROOFITHS3_HEADERS}
1620
SOURCES
1721
src/Domains.cxx
1822
src/JSONIO.cxx
@@ -29,4 +33,23 @@ ROOT_STANDARD_LIBRARY_PACKAGE(RooFitHS3
2933
RooFitJSONInterface
3034
)
3135

36+
set(RELATIVE_INC_HEADERS ${ROOFITHS3_HEADERS})
37+
list(TRANSFORM RELATIVE_INC_HEADERS PREPEND inc/)
38+
if(NOT CMAKE_VERSION VERSION_LESS "3.23.0")
39+
target_sources(
40+
RooFitHS3
41+
PRIVATE
42+
FILE_SET private_header_files
43+
TYPE HEADERS
44+
BASE_DIRS inc/ src/
45+
FILES
46+
${RELATIVE_INC_HEADERS}
47+
# LinkDef.h # seemingly not being used by ROOT_STL_PACKAGE call
48+
src/Domains.h
49+
src/JSONIOUtils.h
50+
src/static_execute.h
51+
)
52+
endif()
53+
54+
3255
ROOT_ADD_TEST_SUBDIRECTORY(test)

roofit/jsoninterface/CMakeLists.txt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,19 @@ ROOT_STANDARD_LIBRARY_PACKAGE(RooFitJSONInterface
2323

2424
target_link_libraries(RooFitJSONInterface PRIVATE nlohmann_json::nlohmann_json)
2525

26+
if(NOT CMAKE_VERSION VERSION_LESS "3.23.0")
27+
target_sources(
28+
RooFitJSONInterface
29+
PRIVATE
30+
FILE_SET private_header_files
31+
TYPE HEADERS
32+
BASE_DIRS inc src
33+
FILES
34+
src/RYMLParser.h
35+
src/JSONParser.h
36+
# LinkDef.h # is empty, not being used in ROOT_STL_PACKAGE call
37+
inc/RooFit/Detail/JSONInterface.h
38+
)
39+
endif()
40+
2641
ROOT_ADD_TEST_SUBDIRECTORY(test)

roofit/multiprocess/CMakeLists.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,31 @@ target_include_directories(RooFitMultiProcess
3030

3131
target_link_libraries(RooFitMultiProcess PRIVATE nlohmann_json::nlohmann_json)
3232

33+
if(NOT CMAKE_VERSION VERSION_LESS "3.23.0")
34+
target_sources(
35+
RooFitMultiProcess
36+
PRIVATE
37+
FILE_SET private_header_files
38+
TYPE HEADERS
39+
BASE_DIRS inc/ res/ src/
40+
FILES
41+
inc/RooFit/MultiProcess/Config.h
42+
inc/RooFit/MultiProcess/HeatmapAnalyzer.h
43+
inc/RooFit/MultiProcess/types.h
44+
res/RooFit/MultiProcess/JobManager.h
45+
res/RooFit/MultiProcess/Job.h
46+
res/RooFit/MultiProcess/Messenger.h
47+
res/RooFit/MultiProcess/Messenger_decl.h
48+
res/RooFit/MultiProcess/ProcessManager.h
49+
res/RooFit/MultiProcess/ProcessTimer.h
50+
res/RooFit/MultiProcess/Queue.h
51+
res/RooFit/MultiProcess/util.h
52+
res/RooFit/MultiProcess/worker.h
53+
src/FIFOQueue.h
54+
src/PriorityQueue.h
55+
)
56+
endif()
57+
3358
ROOT_ADD_TEST_SUBDIRECTORY(test)
3459

3560
ROOT_INSTALL_HEADERS()

roofit/roofit/CMakeLists.txt

Lines changed: 85 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# For the list of contributors see $ROOTSYS/README/CREDITS.
66

77
############################################################################
8-
# CMakeLists.txt file for building ROOT rootfit package
8+
# CMakeLists.txt file for building ROOT RooFit package
99
# @author Pere Mato, CERN
1010
############################################################################
1111

@@ -14,72 +14,76 @@ if (runtime_cxxmodules AND WIN32)
1414
set (EXTRA_DICT_OPTS NO_CXXMODULE)
1515
endif()
1616

17+
set(ROOFIT_HEADERS
18+
Roo2DKeysPdf.h
19+
RooArgusBG.h
20+
RooBCPEffDecay.h
21+
RooBCPGenDecay.h
22+
RooBDecay.h
23+
RooBernstein.h
24+
RooBifurGauss.h
25+
RooBlindTools.h
26+
RooBMixDecay.h
27+
RooBreitWigner.h
28+
RooBukinPdf.h
29+
RooCBShape.h
30+
RooCrystalBall.h
31+
RooCFunction1Binding.h
32+
RooCFunction2Binding.h
33+
RooCFunction3Binding.h
34+
RooCFunction4Binding.h
35+
RooChebychev.h
36+
RooChi2MCSModule.h
37+
RooChiSquarePdf.h
38+
RooDecay.h
39+
RooDstD0BG.h
40+
RooExponential.h
41+
RooLegacyExpPoly.h
42+
RooPowerSum.h
43+
RooFunctor1DBinding.h
44+
RooFunctorBinding.h
45+
RooGamma.h
46+
RooGaussExpTails.h
47+
RooGaussian.h
48+
RooGaussModel.h
49+
RooGExpModel.h
50+
RooHistConstraint.h
51+
RooIntegralMorph.h
52+
RooJeffreysPrior.h
53+
RooKeysPdf.h
54+
RooLagrangianMorphFunc.h
55+
RooLandau.h
56+
RooLognormal.h
57+
RooMathCoreReg.h
58+
RooMomentMorphFunc.h
59+
RooMomentMorphFuncND.h
60+
RooMomentMorph.h
61+
RooMultiBinomial.h
62+
RooNDKeysPdf.h
63+
RooNonCPEigenDecay.h
64+
RooNovosibirsk.h
65+
RooParametricStepFunction.h
66+
RooParamHistFunc.h
67+
RooPoisson.h
68+
RooPolynomial.h
69+
RooPyBind.h
70+
RooSpline.h
71+
RooStepFunction.h
72+
RooTFnBinding.h
73+
RooTFnPdfBinding.h
74+
RooTMathReg.h
75+
RooUnblindCPAsymVar.h
76+
RooUnblindOffset.h
77+
RooUnblindPrecision.h
78+
RooUnblindUniform.h
79+
RooUniform.h
80+
RooVoigtian.h
81+
RooJohnson.h
82+
)
83+
1784
ROOT_STANDARD_LIBRARY_PACKAGE(RooFit
1885
HEADERS
19-
Roo2DKeysPdf.h
20-
RooArgusBG.h
21-
RooBCPEffDecay.h
22-
RooBCPGenDecay.h
23-
RooBDecay.h
24-
RooBernstein.h
25-
RooBifurGauss.h
26-
RooBlindTools.h
27-
RooBMixDecay.h
28-
RooBreitWigner.h
29-
RooBukinPdf.h
30-
RooCBShape.h
31-
RooCrystalBall.h
32-
RooCFunction1Binding.h
33-
RooCFunction2Binding.h
34-
RooCFunction3Binding.h
35-
RooCFunction4Binding.h
36-
RooChebychev.h
37-
RooChi2MCSModule.h
38-
RooChiSquarePdf.h
39-
RooDecay.h
40-
RooDstD0BG.h
41-
RooExponential.h
42-
RooLegacyExpPoly.h
43-
RooPowerSum.h
44-
RooFunctor1DBinding.h
45-
RooFunctorBinding.h
46-
RooGamma.h
47-
RooGaussExpTails.h
48-
RooGaussian.h
49-
RooGaussModel.h
50-
RooGExpModel.h
51-
RooHistConstraint.h
52-
RooIntegralMorph.h
53-
RooJeffreysPrior.h
54-
RooKeysPdf.h
55-
RooLagrangianMorphFunc.h
56-
RooLandau.h
57-
RooLognormal.h
58-
RooMathCoreReg.h
59-
RooMomentMorphFunc.h
60-
RooMomentMorphFuncND.h
61-
RooMomentMorph.h
62-
RooMultiBinomial.h
63-
RooNDKeysPdf.h
64-
RooNonCPEigenDecay.h
65-
RooNovosibirsk.h
66-
RooParametricStepFunction.h
67-
RooParamHistFunc.h
68-
RooPoisson.h
69-
RooPolynomial.h
70-
RooPyBind.h
71-
RooSpline.h
72-
RooStepFunction.h
73-
RooTFnBinding.h
74-
RooTFnPdfBinding.h
75-
RooTMathReg.h
76-
RooUnblindCPAsymVar.h
77-
RooUnblindOffset.h
78-
RooUnblindPrecision.h
79-
RooUnblindUniform.h
80-
RooUniform.h
81-
RooVoigtian.h
82-
RooJohnson.h
86+
${ROOFIT_HEADERS}
8387
SOURCES
8488
src/Roo2DKeysPdf.cxx
8589
src/RooArgusBG.cxx
@@ -166,4 +170,20 @@ if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
166170
target_compile_options(RooFit PUBLIC -fno-math-errno)
167171
endif()
168172

173+
set(RELATIVE_INC_HEADERS ${ROOFIT_HEADERS})
174+
list(TRANSFORM RELATIVE_INC_HEADERS PREPEND inc/)
175+
if(NOT CMAKE_VERSION VERSION_LESS "3.23.0")
176+
target_sources(
177+
RooFit
178+
PRIVATE
179+
FILE_SET private_header_files
180+
TYPE HEADERS
181+
BASE_DIRS inc/ src/
182+
FILES
183+
${RELATIVE_INC_HEADERS}
184+
inc/LinkDef1.h
185+
src/RooFit/Detail/Algorithms.h
186+
)
187+
endif()
188+
169189
ROOT_ADD_TEST_SUBDIRECTORY(test)

0 commit comments

Comments
 (0)