From 1b1a554a460c5f54f57a90d06bbd4bb1c877ca89 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <frank.winklmeier@cern.ch>
Date: Wed, 16 Sep 2020 14:38:17 +0000
Subject: [PATCH] LumiBlockComps: cmake fixes

Add missing TestTools dependency for test executables.
---
 Database/AtlasSealCLHEP/CMakeLists.txt        | 20 ++-----
 Database/CondDBObjects/CMakeLists.txt         | 12 +----
 .../DBReplicaSvc/CMakeLists.txt               | 19 +------
 Database/CoolConvUtilities/CMakeLists.txt     | 10 +---
 Database/CoolLumiUtilities/CMakeLists.txt     | 54 +++++--------------
 .../EventIndexProducer/CMakeLists.txt         |  9 +---
 Database/FileStager/CMakeLists.txt            | 23 ++------
 Database/PersistentDataModel/CMakeLists.txt   | 21 ++------
 .../CMakeLists.txt                            | 16 ++----
 .../PersistentDataModelTPCnv/CMakeLists.txt   | 19 ++-----
 Database/RDBAccessSvc/CMakeLists.txt          | 14 +----
 Database/RegistrationServices/CMakeLists.txt  | 25 ++-------
 Database/TPTools/CMakeLists.txt               | 24 ++-------
 LumiBlock/LumiBlockComps/CMakeLists.txt       |  6 +--
 14 files changed, 53 insertions(+), 219 deletions(-)

diff --git a/Database/AtlasSealCLHEP/CMakeLists.txt b/Database/AtlasSealCLHEP/CMakeLists.txt
index d607381d59e..478dfa0ef28 100644
--- a/Database/AtlasSealCLHEP/CMakeLists.txt
+++ b/Database/AtlasSealCLHEP/CMakeLists.txt
@@ -1,33 +1,23 @@
-################################################################################
-# Package: AtlasSealCLHEP
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( AtlasSealCLHEP )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Database/AthenaPOOL/AthenaPoolServices )
-
 # External dependencies:
 find_package( CLHEP )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
 atlas_add_library( AtlasSealCLHEP
                    src/OldCLHEPStreamers.cxx
                    PUBLIC_HEADERS AtlasSealCLHEP
                    INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaPoolServicesLib
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} )
+                   LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaPoolServicesLib )
 
 atlas_add_dictionary( AtlasSealCLHEPDict
                       AtlasSealCLHEP/AtlasSealCLHEPDict.h
                       AtlasSealCLHEP/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasSealCLHEP )
