Skip to content
Snippets Groups Projects
Commit 903b28c0 authored by Scott Snyder's avatar Scott Snyder Committed by Frank Winklmeier
Browse files

TrkVertexSeedFinderUtils: Fix dynamic loading issue in unit tests.

TrkVertexSeedFinderUtils: Fix dynamic loading issue in unit tests.

A standalong unit test binary may need to be build with ENABLE_EXPORTS
if it loads Gaudi components.
Otherwise, the loaded component may bind to the wrong vtable instance.

Fixes test failures seen in the clang17 build.
parent bf54abc5
No related branches found
No related tags found
No related merge requests found
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( TrkVertexSeedFinderUtils )
......@@ -35,6 +35,9 @@ atlas_add_test( NewtonTrkDistanceFinder_test
TrkEventPrimitives TrkVertexSeedFinderUtilsLib
LOG_IGNORE_PATTERN "reading the map|field map" )
# Needed in order to properly load Gaudi components from a standalone binary.
set_target_properties( TrkVertexSeedFinderUtils_NewtonTrkDistanceFinder_test PROPERTIES ENABLE_EXPORTS True )
atlas_add_test( Trk2dDistanceSeeder_test
SOURCES test/Trk2dDistanceSeeder_test.cxx
src/Trk2dDistanceSeeder.cxx
......@@ -46,6 +49,9 @@ atlas_add_test( Trk2dDistanceSeeder_test
TrkVertexSeedFinderUtilsLib
LOG_IGNORE_PATTERN "reading the map|field map" )
# Needed in order to properly load Gaudi components from a standalone binary.
set_target_properties( TrkVertexSeedFinderUtils_Trk2dDistanceSeeder_test PROPERTIES ENABLE_EXPORTS True )
atlas_add_test( SeedNewtonTrkDistanceFinder_test
SOURCES test/SeedNewtonTrkDistanceFinder_test.cxx
......@@ -90,5 +96,8 @@ atlas_add_test( Mode3dTo1dFinder_test
LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools CxxUtils GaudiKernel TrkParameters
TrkVertexSeedFinderUtilsLib )
# Needed in order to properly load Gaudi components from a standalone binary.
set_target_properties( TrkVertexSeedFinderUtils_Mode3dTo1dFinder_test PROPERTIES ENABLE_EXPORTS True )
# Install files from the package.
atlas_install_joboptions( share/*.py share/*.txt )
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment