From a838ab7622503aa292d7f9049f61f09d34b8d62c Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Sun, 18 Oct 2020 18:55:35 +0200
Subject: [PATCH] TrkUtilityPackages: cmake cleanup

Remove `atlas_depends_on_subdirs`, fix library and external
dependencies.
---
 .../TrkDriftCircleMath/CMakeLists.txt           | 10 +---------
 .../TrkNeuralNetworkUtils/CMakeLists.txt        | 17 ++++-------------
 .../TrkValidationUtils/CMakeLists.txt           | 16 +++-------------
 3 files changed, 8 insertions(+), 35 deletions(-)

diff --git a/Tracking/TrkUtilityPackages/TrkDriftCircleMath/CMakeLists.txt b/Tracking/TrkUtilityPackages/TrkDriftCircleMath/CMakeLists.txt
index 5fce9b3a5ef..2aea27b8225 100644
--- a/Tracking/TrkUtilityPackages/TrkDriftCircleMath/CMakeLists.txt
+++ b/Tracking/TrkUtilityPackages/TrkDriftCircleMath/CMakeLists.txt
@@ -1,18 +1,10 @@
-################################################################################
-# Package: TrkDriftCircleMath
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TrkDriftCircleMath )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/CxxUtils
-                          GaudiKernel )
-
 # Component(s) in the package:
 atlas_add_library( TrkDriftCircleMath
                    src/*.cxx
                    PUBLIC_HEADERS TrkDriftCircleMath
                    LINK_LIBRARIES CxxUtils GaudiKernel )
-
diff --git a/Tracking/TrkUtilityPackages/TrkNeuralNetworkUtils/CMakeLists.txt b/Tracking/TrkUtilityPackages/TrkNeuralNetworkUtils/CMakeLists.txt
index 480cd8d04be..720c3525bbe 100644
--- a/Tracking/TrkUtilityPackages/TrkNeuralNetworkUtils/CMakeLists.txt
+++ b/Tracking/TrkUtilityPackages/TrkNeuralNetworkUtils/CMakeLists.txt
@@ -1,19 +1,11 @@
-################################################################################
-# Package: TrkNeuralNetworkUtils
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TrkNeuralNetworkUtils )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaBaseComps
-                          PRIVATE
-                          GaudiKernel )
-
 # External dependencies:
-find_package( Boost COMPONENTS filesystem thread system )
-find_package( ROOT COMPONENTS Matrix Cint Core Tree MathCore Hist RIO pthread MathMore Minuit Minuit2 Physics HistPainter Rint )
+find_package( Boost )
+find_package( ROOT COMPONENTS Matrix Core Tree MathCore Hist )
 
 # Component(s) in the package:
 atlas_add_root_dictionary( TrkNeuralNetworkUtilsLib
@@ -32,8 +24,7 @@ atlas_add_library( TrkNeuralNetworkUtilsLib
 
 atlas_add_component( TrkNeuralNetworkUtils
                      src/components/*.cxx
-                     INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${ROOT_LIBRARIES} ${Boost_LIBRARIES} AthenaBaseComps GaudiKernel TrkNeuralNetworkUtilsLib )
+                     LINK_LIBRARIES TrkNeuralNetworkUtilsLib )
 
 atlas_add_test( test_buffer
         SOURCES test/test_TargetBuffer_t.cxx  )
diff --git a/Tracking/TrkUtilityPackages/TrkValidationUtils/CMakeLists.txt b/Tracking/TrkUtilityPackages/TrkValidationUtils/CMakeLists.txt
index 28b1a3fe63d..4b3fe9343d1 100644
--- a/Tracking/TrkUtilityPackages/TrkValidationUtils/CMakeLists.txt
+++ b/Tracking/TrkUtilityPackages/TrkValidationUtils/CMakeLists.txt
@@ -1,29 +1,19 @@
-################################################################################
-# Package: TrkValidationUtils
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( TrkValidationUtils )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          DetectorDescription/GeoPrimitives
-                          Event/EventPrimitives
-                          PRIVATE
-                          Tracking/TrkDetDescr/TrkSurfaces )
-
 # External dependencies:
 find_package( CLHEP )
-find_package( Eigen )
 find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
 atlas_add_library( TrkValidationUtils
                    src/*.cxx
                    PUBLIC_HEADERS TrkValidationUtils
-                   INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
+                   INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} GeoPrimitives EventPrimitives
+                   LINK_LIBRARIES ${CLHEP_LIBRARIES} GeoPrimitives EventPrimitives
                    PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} TrkSurfaces )
 
-- 
GitLab