Skip to content

Commit 91c8349

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 33f0cd1 commit 91c8349

File tree

12 files changed

+648
-358
lines changed

12 files changed

+648
-358
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: 39 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -22,27 +22,31 @@ if (runtime_cxxmodules AND WIN32)
2222
set (EXTRA_DICT_OPTS NO_CXXMODULE)
2323
endif()
2424

25+
set(HISTFACTORY_HEADERS
26+
RooStats/HistFactory/Asimov.h
27+
RooStats/HistFactory/Channel.h
28+
RooStats/HistFactory/Data.h
29+
RooStats/HistFactory/Detail/HistFactoryImpl.h
30+
RooStats/HistFactory/FlexibleInterpVar.h
31+
RooStats/HistFactory/HistFactoryException.h
32+
RooStats/HistFactory/HistFactoryModelUtils.h
33+
RooStats/HistFactory/HistFactoryNavigation.h
34+
RooStats/HistFactory/HistoToWorkspaceFactoryFast.h
35+
RooStats/HistFactory/HistRef.h
36+
RooStats/HistFactory/LinInterpVar.h
37+
RooStats/HistFactory/MakeModelAndMeasurementsFast.h
38+
RooStats/HistFactory/Measurement.h
39+
RooStats/HistFactory/ParamHistFunc.h
40+
RooStats/HistFactory/PiecewiseInterpolation.h
41+
RooStats/HistFactory/PreprocessFunction.h
42+
RooStats/HistFactory/RooBarlowBeestonLL.h
43+
RooStats/HistFactory/Sample.h
44+
RooStats/HistFactory/Systematics.h
45+
)
46+
2547
ROOT_STANDARD_LIBRARY_PACKAGE(HistFactory
2648
HEADERS
27-
RooStats/HistFactory/Asimov.h
28-
RooStats/HistFactory/Channel.h
29-
RooStats/HistFactory/Data.h
30-
RooStats/HistFactory/Detail/HistFactoryImpl.h
31-
RooStats/HistFactory/FlexibleInterpVar.h
32-
RooStats/HistFactory/HistFactoryException.h
33-
RooStats/HistFactory/HistFactoryModelUtils.h
34-
RooStats/HistFactory/HistFactoryNavigation.h
35-
RooStats/HistFactory/HistoToWorkspaceFactoryFast.h
36-
RooStats/HistFactory/HistRef.h
37-
RooStats/HistFactory/LinInterpVar.h
38-
RooStats/HistFactory/MakeModelAndMeasurementsFast.h
39-
RooStats/HistFactory/Measurement.h
40-
RooStats/HistFactory/ParamHistFunc.h
41-
RooStats/HistFactory/PiecewiseInterpolation.h
42-
RooStats/HistFactory/PreprocessFunction.h
43-
RooStats/HistFactory/RooBarlowBeestonLL.h
44-
RooStats/HistFactory/Sample.h
45-
RooStats/HistFactory/Systematics.h
49+
${HISTFACTORY_HEADERS}
4650
${HISTFACTORY_XML_HEADERS}
4751
SOURCES
4852
src/Asimov.cxx
@@ -109,4 +113,20 @@ install(FILES ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${prepareHistFactory_script}
109113
WORLD_EXECUTE WORLD_READ
110114
DESTINATION ${CMAKE_INSTALL_BINDIR})
111115

116+
set(RELATIVE_INC_HEADERS ${HISTFACTORY_HEADERS} ${HISTFACTORY_XML_HEADERS})
117+
list(TRANSFORM RELATIVE_INC_HEADERS PREPEND inc/)
118+
if(NOT CMAKE_VERSION VERSION_LESS "3.23.0")
119+
target_sources(
120+
HistFactory
121+
PRIVATE
122+
FILE_SET private_header_files
123+
TYPE HEADERS
124+
BASE_DIRS inc/
125+
FILES
126+
${RELATIVE_INC_HEADERS}
127+
inc/LinkDef.h # seemingly not being used by ROOT_STL_PACKAGE call
128+
inc/HFMsgService.h # not part of list above
129+
)
130+
endif()
131+
112132
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()

0 commit comments

Comments
 (0)