From b453c9453a8d7d24e9db59f9dcd347ceb49551d3 Mon Sep 17 00:00:00 2001
From: Frank Winklmeier <fwinkl@cern>
Date: Mon, 3 Aug 2020 14:14:43 +0200
Subject: [PATCH] SGTools: cmake cleanup

- remove atlas_depends_on_subdirs
- remove ROOT dependency
- update link dependencies
---
 Control/SGTools/CMakeLists.txt | 51 ++++++++++------------------------
 1 file changed, 14 insertions(+), 37 deletions(-)

diff --git a/Control/SGTools/CMakeLists.txt b/Control/SGTools/CMakeLists.txt
index 675a3669644c..70140c28792b 100644
--- a/Control/SGTools/CMakeLists.txt
+++ b/Control/SGTools/CMakeLists.txt
@@ -1,89 +1,66 @@
-################################################################################
-# Package: SGTools
-################################################################################
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 
 # Declare the package name:
 atlas_subdir( SGTools )
 
-# Declare the package's dependencies:
-atlas_depends_on_subdirs( PUBLIC
-                          Control/AthenaKernel
-                          Control/CxxUtils
-                          GaudiKernel
-                          PRIVATE
-                          AtlasTest/TestTools
-                          Control/SGMon/SGAudCore )
-
 # External dependencies:
-find_package( Boost COMPONENTS thread filesystem system )
-find_package( ROOT COMPONENTS Core Tree MathCore Hist RIO pthread )
+find_package( Boost )
 
 # Component(s) in the package:
 atlas_add_library( SGTools
                    src/*.cxx
                    PUBLIC_HEADERS SGTools
                    INCLUDE_DIRS ${Boost_INCLUDE_DIRS}
-                   PRIVATE_INCLUDE_DIRS ${ROOT_INCLUDE_DIRS}
                    LINK_LIBRARIES ${Boost_LIBRARIES} AthenaKernel CxxUtils GaudiKernel
-                   PRIVATE_LINK_LIBRARIES ${ROOT_LIBRARIES} TestTools SGAudCore )
+                   PRIVATE_LINK_LIBRARIES SGAudCore )
 
 atlas_add_dictionary( SGToolsDict
                       SGTools/SGToolsDict.h
                       SGTools/selection.xml
-                      INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                      LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils GaudiKernel TestTools SGAudCore SGTools )
+                      LINK_LIBRARIES SGTools )
 
+# Tests in the package:
 atlas_add_test( VersionedKey_test
                 SOURCES
                 test/VersionedKey_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils GaudiKernel TestTools SGAudCore SGTools )
+                LINK_LIBRARIES SGTools )
 
 atlas_add_test( safe_clid_test
                 SOURCES
                 test/safe_clid_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils GaudiKernel TestTools SGAudCore SGTools )
+                LINK_LIBRARIES SGTools )
 
 atlas_add_test( exceptions_test
                 SOURCES
                 test/exceptions_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils GaudiKernel TestTools SGAudCore SGTools )
+                LINK_LIBRARIES SGTools )
 
 atlas_add_test( StringPool_test
                 SOURCES
                 test/StringPool_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils GaudiKernel TestTools SGAudCore SGTools )
+                LINK_LIBRARIES SGTools )
 
 atlas_add_test( DataProxy_test
                 SOURCES
                 test/DataProxy_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils GaudiKernel TestTools SGAudCore SGTools )
+                LINK_LIBRARIES SGTools )
 
 atlas_add_test( DataStore_test
                 SOURCES
                 test/DataStore_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils GaudiKernel TestTools SGAudCore SGTools )
+                LINK_LIBRARIES SGTools )
 
 atlas_add_test( TransientAddress_test
                 SOURCES
                 test/TransientAddress_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils GaudiKernel TestTools SGAudCore SGTools )
+                LINK_LIBRARIES SGTools )
 
 atlas_add_test( CurrentEventStore_test
                 SOURCES
                 test/CurrentEventStore_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils GaudiKernel TestTools SGAudCore SGTools )
+                LINK_LIBRARIES SGTools )
 
 atlas_add_test( SGFolderItem_test
                 SOURCES
                 test/SGFolderItem_test.cxx
-                INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
-                LINK_LIBRARIES ${Boost_LIBRARIES} ${ROOT_LIBRARIES} AthenaKernel CxxUtils GaudiKernel TestTools SGAudCore SGTools )
-
+                LINK_LIBRARIES SGTools )
-- 
GitLab