+                      LINK_LIBRARIES AtlasSealCLHEP )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
@@ -36,6 +26,4 @@ atlas_install_joboptions( share/*.py )
 atlas_add_test( OldCLHEPStreamers_test
                 SOURCES
                 test/OldCLHEPStreamers_test.cxx
-                INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} AtlasSealCLHEP )
-
+                LINK_LIBRARIES AtlasSealCLHEP )
diff --git a/Database/CondDBObjects/CMakeLists.txt b/Database/CondDBObjects/CMakeLists.txt
index ca3b434aa4a..c6b1e9d7934 100644
--- a/Database/CondDBObjects/CMakeLists.txt
+++ b/Database/CondDBObjects/CMakeLists.txt
@@ -1,18 +1,10 @@
-################################################################################
-# Package: CondDBObjects
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CondDBObjects )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          GaudiKernel )
-
 # Component(s) in the package:
 atlas_add_library( CondDBObjects
                    src/*.cxx
                    PUBLIC_HEADERS CondDBObjects
-                   LINK_LIBRARIES GaudiKernel )
-
+                   LINK_LIBRARIES AthenaKernel GaudiKernel )
diff --git a/Database/ConnectionManagement/DBReplicaSvc/CMakeLists.txt b/Database/ConnectionManagement/DBReplicaSvc/CMakeLists.txt
index be765f8772d..99d2723e485 100644
--- a/Database/ConnectionManagement/DBReplicaSvc/CMakeLists.txt
+++ b/Database/ConnectionManagement/DBReplicaSvc/CMakeLists.txt
@@ -1,30 +1,15 @@
-################################################################################
-# Package: DBReplicaSvc
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( DBReplicaSvc )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Tools/PathResolver )
-
-# External dependencies:
-find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
-
 atlas_add_library( DBReplicaSvcLib
                    INTERFACE
                    PUBLIC_HEADERS DBReplicaSvc
-                   INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
                    LINK_LIBRARIES GaudiKernel )
 
 # Component(s) in the package:
 atlas_add_component( DBReplicaSvc
                      src/DBReplicaSvc.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CORAL_LIBRARIES} GaudiKernel AthenaBaseComps PathResolver )
-
+                     LINK_LIBRARIES AthenaBaseComps DBReplicaSvcLib PathResolver )
diff --git a/Database/CoolConvUtilities/CMakeLists.txt b/Database/CoolConvUtilities/CMakeLists.txt
index 62a7d7ea950..2736456d429 100644
--- a/Database/CoolConvUtilities/CMakeLists.txt
+++ b/Database/CoolConvUtilities/CMakeLists.txt
@@ -1,16 +1,8 @@
-################################################################################
-# Package: CoolConvUtilities
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CoolConvUtilities )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Database/APR/FileCatalog
-                          Database/APR/PersistencySvc
-                          Database/CoraCool )
-
 # External dependencies:
 find_package( COOL COMPONENTS CoolKernel CoolApplication )
 find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
diff --git a/Database/CoolLumiUtilities/CMakeLists.txt b/Database/CoolLumiUtilities/CMakeLists.txt
index bc98809cbbf..5513a9f203f 100644
--- a/Database/CoolLumiUtilities/CMakeLists.txt
+++ b/Database/CoolLumiUtilities/CMakeLists.txt
@@ -1,95 +1,69 @@
-################################################################################
-# Package: CoolLumiUtilities
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( CoolLumiUtilities )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/StoreGate
-                          GaudiKernel
-                          PRIVATE
-                          AtlasTest/TestTools
-                          Database/AthenaPOOL/AthenaPoolUtilities )
-
 # External dependencies:
 find_package( COOL COMPONENTS CoolKernel )
 find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
 atlas_add_library( CoolLumiUtilitiesLib
                    src/*.cxx
                    PUBLIC_HEADERS CoolLumiUtilities
                    INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel GaudiKernel StoreGateLib SGtests
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolUtilities )
+                   LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel AthenaPoolUtilities GaudiKernel
+                   PRIVATE_LINK_LIBRARIES CxxUtils PersistentDataModel StoreGateLib )
 
 atlas_add_component( CoolLumiUtilities
                      src/components/*.cxx
-                     INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests GaudiKernel AthenaPoolUtilities CoolLumiUtilitiesLib )
+                     LINK_LIBRARIES CoolLumiUtilitiesLib )
 
 atlas_add_dictionary( CoolLumiUtilitiesDict
                       CoolLumiUtilities/CoolLumiUtilitiesDict.h
                       CoolLumiUtilities/selection.xml
-                      INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests GaudiKernel AthenaPoolUtilities CoolLumiUtilitiesLib )
+                      LINK_LIBRARIES CoolLumiUtilitiesLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8})
 atlas_install_scripts( share/*.py )
 atlas_install_joboptions( share/*.txt )
 
-
 atlas_add_test( OnlineLumiCalibrationCondData_test
   SOURCES test/OnlineLumiCalibrationCondData_test.cxx
-  INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
-  LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests GaudiKernel AthenaPoolUtilities CoolLumiUtilitiesLib TestTools )
+  LINK_LIBRARIES CoolLumiUtilitiesLib CxxUtils )
 
 atlas_add_test( BunchGroupCondData_test
   SOURCES test/BunchGroupCondData_test.cxx
-  INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
-  LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests GaudiKernel AthenaPoolUtilities CoolLumiUtilitiesLib TestTools )
+  LINK_LIBRARIES CoolLumiUtilitiesLib )
 
 atlas_add_test( BunchLumisCondData_test
   SOURCES test/BunchLumisCondData_test.cxx
-  INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
-  LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests GaudiKernel AthenaPoolUtilities CoolLumiUtilitiesLib TestTools )
+  LINK_LIBRARIES CoolLumiUtilitiesLib )
 
 atlas_add_test( FillParamsCondData_test
   SOURCES test/FillParamsCondData_test.cxx
-  INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
-  LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests GaudiKernel AthenaPoolUtilities CoolLumiUtilitiesLib TestTools )
+  LINK_LIBRARIES CoolLumiUtilitiesLib )
 
 atlas_add_test( OnlineLumiCalibrationCondAlg_test
   SOURCES test/OnlineLumiCalibrationCondAlg_test.cxx
-  INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
-  LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests GaudiKernel AthenaPoolUtilities CoolLumiUtilitiesLib TestTools )
+  LINK_LIBRARIES CoolLumiUtilitiesLib CxxUtils TestTools )
 
 atlas_add_test( BunchGroupCondAlg_test
   SOURCES test/BunchGroupCondAlg_test.cxx
-  INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
-  LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests GaudiKernel AthenaPoolUtilities CoolLumiUtilitiesLib TestTools )
+  LINK_LIBRARIES CoolLumiUtilitiesLib PersistentDataModel TestTools )
 
 atlas_add_test( BunchLumisCondAlg_test
   SOURCES test/BunchLumisCondAlg_test.cxx
-  INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
-  LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests GaudiKernel AthenaPoolUtilities CoolLumiUtilitiesLib TestTools )
+  LINK_LIBRARIES CoolLumiUtilitiesLib CxxUtils PersistentDataModel TestTools )
 
 atlas_add_test( FillParamsCondAlg_test
   SOURCES test/FillParamsCondAlg_test.cxx
-  INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
-  LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} AthenaBaseComps AthenaKernel StoreGateLib SGtests GaudiKernel AthenaPoolUtilities CoolLumiUtilitiesLib TestTools )
-
+  LINK_LIBRARIES CoolLumiUtilitiesLib PersistentDataModel TestTools )
 
 atlas_add_test( OnlineLumiCalibrationCondAlgConfig_test
                 SCRIPT python -m CoolLumiUtilities.OnlineLumiCalibrationCondAlgConfig
-                 LOG_SELECT_PATTERN "ComponentAccumulator|^---|^IOVDbSvc" )
+                LOG_SELECT_PATTERN "ComponentAccumulator|^---|^IOVDbSvc" )
 
 atlas_add_test( FillParamsCondAlgConfig_test
                 SCRIPT python -m CoolLumiUtilities.FillParamsCondAlgConfig
diff --git a/Database/EventIndex/EventIndexProducer/CMakeLists.txt b/Database/EventIndex/EventIndexProducer/CMakeLists.txt
index cdba689ad20..2198b7f47d8 100644
--- a/Database/EventIndex/EventIndexProducer/CMakeLists.txt
+++ b/Database/EventIndex/EventIndexProducer/CMakeLists.txt
@@ -1,15 +1,8 @@
-################################################################################
-# Package: EventIndexProducer
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( EventIndexProducer )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Tools/PyJobTransforms
-                          Tools/PyJobTransformsCore )
-
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
 atlas_install_joboptions( share/*.py )
diff --git a/Database/FileStager/CMakeLists.txt b/Database/FileStager/CMakeLists.txt
index b6850f4a9d9..a76e1cc02ab 100644
--- a/Database/FileStager/CMakeLists.txt
+++ b/Database/FileStager/CMakeLists.txt
@@ -1,21 +1,10 @@
-################################################################################
-# Package: FileStager
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( FileStager )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel )
-
 # External dependencies:
-find_package( ROOT COMPONENTS Hist Tree RIO Cint Core MathCore pthread MathMore Minuit Minuit2 Matrix Physics HistPainter Rint )
-find_package( Boost )
-
-# tag ROOTBasicLibs was not recognized in automatic conversion in cmt2cmake
-
-# tag ROOTSTLDictLibs was not recognized in automatic conversion in cmt2cmake
+find_package( ROOT COMPONENTS Hist Tree RIO Core )
 
 # Component(s) in the package:
 atlas_add_root_dictionary( FileStagerLib
@@ -28,18 +17,16 @@ atlas_add_library( FileStagerLib
                    src/*.cxx
                    ${FileStagerLibDictSource}
                    PUBLIC_HEADERS FileStager
-                   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
+                   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                    LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel )
 
 atlas_add_component( FileStager
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel FileStagerLib )
+                     LINK_LIBRARIES FileStagerLib )
 
 atlas_add_executable( StageMonitor
                       bin/StageMonitor.cxx
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel FileStagerLib )
+                      LINK_LIBRARIES FileStagerLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/Database/PersistentDataModel/CMakeLists.txt b/Database/PersistentDataModel/CMakeLists.txt
index aa67aa796a6..47c99af539a 100644
--- a/Database/PersistentDataModel/CMakeLists.txt
+++ b/Database/PersistentDataModel/CMakeLists.txt
@@ -1,19 +1,10 @@
-################################################################################
-# Package: PersistentDataModel
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( PersistentDataModel )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          Control/SGTools
-                          GaudiKernel )
-
 # External dependencies:
 find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 find_package( UUID )
 
 # Component(s) in the package:
@@ -21,13 +12,11 @@ atlas_add_library( PersistentDataModel
                    src/*.cxx
                    PUBLIC_HEADERS PersistentDataModel
                    INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
-                   PRIVATE_INCLUDE_DIRS ${UUID_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${CORAL_LIBRARIES} SGTools GaudiKernel
-                   PRIVATE_LINK_LIBRARIES ${UUID_LIBRARIES} ${ROOT_LIBRARIES} )
+                   PRIVATE_INCLUDE_DIRS ${UUID_INCLUDE_DIRS}
+                   LINK_LIBRARIES ${CORAL_LIBRARIES} AthenaKernel CxxUtils GaudiKernel
+                   PRIVATE_LINK_LIBRARIES ${UUID_LIBRARIES} SGTools )
 
 atlas_add_dictionary( PersistentDataModelDict
                       PersistentDataModel/PersistentDataModelDict.h
                       PersistentDataModel/selection.xml
-                      INCLUDE_DIRS ${UUID_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${UUID_LIBRARIES} ${CORAL_LIBRARIES} ${ROOT_LIBRARIES} SGTools GaudiKernel PersistentDataModel )
-
+                      LINK_LIBRARIES PersistentDataModel )
diff --git a/Database/PersistentDataModelAthenaPool/CMakeLists.txt b/Database/PersistentDataModelAthenaPool/CMakeLists.txt
index bd192e40362..9f19b5deba1 100644
--- a/Database/PersistentDataModelAthenaPool/CMakeLists.txt
+++ b/Database/PersistentDataModelAthenaPool/CMakeLists.txt
@@ -1,24 +1,14 @@
-################################################################################
-# Package: PersistentDataModelAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( PersistentDataModelAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Database/PersistentDataModel
-                          Database/PersistentDataModelTPCnv )
-
 # External dependencies:
-find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
+find_package( CORAL COMPONENTS CoralBase )
 
 # Component(s) in the package:
 atlas_add_poolcnv_library( PersistentDataModelAthenaPoolPoolCnv
                            src/*.cxx
                            FILES PersistentDataModel/DataHeader.h
                            INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
-                           LINK_LIBRARIES ${CORAL_LIBRARIES} AthenaPoolCnvSvcLib AthenaPoolUtilities PersistentDataModel PersistentDataModelTPCnv )
-
+                           LINK_LIBRARIES ${CORAL_LIBRARIES} AthenaBaseComps AthenaPoolCnvSvcLib GaudiKernel PersistentDataModel PersistentDataModelTPCnv )
diff --git a/Database/PersistentDataModelTPCnv/CMakeLists.txt b/Database/PersistentDataModelTPCnv/CMakeLists.txt
index c20a61170ce..02d8c231e05 100644
--- a/Database/PersistentDataModelTPCnv/CMakeLists.txt
+++ b/Database/PersistentDataModelTPCnv/CMakeLists.txt
@@ -1,31 +1,20 @@
-################################################################################
-# Package: PersistentDataModelTPCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( PersistentDataModelTPCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Database/PersistentDataModel
-                          PRIVATE
-                          Control/CxxUtils )
-
 # External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 find_package( UUID )
 
 # Component(s) in the package:
 atlas_add_library( PersistentDataModelTPCnv
                    src/*.cxx
                    PUBLIC_HEADERS PersistentDataModelTPCnv
-                   PRIVATE_INCLUDE_DIRS ${UUID_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
+                   PRIVATE_INCLUDE_DIRS ${UUID_INCLUDE_DIRS}
                    LINK_LIBRARIES PersistentDataModel
-                   PRIVATE_LINK_LIBRARIES ${UUID_LIBRARIES} ${ROOT_LIBRARIES} CxxUtils )
+                   PRIVATE_LINK_LIBRARIES ${UUID_LIBRARIES} CxxUtils )
 
 atlas_add_dictionary( PersistentDataModelTPCnvDict
                       PersistentDataModelTPCnv/PersistentDataModelTPCnvDict.h
                       PersistentDataModelTPCnv/selection.xml
-                      INCLUDE_DIRS ${UUID_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${UUID_LIBRARIES} ${ROOT_LIBRARIES} PersistentDataModel CxxUtils PersistentDataModelTPCnv )
-
+                      LINK_LIBRARIES PersistentDataModelTPCnv )
diff --git a/Database/RDBAccessSvc/CMakeLists.txt b/Database/RDBAccessSvc/CMakeLists.txt
index f97d7b69c4e..5d20dcd1246 100644
--- a/Database/RDBAccessSvc/CMakeLists.txt
+++ b/Database/RDBAccessSvc/CMakeLists.txt
@@ -1,17 +1,8 @@
-################################################################################
-# Package: RDBAccessSvc
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( RDBAccessSvc )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/CxxUtils )
-
 # External dependencies:
 find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
 
@@ -31,8 +22,7 @@ atlas_add_component( RDBAccessSvc
                      src/RDBQuery.cxx
                      src/SourceCompAlg.cxx
                      src/components/RDBAccessSvc_entries.cxx
-                     INCLUDE_DIRS ${CORAL_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CORAL_LIBRARIES} AthenaBaseComps CxxUtils GaudiKernel RDBAccessSvcLib )
+                     LINK_LIBRARIES AthenaBaseComps CxxUtils RDBAccessSvcLib )
 
 atlas_add_executable( geomdb2sqlite
                       replicator/geomdb2sqlite.cpp
diff --git a/Database/RegistrationServices/CMakeLists.txt b/Database/RegistrationServices/CMakeLists.txt
index a2af0f43cb7..a25ede806f7 100644
--- a/Database/RegistrationServices/CMakeLists.txt
+++ b/Database/RegistrationServices/CMakeLists.txt
@@ -1,30 +1,11 @@
-################################################################################
-# Package: RegistrationServices
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( RegistrationServices )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          GaudiKernel
-                          PRIVATE
-                          Control/AthenaBaseComps
-                          Control/AthenaKernel
-                          Control/SGTools
-                          Control/StoreGate
-                          Database/APR/CollectionBase
-                          Database/APR/FileCatalog
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          Database/AthenaPOOL/DBDataModel
-                          Database/AthenaPOOL/PoolSvc
-                          Database/IOVDbSvc
-                          Database/PersistentDataModel )
-
 # External dependencies:
 find_package( COOL COMPONENTS CoolKernel )
-find_package( CORAL COMPONENTS CoralBase CoralKernel RelationalAccess )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
+find_package( CORAL COMPONENTS CoralBase )
 
 atlas_add_library( RegistrationServicesLib
                    INTERFACE
@@ -40,7 +21,7 @@ atlas_add_component( RegistrationServices
                      src/OutputConditionsAlg.cxx
                      src/components/*.cxx
                      INCLUDE_DIRS ${COOL_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${COOL_LIBRARIES} ${ROOT_LIBRARIES} ${CORAL_LIBRARIES} GaudiKernel AthenaBaseComps AthenaKernel SGTools StoreGateLib SGtests CollectionBase FileCatalog AthenaPoolUtilities DBDataModel PersistentDataModel PoolSvcLib IOVDbSvcLib )
+                     LINK_LIBRARIES ${COOL_LIBRARIES} ${CORAL_LIBRARIES} AthenaBaseComps AthenaKernel AthenaPoolUtilities CollectionBase DBDataModel FileCatalog IOVDbSvcLib PersistentDataModel PoolSvcLib RegistrationServicesLib SGTools StoreGateLib )
 
 # Install files from the package:
 atlas_install_python_modules( python/*.py )
diff --git a/Database/TPTools/CMakeLists.txt b/Database/TPTools/CMakeLists.txt
index f3761e7ddd0..a4ae1a1b943 100644
--- a/Database/TPTools/CMakeLists.txt
+++ b/Database/TPTools/CMakeLists.txt
@@ -1,32 +1,16 @@
-################################################################################
-# Package: TPTools
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TPTools )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          GaudiKernel
-                          PRIVATE
-                          Database/PersistentDataModel )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_library( TPTools
                    src/*.cxx
                    PUBLIC_HEADERS TPTools
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES AthenaKernel AthenaPoolUtilities GaudiKernel
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} PersistentDataModel )
+                   LINK_LIBRARIES AthenaKernel AthenaPoolUtilities CxxUtils GaudiKernel
+                   PRIVATE_LINK_LIBRARIES PersistentDataModel )
 
 atlas_add_dictionary( TPToolsDict
                       TPTools/TPToolsDict.h
                       TPTools/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaKernel AthenaPoolUtilities GaudiKernel PersistentDataModel TPTools )
-
+                      LINK_LIBRARIES TPTools )
diff --git a/LumiBlock/LumiBlockComps/CMakeLists.txt b/LumiBlock/LumiBlockComps/CMakeLists.txt
index 425aefec94b..2e4d24ca88b 100644
--- a/LumiBlock/LumiBlockComps/CMakeLists.txt
+++ b/LumiBlock/LumiBlockComps/CMakeLists.txt
@@ -50,15 +50,15 @@ atlas_install_joboptions( share/*.txt )
 
 atlas_add_test( LBDurationCondAlg_test
    SOURCES test/LBDurationCondAlg_test.cxx
-   LINK_LIBRARIES GaudiKernel LumiBlockCompsLib )
+   LINK_LIBRARIES GaudiKernel LumiBlockCompsLib TestTools )
 
 atlas_add_test( LuminosityCondAlg_test
    SOURCES test/LuminosityCondAlg_test.cxx
-   LINK_LIBRARIES GaudiKernel LumiBlockCompsLib AthenaPoolUtilities )
+   LINK_LIBRARIES GaudiKernel LumiBlockCompsLib AthenaPoolUtilities TestTools )
 
 atlas_add_test( TrigLiveFractionCondAlg_test
    SOURCES test/TrigLiveFractionCondAlg_test.cxx
-   LINK_LIBRARIES GaudiKernel LumiBlockCompsLib )
+   LINK_LIBRARIES GaudiKernel LumiBlockCompsLib TestTools )
 
 atlas_add_test( LuminosityCondAlgConfig_test
                 SCRIPT python -m LumiBlockComps.LuminosityCondAlgConfig
-- 
GitLab