Skip to content

Commit 8aa112f

Browse files
committed
[RF] Avoid unnecessary linking against libSmatrix in RooFitCore
1 parent f1473cd commit 8aa112f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

roofit/roofitcore/CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,6 @@ ROOT_STANDARD_LIBRARY_PACKAGE(RooFitCore
459459
RIO
460460
MathCore
461461
Foam
462-
Smatrix
463462
${EXTRA_DEPENDENCIES}
464463
LINKDEF
465464
inc/LinkDef.h
@@ -490,6 +489,13 @@ endif()
490489

491490
target_include_directories(RooFitCore PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/res>)
492491

492+
# The SMatrix package is header-only, but it's only exposed via the Smatrix
493+
# target, which is a shared library that also includes the dictionaries. For
494+
# RooFit, we are not interested in them, and want to avoid a dependency of the
495+
# RooFitCore library on the Smatrix dictionary library. Therefore, we just add
496+
# the include path.
497+
target_include_directories(RooFitCore PRIVATE $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/math/smatrix/inc>)
498+
493499
# For recent clang, this can facilitate auto-vectorisation.
494500
# In RooFit, the errno side effect is not needed, anyway:
495501
if("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")

0 commit comments

Comments
 (0)