From 7d39c99df20f8abca2da1566a7d0c898a1b41d50 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Fri, 16 Oct 2020 16:51:23 +0200
Subject: [PATCH] ForwardSimulation: cmake cleanup

---
 .../ForwardRegionGeoModel/CMakeLists.txt      | 22 +++-----------
 .../ForwardRegionMgField/CMakeLists.txt       | 19 +++---------
 .../CMakeLists.txt                            | 14 +--------
 .../ForwardRegion_EventTPCnv/CMakeLists.txt   | 30 ++++---------------
 .../ForwardRegion_SimEv/CMakeLists.txt        | 20 ++-----------
 5 files changed, 17 insertions(+), 88 deletions(-)

diff --git a/ForwardDetectors/ForwardSimulation/ForwardRegionGeoModel/CMakeLists.txt b/ForwardDetectors/ForwardSimulation/ForwardRegionGeoModel/CMakeLists.txt
index aaa184ba8fb..3bca878bddb 100644
--- a/ForwardDetectors/ForwardSimulation/ForwardRegionGeoModel/CMakeLists.txt
+++ b/ForwardDetectors/ForwardSimulation/ForwardRegionGeoModel/CMakeLists.txt
@@ -1,23 +1,10 @@
-################################################################################
-# Package: ForwardRegionGeoModel
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ForwardRegionGeoModel )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          DetectorDescription/GeoModel/GeoModelUtilities
-                          GaudiKernel
-                          PRIVATE
-                          Control/StoreGate
-                          DetectorDescription/GeoModel/GeoModelInterfaces
-                          Tools/PathResolver )
-
 # External dependencies:
 find_package( CLHEP )
-find_package( Eigen )
 find_package( GeoModelCore )
 
 # Component(s) in the package:
@@ -26,13 +13,12 @@ atlas_add_library( ForwardRegionGeoModelLib
                    PUBLIC_HEADERS ForwardRegionGeoModel
                    INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaKernel GeoModelUtilities GaudiKernel StoreGateLib SGtests
-                   PRIVATE_LINK_LIBRARIES PathResolver )
+                   LINK_LIBRARIES ${CLHEP_LIBRARIES} ${GEOMODELCORE_LIBRARIES} AthenaKernel GaudiKernel GeoModelUtilities
+                   PRIVATE_LINK_LIBRARIES GeoModelInterfaces PathResolver StoreGateLib )
 
 atlas_add_component( ForwardRegionGeoModel
                      src/components/*.cxx
-                     INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${CLHEP_LIBRARIES} ${EIGEN_LIBRARIES} ${GEOMODELCORE_LIBRARIES} GeoModelUtilities GaudiKernel StoreGateLib SGtests PathResolver ForwardRegionGeoModelLib )
+                     LINK_LIBRARIES ForwardRegionGeoModelLib )
 
 # Install files from the package:
 atlas_install_runtime( share/*.csv )
diff --git a/ForwardDetectors/ForwardSimulation/ForwardRegionMgField/CMakeLists.txt b/ForwardDetectors/ForwardSimulation/ForwardRegionMgField/CMakeLists.txt
index c8521a44039..7e61904db40 100644
--- a/ForwardDetectors/ForwardSimulation/ForwardRegionMgField/CMakeLists.txt
+++ b/ForwardDetectors/ForwardSimulation/ForwardRegionMgField/CMakeLists.txt
@@ -1,30 +1,19 @@
-################################################################################
-# Package: ForwardRegionMgField
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ForwardRegionMgField )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PRIVATE
-                          GaudiKernel
-                          Control/AthenaBaseComps
-                          MagneticField/MagFieldInterfaces
-                          ForwardDetectors/ForwardSimulation/ForwardRegionGeoModel
-                          Tools/PathResolver )
-
 # External dependencies:
 find_package( CLHEP )
 find_package( Geant4 )
-find_package( XercesC )
 
 # Component(s) in the package:
 atlas_add_component( ForwardRegionMgField
                      src/*.cxx
                      src/components/*.cxx
-                     INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                     LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel AthenaBaseComps MagFieldInterfaces PathResolver ForwardRegionGeoModelLib )
+                     INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
+                     LINK_LIBRARIES ${GEANT4_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel AthenaBaseComps MagFieldInterfaces PathResolver ForwardRegionGeoModelLib )
 
 # Install files from the package:
 atlas_install_runtime( share/*.dat )
-atlas_install_python_modules( python/*.py )
+atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
diff --git a/ForwardDetectors/ForwardSimulation/ForwardRegion_EventCnv/ForwardRegion_EventAthenaPool/CMakeLists.txt b/ForwardDetectors/ForwardSimulation/ForwardRegion_EventCnv/ForwardRegion_EventAthenaPool/CMakeLists.txt
index 55e8c78035c..bfff8e4aeae 100644
--- a/ForwardDetectors/ForwardSimulation/ForwardRegion_EventCnv/ForwardRegion_EventAthenaPool/CMakeLists.txt
+++ b/ForwardDetectors/ForwardSimulation/ForwardRegion_EventCnv/ForwardRegion_EventAthenaPool/CMakeLists.txt
@@ -1,20 +1,8 @@
-################################################################################
-# Package: ForwardRegion_EventAthenaPool
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ForwardRegion_EventAthenaPool )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Database/AthenaPOOL/AthenaPoolUtilities
-                          PRIVATE
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          Database/AtlasSealCLHEP
-                          ForwardDetectors/ForwardSimulation/ForwardRegion_EventCnv/ForwardRegion_EventTPCnv
-                          ForwardDetectors/ForwardSimulation/ForwardRegion_SimEv
-                          GaudiKernel )
-
 # Component(s) in the package:
 atlas_add_poolcnv_library( ForwardRegion_EventAthenaPoolPoolCnv
                            src/*.cxx
diff --git a/ForwardDetectors/ForwardSimulation/ForwardRegion_EventCnv/ForwardRegion_EventTPCnv/CMakeLists.txt b/ForwardDetectors/ForwardSimulation/ForwardRegion_EventCnv/ForwardRegion_EventTPCnv/CMakeLists.txt
index b77a25ed535..d09590a38dd 100644
--- a/ForwardDetectors/ForwardSimulation/ForwardRegion_EventCnv/ForwardRegion_EventTPCnv/CMakeLists.txt
+++ b/ForwardDetectors/ForwardSimulation/ForwardRegion_EventCnv/ForwardRegion_EventTPCnv/CMakeLists.txt
@@ -1,42 +1,22 @@
-################################################################################
-# Package: ForwardRegion_EventTPCnv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ForwardRegion_EventTPCnv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Database/AthenaPOOL/AthenaPoolCnvSvc
-                          ForwardDetectors/ForwardSimulation/ForwardRegion_SimEv
-                          PRIVATE
-                          AtlasTest/TestTools
-                          DetectorDescription/Identifier
-                          GaudiKernel )
-
-# External dependencies:
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
-
 # Component(s) in the package:
 atlas_add_library( ForwardRegion_EventTPCnv
                    src/*.cxx
                    PUBLIC_HEADERS ForwardRegion_EventTPCnv
-                   INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                   LINK_LIBRARIES ${ROOT_LIBRARIES} ForwardRegion_SimEv AthenaPoolCnvSvcLib
-                   PRIVATE_LINK_LIBRARIES Identifier GaudiKernel )
+                   LINK_LIBRARIES ForwardRegion_SimEv AthenaPoolCnvSvcLib
+                   PRIVATE_LINK_LIBRARIES Identifier )
 
 atlas_add_dictionary( ForwardRegion_EventTPCnvDict
                       ForwardRegion_EventTPCnv/SimulationHitTPCnvDict.h
                       ForwardRegion_EventTPCnv/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} AthenaPoolCnvSvcLib ForwardRegion_SimEv Identifier GaudiKernel ForwardRegion_EventTPCnv )
-
-
+                      LINK_LIBRARIES ForwardRegion_EventTPCnv )
 
 atlas_add_test( SimulationHitCnv_p1_test
                 SOURCES
                 test/SimulationHitCnv_p1_test.cxx
                 INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ForwardRegion_EventTPCnv TestTools )
-
-                    
+                LINK_LIBRARIES ForwardRegion_EventTPCnv GaudiKernel TestTools )
diff --git a/ForwardDetectors/ForwardSimulation/ForwardRegion_SimEv/CMakeLists.txt b/ForwardDetectors/ForwardSimulation/ForwardRegion_SimEv/CMakeLists.txt
index f4db80bf275..25a5bcd0b33 100644
--- a/ForwardDetectors/ForwardSimulation/ForwardRegion_SimEv/CMakeLists.txt
+++ b/ForwardDetectors/ForwardSimulation/ForwardRegion_SimEv/CMakeLists.txt
@@ -1,34 +1,20 @@
-################################################################################
-# Package: ForwardRegion_SimEv
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( ForwardRegion_SimEv )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          Simulation/HitManagement
-                          PRIVATE
-                          GaudiKernel )
-
 # External dependencies:
 find_package( CLHEP )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
 
 # Component(s) in the package:
 atlas_add_library( ForwardRegion_SimEv
                    src/*.cxx
                    PUBLIC_HEADERS ForwardRegion_SimEv
                    INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS}
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                    DEFINITIONS ${CLHEP_DEFINITIONS}
-                   LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaKernel HitManagement
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} GaudiKernel )
+                   LINK_LIBRARIES ${CLHEP_LIBRARIES} AthenaKernel HitManagement )
 
 atlas_add_dictionary( ForwardRegion_SimEvDict
                       ForwardRegion_SimEv/SimulationHitDict.h
                       ForwardRegion_SimEv/selection.xml
-                      INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${ROOT_LIBRARIES} ${CLHEP_LIBRARIES} HitManagement GaudiKernel ForwardRegion_SimEv )
-
+                      LINK_LIBRARIES ForwardRegion_SimEv )
-- 
GitLab