From db73e5de88baddefeb91b7d862ef6f378aa008b2 Mon Sep 17 00:00:00 2001
From: Attila Krasznahorkay <Attila.Krasznahorkay@cern.ch>
Date: Fri, 3 Apr 2020 11:27:45 +0200
Subject: [PATCH] Removed the explicit setting of external (generator)
 versions.

With LCG_97+ it is no longer necessary, as a given LCG release
will only have a single version of everything.

At the same time cleaned up the configuration of AthGeneration
a little bit.
---
 Projects/AthGeneration/CMakeLists.txt         | 13 ---------
 .../AthGeneration/cmake/PostConfig.cmake.in   | 27 ++++++-------------
 Projects/AthGeneration/externals/Crmc.cmake   |  7 -----
 Projects/AthGeneration/externals/EvtGen.cmake |  7 -----
 .../AthGeneration/externals/FJContrib.cmake   |  7 -----
 .../AthGeneration/externals/HEPUtils.cmake    |  7 -----
 Projects/AthGeneration/externals/Herwig.cmake |  7 -----
 .../AthGeneration/externals/Herwig3.cmake     |  9 -------
 Projects/AthGeneration/externals/Hydjet.cmake |  7 -----
 Projects/AthGeneration/externals/Lhapdf.cmake |  7 -----
 .../AthGeneration/externals/MCUtils.cmake     |  7 -----
 .../externals/MadGraph5Amc.cmake              |  7 -----
 .../AthGeneration/externals/OpenLoops.cmake   |  7 -----
 .../AthGeneration/externals/Photospp.cmake    |  7 -----
 .../AthGeneration/externals/Pythia6.cmake     |  7 -----
 .../AthGeneration/externals/Pythia8.cmake     |  7 -----
 Projects/AthGeneration/externals/README.md    | 20 --------------
 Projects/AthGeneration/externals/Rivet.cmake  |  6 -----
 Projects/AthGeneration/externals/Sherpa.cmake |  6 -----
 .../AthGeneration/externals/Starlight.cmake   |  7 -----
 .../AthGeneration/externals/Superchic.cmake   |  7 -----
 .../AthGeneration/externals/Tauolapp.cmake    |  7 -----
 Projects/AthGeneration/externals/ThePEG.cmake |  7 -----
 Projects/AthGeneration/externals/VBFNLO.cmake |  7 -----
 Projects/AthGeneration/externals/YODA.cmake   |  6 -----
 Projects/AthSimulation/CMakeLists.txt         | 13 ---------
 .../AthSimulation/cmake/PostConfig.cmake.in   | 18 +------------
 .../AthSimulation/externals/HEPUtils.cmake    |  7 -----
 .../AthSimulation/externals/MCUtils.cmake     |  7 -----
 Projects/AthSimulation/externals/README.md    | 20 --------------
 Projects/AthSimulation/externals/YODA.cmake   |  7 -----
 Projects/Athena/CMakeLists.txt                | 13 ---------
 Projects/Athena/cmake/PostConfig.cmake.in     | 18 +------------
 Projects/Athena/externals/Crmc.cmake          |  7 -----
 Projects/Athena/externals/EvtGen.cmake        |  7 -----
 Projects/Athena/externals/FJContrib.cmake     |  8 ------
 Projects/Athena/externals/HEPUtils.cmake      |  7 -----
 Projects/Athena/externals/Herwig.cmake        |  7 -----
 Projects/Athena/externals/Herwig3.cmake       |  9 -------
 Projects/Athena/externals/Hydjet.cmake        |  7 -----
 Projects/Athena/externals/Lhapdf.cmake        |  7 -----
 Projects/Athena/externals/MCUtils.cmake       |  7 -----
 Projects/Athena/externals/MadGraph5Amc.cmake  |  7 -----
 Projects/Athena/externals/Photospp.cmake      |  7 -----
 Projects/Athena/externals/Pythia6.cmake       |  7 -----
 Projects/Athena/externals/Pythia8.cmake       |  7 -----
 Projects/Athena/externals/README.md           | 20 --------------
 Projects/Athena/externals/Rivet.cmake         |  7 -----
 Projects/Athena/externals/Sherpa.cmake        |  7 -----
 Projects/Athena/externals/Starlight.cmake     |  7 -----
 Projects/Athena/externals/Tauolapp.cmake      |  7 -----
 Projects/Athena/externals/ThePEG.cmake        |  7 -----
 Projects/Athena/externals/YODA.cmake          |  7 -----
 53 files changed, 10 insertions(+), 462 deletions(-)
 delete mode 100644 Projects/AthGeneration/externals/Crmc.cmake
 delete mode 100644 Projects/AthGeneration/externals/EvtGen.cmake
 delete mode 100644 Projects/AthGeneration/externals/FJContrib.cmake
 delete mode 100644 Projects/AthGeneration/externals/HEPUtils.cmake
 delete mode 100644 Projects/AthGeneration/externals/Herwig.cmake
 delete mode 100644 Projects/AthGeneration/externals/Herwig3.cmake
 delete mode 100644 Projects/AthGeneration/externals/Hydjet.cmake
 delete mode 100644 Projects/AthGeneration/externals/Lhapdf.cmake
 delete mode 100644 Projects/AthGeneration/externals/MCUtils.cmake
 delete mode 100644 Projects/AthGeneration/externals/MadGraph5Amc.cmake
 delete mode 100644 Projects/AthGeneration/externals/OpenLoops.cmake
 delete mode 100644 Projects/AthGeneration/externals/Photospp.cmake
 delete mode 100644 Projects/AthGeneration/externals/Pythia6.cmake
 delete mode 100644 Projects/AthGeneration/externals/Pythia8.cmake
 delete mode 100644 Projects/AthGeneration/externals/README.md
 delete mode 100644 Projects/AthGeneration/externals/Rivet.cmake
 delete mode 100644 Projects/AthGeneration/externals/Sherpa.cmake
 delete mode 100644 Projects/AthGeneration/externals/Starlight.cmake
 delete mode 100644 Projects/AthGeneration/externals/Superchic.cmake
 delete mode 100644 Projects/AthGeneration/externals/Tauolapp.cmake
 delete mode 100644 Projects/AthGeneration/externals/ThePEG.cmake
 delete mode 100644 Projects/AthGeneration/externals/VBFNLO.cmake
 delete mode 100644 Projects/AthGeneration/externals/YODA.cmake
 delete mode 100644 Projects/AthSimulation/externals/HEPUtils.cmake
 delete mode 100644 Projects/AthSimulation/externals/MCUtils.cmake
 delete mode 100644 Projects/AthSimulation/externals/README.md
 delete mode 100644 Projects/AthSimulation/externals/YODA.cmake
 delete mode 100644 Projects/Athena/externals/Crmc.cmake
 delete mode 100644 Projects/Athena/externals/EvtGen.cmake
 delete mode 100644 Projects/Athena/externals/FJContrib.cmake
 delete mode 100644 Projects/Athena/externals/HEPUtils.cmake
 delete mode 100644 Projects/Athena/externals/Herwig.cmake
 delete mode 100644 Projects/Athena/externals/Herwig3.cmake
 delete mode 100644 Projects/Athena/externals/Hydjet.cmake
 delete mode 100644 Projects/Athena/externals/Lhapdf.cmake
 delete mode 100644 Projects/Athena/externals/MCUtils.cmake
 delete mode 100644 Projects/Athena/externals/MadGraph5Amc.cmake
 delete mode 100644 Projects/Athena/externals/Photospp.cmake
 delete mode 100644 Projects/Athena/externals/Pythia6.cmake
 delete mode 100644 Projects/Athena/externals/Pythia8.cmake
 delete mode 100644 Projects/Athena/externals/README.md
 delete mode 100644 Projects/Athena/externals/Rivet.cmake
 delete mode 100644 Projects/Athena/externals/Sherpa.cmake
 delete mode 100644 Projects/Athena/externals/Starlight.cmake
 delete mode 100644 Projects/Athena/externals/Tauolapp.cmake
 delete mode 100644 Projects/Athena/externals/ThePEG.cmake
 delete mode 100644 Projects/Athena/externals/YODA.cmake

diff --git a/Projects/AthGeneration/CMakeLists.txt b/Projects/AthGeneration/CMakeLists.txt
index 44cb97ccf62..512e4d84c8e 100644
--- a/Projects/AthGeneration/CMakeLists.txt
+++ b/Projects/AthGeneration/CMakeLists.txt
@@ -42,19 +42,6 @@ set( AthenaPoolUtilitiesTest_DIR
    "${CMAKE_SOURCE_DIR}/../../Database/AthenaPOOL/AthenaPoolUtilities/cmake"
    CACHE PATH "Directory holding the AthenaPoolUtilititesTest module" )
 
-# Load all the files from the externals/ subdirectory:
-file( GLOB _externals "${CMAKE_CURRENT_SOURCE_DIR}/externals/*.cmake" )
-foreach( _external ${_externals} )
-   include( ${_external} )
-   get_filename_component( _extName ${_external} NAME_WE )
-   string( TOUPPER ${_extName} _extNameUpper )
-   message( STATUS "Taking ${_extName} from: ${${_extNameUpper}_LCGROOT}" )
-   unset( _extName )
-   unset( _extNameUpper )
-endforeach()
-unset( _external )
-unset( _externals )
-
 # Disable the usage of the --no-undefined linker flag:
 atlas_disable_no_undefined()
 
diff --git a/Projects/AthGeneration/cmake/PostConfig.cmake.in b/Projects/AthGeneration/cmake/PostConfig.cmake.in
index 55630f7dd96..7ff8c678392 100644
--- a/Projects/AthGeneration/cmake/PostConfig.cmake.in
+++ b/Projects/AthGeneration/cmake/PostConfig.cmake.in
@@ -5,26 +5,15 @@
 #
 
 # Find Gaudi:
-find_package( Gaudi REQUIRED )
+if( AthGeneration_FIND_QUIETLY )
+   find_package( Gaudi REQUIRED QUIET )
+else()
+   find_package( Gaudi REQUIRED )
+endif()
 
 # Set up the compilation option(s) for AthGeneration.
-add_definitions( -DGENERATIONBASE )
 set( GENERATIONBASE TRUE CACHE BOOL
     "Flag specifying that this is a generation release build" )
-
-# Load all the files from the externals/ subdirectory:
-get_filename_component( _thisdir ${CMAKE_CURRENT_LIST_FILE} PATH )
-file( GLOB _externals "${_thisdir}/externals/*.cmake" )
-unset( _thisdir )
-foreach( _external ${_externals} )
-   include( ${_external} )
-   get_filename_component( _extName ${_external} NAME_WE )
-   string( TOUPPER ${_extName} _extNameUpper )
-   if( NOT AthGeneration_FIND_QUIETLY )
-      message( STATUS "Taking ${_extName} from: ${${_extNameUpper}_LCGROOT}" )
-   endif()
-   unset( _extName )
-   unset( _extNameUpper )
-endforeach()
-unset( _external )
-unset( _externals )
+if( GENERATIONBASE )
+   add_definitions( -DGENERATIONBASE )
+endif()
diff --git a/Projects/AthGeneration/externals/Crmc.cmake b/Projects/AthGeneration/externals/Crmc.cmake
deleted file mode 100644
index b1a4276e809..00000000000
--- a/Projects/AthGeneration/externals/Crmc.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of Crmc to use.
-#
-
-set( CRMC_VERSION 1.5.6 )
-set( CRMC_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/crmc/${CRMC_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/AthGeneration/externals/EvtGen.cmake b/Projects/AthGeneration/externals/EvtGen.cmake
deleted file mode 100644
index 5d729fa4457..00000000000
--- a/Projects/AthGeneration/externals/EvtGen.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of EvtGen to use.
-#
-
-set( EVTGEN_LCGVERSION 1.7.0 )
-set( EVTGEN_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/evtgen/${EVTGEN_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/AthGeneration/externals/FJContrib.cmake b/Projects/AthGeneration/externals/FJContrib.cmake
deleted file mode 100644
index fe7873d126d..00000000000
--- a/Projects/AthGeneration/externals/FJContrib.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of FJContrib to use.
-#
-
-set( FJCONTRIB_LCGVERSION 1.041 )
-set( FJCONTRIB_LCGROOT
-   ${LCG_RELEASE_DIR}/fjcontrib/${FJCONTRIB_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/AthGeneration/externals/HEPUtils.cmake b/Projects/AthGeneration/externals/HEPUtils.cmake
deleted file mode 100644
index 8344158ac50..00000000000
--- a/Projects/AthGeneration/externals/HEPUtils.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of HEPUtils to use.
-#
-
-set( HEPUTILS_LCGVERSION 1.3.2 )
-set( HEPUTILS_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/heputils/${HEPUTILS_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/AthGeneration/externals/Herwig.cmake b/Projects/AthGeneration/externals/Herwig.cmake
deleted file mode 100644
index b0df2d6dd7d..00000000000
--- a/Projects/AthGeneration/externals/Herwig.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of Herwig to use.
-#
-
-set( HERWIG_LCGVERSION 6.521.2 )
-set( HERWIG_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/herwig/${HERWIG_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/AthGeneration/externals/Herwig3.cmake b/Projects/AthGeneration/externals/Herwig3.cmake
deleted file mode 100644
index 70a428981e7..00000000000
--- a/Projects/AthGeneration/externals/Herwig3.cmake
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# File specifying the location of Herwig3 to use.
-#
-
-set( HERWIG3_LCGVERSION 7.2.0 )
-# Comment the following line for H7 versions <7.2
-set( HW3_VER_IS_72 1 )
-set( HERWIG3_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/herwig++/${HERWIG3_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/AthGeneration/externals/Hydjet.cmake b/Projects/AthGeneration/externals/Hydjet.cmake
deleted file mode 100644
index 1eede1364e8..00000000000
--- a/Projects/AthGeneration/externals/Hydjet.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of Hydjet to use.
-#
-
-set( HYDJET_LCGVERSION 1.8 )
-set( HYDJET_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/hydjet/${HYDJET_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/AthGeneration/externals/Lhapdf.cmake b/Projects/AthGeneration/externals/Lhapdf.cmake
deleted file mode 100644
index 03c1e85b5a8..00000000000
--- a/Projects/AthGeneration/externals/Lhapdf.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of Lhapdf to use.
-#
-
-set( LHAPDF_LCGVERSION 6.2.3 )
-set( LHAPDF_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/lhapdf/${LHAPDF_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/AthGeneration/externals/MCUtils.cmake b/Projects/AthGeneration/externals/MCUtils.cmake
deleted file mode 100644
index f7ebb4984d7..00000000000
--- a/Projects/AthGeneration/externals/MCUtils.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of MCUtils to use.
-#
-
-set( MCUTILS_LCGVERSION 1.3.3 )
-set( MCUTILS_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/mcutils/${MCUTILS_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/AthGeneration/externals/MadGraph5Amc.cmake b/Projects/AthGeneration/externals/MadGraph5Amc.cmake
deleted file mode 100644
index 741f63cf942..00000000000
--- a/Projects/AthGeneration/externals/MadGraph5Amc.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of MadGraph to use.
-#
-
-set( MADGRAPH5AMC_LCGVERSION 2.6.7.atlas3 )
-set( MADGRAPH5AMC_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/madgraph5amc/${MADGRAPH5AMC_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/AthGeneration/externals/OpenLoops.cmake b/Projects/AthGeneration/externals/OpenLoops.cmake
deleted file mode 100644
index 087811c9d70..00000000000
--- a/Projects/AthGeneration/externals/OpenLoops.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of OpenLoops to use.
-#
-
-set( OPENLOOPS_LCGVERSION "2.0.0" )
-set( OPENLOOPS_LCGROOT
-  "${LCG_RELEASE_DIR}/MCGenerators/openloops/${OPENLOOPS_LCGVERSION}/${LCG_PLATFORM}" )
\ No newline at end of file
diff --git a/Projects/AthGeneration/externals/Photospp.cmake b/Projects/AthGeneration/externals/Photospp.cmake
deleted file mode 100644
index 8e0b8c2deae..00000000000
--- a/Projects/AthGeneration/externals/Photospp.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of Photos++ to use.
-#
-
-set( PHOTOSPP_LCGVERSION 3.61 )
-set( PHOTOSPP_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/photos++/${PHOTOSPP_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/AthGeneration/externals/Pythia6.cmake b/Projects/AthGeneration/externals/Pythia6.cmake
deleted file mode 100644
index b8810cd5b85..00000000000
--- a/Projects/AthGeneration/externals/Pythia6.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of Pythia 6 to use.
-#
-
-set( PYTHIA6_LCGVERSION 429.2 )
-set( PYTHIA6_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/pythia6/${PYTHIA6_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/AthGeneration/externals/Pythia8.cmake b/Projects/AthGeneration/externals/Pythia8.cmake
deleted file mode 100644
index 378c1efff99..00000000000
--- a/Projects/AthGeneration/externals/Pythia8.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of Pythia 8 to use.
-#
-
-set( PYTHIA8_LCGVERSION 244 )
-set( PYTHIA8_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/pythia8/${PYTHIA8_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/AthGeneration/externals/README.md b/Projects/AthGeneration/externals/README.md
deleted file mode 100644
index a0b5ddb141d..00000000000
--- a/Projects/AthGeneration/externals/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-Directory collecting external package declarations
-==================================================
-
-This directory is used to collect simple CMake files that get included by
-the CMake configuration to set up the locations of all the externals used
-for the offline release build.
-
-Each external should be defined by its own CMake file. The files should
-have a name <Bla> corresponding to the Find<Bla> module name used to find
-the external in question.
-
-The files should define all the variables expected by the Find<Bla> modules,
-which normally boil down to variables:
-
-`EXTNAME_LCGROOT`
-`EXTNAME_LCGVERSION`
-
-But some modules may require other variables. In which case the `_LCGROOT`
-variable should still be set, to get a nice printout from the AtlasExternals
-code during the build about the location of the used external.
diff --git a/Projects/AthGeneration/externals/Rivet.cmake b/Projects/AthGeneration/externals/Rivet.cmake
deleted file mode 100644
index a2852f07772..00000000000
--- a/Projects/AthGeneration/externals/Rivet.cmake
+++ /dev/null
@@ -1,6 +0,0 @@
-#
-# File specifying the location of Rivet to use.
-#
-set( RIVET_LCGVERSION 3.1.0 )
-set( RIVET_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/rivet/${RIVET_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/AthGeneration/externals/Sherpa.cmake b/Projects/AthGeneration/externals/Sherpa.cmake
deleted file mode 100644
index ba9b3421a93..00000000000
--- a/Projects/AthGeneration/externals/Sherpa.cmake
+++ /dev/null
@@ -1,6 +0,0 @@
-#
-# File specifying the location of Sherpa to use.
-#
-set( SHERPA_LCGVERSION 2.2.8 )
-set( SHERPA_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/sherpa/${SHERPA_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/AthGeneration/externals/Starlight.cmake b/Projects/AthGeneration/externals/Starlight.cmake
deleted file mode 100644
index 4e0548db7bf..00000000000
--- a/Projects/AthGeneration/externals/Starlight.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of Starlight to use.
-#
-
-set( STARLIGHT_LCGVERSION r313 )
-set( STARLIGHT_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/starlight/${STARLIGHT_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/AthGeneration/externals/Superchic.cmake b/Projects/AthGeneration/externals/Superchic.cmake
deleted file mode 100644
index eae6f9b47ad..00000000000
--- a/Projects/AthGeneration/externals/Superchic.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of Superchic 3.0 to use.
-#
-
-set( SUPERCHIC_LCGVERSION 3.06 )
-set( SUPERCHIC_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/superchic/${SUPERCHIC_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/AthGeneration/externals/Tauolapp.cmake b/Projects/AthGeneration/externals/Tauolapp.cmake
deleted file mode 100644
index 375c6944f2a..00000000000
--- a/Projects/AthGeneration/externals/Tauolapp.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of Tauola++ to use.
-#
-
-set( TAUOLAPP_LCGVERSION 1.1.6 )
-set( TAUOLAPP_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/tauola++/${TAUOLAPP_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/AthGeneration/externals/ThePEG.cmake b/Projects/AthGeneration/externals/ThePEG.cmake
deleted file mode 100644
index cf5c807c458..00000000000
--- a/Projects/AthGeneration/externals/ThePEG.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of ThePEG to use.
-#
-
-set( THEPEG_LCGVERSION 2.2.0 )
-set( THEPEG_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/thepeg/${THEPEG_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/AthGeneration/externals/VBFNLO.cmake b/Projects/AthGeneration/externals/VBFNLO.cmake
deleted file mode 100644
index 1f5da3bec83..00000000000
--- a/Projects/AthGeneration/externals/VBFNLO.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of VBFNLO to use.
-#
-
-set( VBFNLO_LCGVERSION "3.0.0beta5" )
-set( VBFNLO_LCGROOT
-  "${LCG_RELEASE_DIR}/MCGenerators/vbfnlo/${VBFNLO_LCGVERSION}/${LCG_PLATFORM}" )
diff --git a/Projects/AthGeneration/externals/YODA.cmake b/Projects/AthGeneration/externals/YODA.cmake
deleted file mode 100644
index 388f4c1e158..00000000000
--- a/Projects/AthGeneration/externals/YODA.cmake
+++ /dev/null
@@ -1,6 +0,0 @@
-#
-# File specifying the location of YODA to use.
-#
-set( YODA_LCGVERSION 1.8.0 )
-set( YODA_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/yoda/${YODA_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/AthSimulation/CMakeLists.txt b/Projects/AthSimulation/CMakeLists.txt
index c141911eeb9..5d621dbf2eb 100644
--- a/Projects/AthSimulation/CMakeLists.txt
+++ b/Projects/AthSimulation/CMakeLists.txt
@@ -32,19 +32,6 @@ set( AthenaPoolUtilitiesTest_DIR
    "${CMAKE_SOURCE_DIR}/../../Database/AthenaPOOL/AthenaPoolUtilities/cmake"
    CACHE PATH "Directory holding the AthenaPoolUtilititesTest module" )
 
-# Load all the files from the externals/ subdirectory:
-file( GLOB _externals "${CMAKE_CURRENT_SOURCE_DIR}/externals/*.cmake" )
-foreach( _external ${_externals} )
-   include( ${_external} )
-   get_filename_component( _extName ${_external} NAME_WE )
-   string( TOUPPER ${_extName} _extNameUpper )
-   message( STATUS "Taking ${_extName} from: ${${_extNameUpper}_LCGROOT}" )
-   unset( _extName )
-   unset( _extNameUpper )
-endforeach()
-unset( _external )
-unset( _externals )
-
 # Make the local CMake files visible to AtlasCMake.
 list( INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake )
 
diff --git a/Projects/AthSimulation/cmake/PostConfig.cmake.in b/Projects/AthSimulation/cmake/PostConfig.cmake.in
index 44a30ccfeaf..6db41bd1345 100644
--- a/Projects/AthSimulation/cmake/PostConfig.cmake.in
+++ b/Projects/AthSimulation/cmake/PostConfig.cmake.in
@@ -1,3 +1,4 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #
 # File taking care of pointing the downstream projects at the right
 # version of the externals.
@@ -16,20 +17,3 @@ set( SIMULATIONBASE TRUE CACHE BOOL
 if( SIMULATIONBASE )
    add_definitions( -DSIMULATIONBASE )
 endif()
-
-# Load all the files from the externals/ subdirectory:
-get_filename_component( _thisdir ${CMAKE_CURRENT_LIST_FILE} PATH )
-file( GLOB _externals "${_thisdir}/externals/*.cmake" )
-unset( _thisdir )
-foreach( _external ${_externals} )
-   include( ${_external} )
-   get_filename_component( _extName ${_external} NAME_WE )
-   string( TOUPPER ${_extName} _extNameUpper )
-   if( NOT AthSimulation_FIND_QUIETLY )
-      message( STATUS "Taking ${_extName} from: ${${_extNameUpper}_LCGROOT}" )
-   endif()
-   unset( _extName )
-   unset( _extNameUpper )
-endforeach()
-unset( _external )
-unset( _externals )
diff --git a/Projects/AthSimulation/externals/HEPUtils.cmake b/Projects/AthSimulation/externals/HEPUtils.cmake
deleted file mode 100644
index 8344158ac50..00000000000
--- a/Projects/AthSimulation/externals/HEPUtils.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of HEPUtils to use.
-#
-
-set( HEPUTILS_LCGVERSION 1.3.2 )
-set( HEPUTILS_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/heputils/${HEPUTILS_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/AthSimulation/externals/MCUtils.cmake b/Projects/AthSimulation/externals/MCUtils.cmake
deleted file mode 100644
index f9b41cbffd2..00000000000
--- a/Projects/AthSimulation/externals/MCUtils.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of MCUtils to use.
-#
-
-set( MCUTILS_LCGVERSION 1.3.2 )
-set( MCUTILS_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/mcutils/${MCUTILS_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/AthSimulation/externals/README.md b/Projects/AthSimulation/externals/README.md
deleted file mode 100644
index 410c717ff11..00000000000
--- a/Projects/AthSimulation/externals/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-Directory collecting external package declarations
-==================================================
-
-This directory is used to collect simple CMake files that get included by
-the CMake configuration to set up the locations of all the externals used
-for the offline release build.
-
-Each external should be defined by its own CMake file. The files should
-have a name <Bla> corresponding to the Find<Bla> module name used to find
-the external in question.
-
-The files should define all the variables expected by the Find<Bla> modules,
-which normally boil down to variables:
-
-  - `EXTNAME_LCGROOT`
-  - `EXTNAME_LCGVERSION`
-
-But some modules may require other variables. In which case the `_LCGROOT`
-variable should still be set, to get a nice printout from the Athena
-project during the build about the location of the used external.
diff --git a/Projects/AthSimulation/externals/YODA.cmake b/Projects/AthSimulation/externals/YODA.cmake
deleted file mode 100644
index 3e7af0914e9..00000000000
--- a/Projects/AthSimulation/externals/YODA.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of YODA to use.
-#
-
-set( YODA_LCGVERSION 1.7.5 )
-set( YODA_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/yoda/${YODA_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/Athena/CMakeLists.txt b/Projects/Athena/CMakeLists.txt
index df0ce8aef86..0bf2bb6254a 100644
--- a/Projects/Athena/CMakeLists.txt
+++ b/Projects/Athena/CMakeLists.txt
@@ -71,19 +71,6 @@ set( AthenaPoolUtilitiesTest_DIR
    "${CMAKE_SOURCE_DIR}/../../Database/AthenaPOOL/AthenaPoolUtilities/cmake"
    CACHE PATH "Directory holding the AthenaPoolUtilititesTest module" )
 
-# Load all the files from the externals/ subdirectory:
-file( GLOB _externals "${CMAKE_CURRENT_SOURCE_DIR}/externals/*.cmake" )
-foreach( _external ${_externals} )
-   include( ${_external} )
-   get_filename_component( _extName ${_external} NAME_WE )
-   string( TOUPPER ${_extName} _extNameUpper )
-   message( STATUS "Taking ${_extName} from: ${${_extNameUpper}_LCGROOT}" )
-   unset( _extName )
-   unset( _extNameUpper )
-endforeach()
-unset( _external )
-unset( _externals )
-
 # Make the local CMake files visible to AtlasCMake.
 list( INSERT CMAKE_MODULE_PATH 0 ${CMAKE_SOURCE_DIR}/cmake )
 
diff --git a/Projects/Athena/cmake/PostConfig.cmake.in b/Projects/Athena/cmake/PostConfig.cmake.in
index 11c8073139c..8f6e9750f0f 100644
--- a/Projects/Athena/cmake/PostConfig.cmake.in
+++ b/Projects/Athena/cmake/PostConfig.cmake.in
@@ -1,3 +1,4 @@
+# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 #
 # File taking care of pointing the downstream projects at the right
 # version of the externals.
@@ -22,20 +23,3 @@ if( Athena_FIND_QUIETLY )
 else()
    find_package( Gaudi REQUIRED )
 endif()
-
-# Load all the files from the externals/ subdirectory:
-get_filename_component( _thisdir ${CMAKE_CURRENT_LIST_FILE} PATH )
-file( GLOB _externals "${_thisdir}/externals/*.cmake" )
-unset( _thisdir )
-foreach( _external ${_externals} )
-   include( ${_external} )
-   get_filename_component( _extName ${_external} NAME_WE )
-   string( TOUPPER ${_extName} _extNameUpper )
-   if( NOT Athena_FIND_QUIETLY )
-      message( STATUS "Taking ${_extName} from: ${${_extNameUpper}_LCGROOT}" )
-   endif()
-   unset( _extName )
-   unset( _extNameUpper )
-endforeach()
-unset( _external )
-unset( _externals )
diff --git a/Projects/Athena/externals/Crmc.cmake b/Projects/Athena/externals/Crmc.cmake
deleted file mode 100644
index 9e2df0cfec9..00000000000
--- a/Projects/Athena/externals/Crmc.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of Crmc to use.
-#
-
-set( CRMC_LCGVERSION 1.6.0 )
-set( CRMC_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/crmc/${CRMC_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/Athena/externals/EvtGen.cmake b/Projects/Athena/externals/EvtGen.cmake
deleted file mode 100644
index 5d729fa4457..00000000000
--- a/Projects/Athena/externals/EvtGen.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of EvtGen to use.
-#
-
-set( EVTGEN_LCGVERSION 1.7.0 )
-set( EVTGEN_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/evtgen/${EVTGEN_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/Athena/externals/FJContrib.cmake b/Projects/Athena/externals/FJContrib.cmake
deleted file mode 100644
index 3a0bf681fda..00000000000
--- a/Projects/Athena/externals/FJContrib.cmake
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# File specifying the location of FJContrib to use.
-#
-
-set( FJCONTRIB_LCGVERSION 1.041 )
-set( FJCONTRIB_LCGROOT
-   ${LCG_RELEASE_DIR}/fjcontrib/${FJCONTRIB_LCGVERSION}/${LCG_PLATFORM} )
-
diff --git a/Projects/Athena/externals/HEPUtils.cmake b/Projects/Athena/externals/HEPUtils.cmake
deleted file mode 100644
index 8344158ac50..00000000000
--- a/Projects/Athena/externals/HEPUtils.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of HEPUtils to use.
-#
-
-set( HEPUTILS_LCGVERSION 1.3.2 )
-set( HEPUTILS_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/heputils/${HEPUTILS_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/Athena/externals/Herwig.cmake b/Projects/Athena/externals/Herwig.cmake
deleted file mode 100644
index b0df2d6dd7d..00000000000
--- a/Projects/Athena/externals/Herwig.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of Herwig to use.
-#
-
-set( HERWIG_LCGVERSION 6.521.2 )
-set( HERWIG_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/herwig/${HERWIG_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/Athena/externals/Herwig3.cmake b/Projects/Athena/externals/Herwig3.cmake
deleted file mode 100644
index 70a428981e7..00000000000
--- a/Projects/Athena/externals/Herwig3.cmake
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# File specifying the location of Herwig3 to use.
-#
-
-set( HERWIG3_LCGVERSION 7.2.0 )
-# Comment the following line for H7 versions <7.2
-set( HW3_VER_IS_72 1 )
-set( HERWIG3_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/herwig++/${HERWIG3_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/Athena/externals/Hydjet.cmake b/Projects/Athena/externals/Hydjet.cmake
deleted file mode 100644
index 1eede1364e8..00000000000
--- a/Projects/Athena/externals/Hydjet.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of Hydjet to use.
-#
-
-set( HYDJET_LCGVERSION 1.8 )
-set( HYDJET_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/hydjet/${HYDJET_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/Athena/externals/Lhapdf.cmake b/Projects/Athena/externals/Lhapdf.cmake
deleted file mode 100644
index 03c1e85b5a8..00000000000
--- a/Projects/Athena/externals/Lhapdf.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of Lhapdf to use.
-#
-
-set( LHAPDF_LCGVERSION 6.2.3 )
-set( LHAPDF_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/lhapdf/${LHAPDF_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/Athena/externals/MCUtils.cmake b/Projects/Athena/externals/MCUtils.cmake
deleted file mode 100644
index 1fd58b0093b..00000000000
--- a/Projects/Athena/externals/MCUtils.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of MCUtils to use.
-#
-
-set( MCUTILS_LCGVERSION 1.3.4 )
-set( MCUTILS_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/mcutils/${MCUTILS_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/Athena/externals/MadGraph5Amc.cmake b/Projects/Athena/externals/MadGraph5Amc.cmake
deleted file mode 100644
index 6575c4845bd..00000000000
--- a/Projects/Athena/externals/MadGraph5Amc.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of MadGraph to use.
-#
-
-set( MADGRAPH5AMC_LCGVERSION 2.6.7 )
-set( MADGRAPH5AMC_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/madgraph5amc/${MADGRAPH5AMC_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/Athena/externals/Photospp.cmake b/Projects/Athena/externals/Photospp.cmake
deleted file mode 100644
index 8e0b8c2deae..00000000000
--- a/Projects/Athena/externals/Photospp.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of Photos++ to use.
-#
-
-set( PHOTOSPP_LCGVERSION 3.61 )
-set( PHOTOSPP_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/photos++/${PHOTOSPP_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/Athena/externals/Pythia6.cmake b/Projects/Athena/externals/Pythia6.cmake
deleted file mode 100644
index b8810cd5b85..00000000000
--- a/Projects/Athena/externals/Pythia6.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of Pythia 6 to use.
-#
-
-set( PYTHIA6_LCGVERSION 429.2 )
-set( PYTHIA6_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/pythia6/${PYTHIA6_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/Athena/externals/Pythia8.cmake b/Projects/Athena/externals/Pythia8.cmake
deleted file mode 100644
index 378c1efff99..00000000000
--- a/Projects/Athena/externals/Pythia8.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of Pythia 8 to use.
-#
-
-set( PYTHIA8_LCGVERSION 244 )
-set( PYTHIA8_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/pythia8/${PYTHIA8_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/Athena/externals/README.md b/Projects/Athena/externals/README.md
deleted file mode 100644
index 410c717ff11..00000000000
--- a/Projects/Athena/externals/README.md
+++ /dev/null
@@ -1,20 +0,0 @@
-Directory collecting external package declarations
-==================================================
-
-This directory is used to collect simple CMake files that get included by
-the CMake configuration to set up the locations of all the externals used
-for the offline release build.
-
-Each external should be defined by its own CMake file. The files should
-have a name <Bla> corresponding to the Find<Bla> module name used to find
-the external in question.
-
-The files should define all the variables expected by the Find<Bla> modules,
-which normally boil down to variables:
-
-  - `EXTNAME_LCGROOT`
-  - `EXTNAME_LCGVERSION`
-
-But some modules may require other variables. In which case the `_LCGROOT`
-variable should still be set, to get a nice printout from the Athena
-project during the build about the location of the used external.
diff --git a/Projects/Athena/externals/Rivet.cmake b/Projects/Athena/externals/Rivet.cmake
deleted file mode 100644
index 4e6d2c8d80b..00000000000
--- a/Projects/Athena/externals/Rivet.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of Rivet to use.
-#
-
-set( RIVET_LCGVERSION 3.1.0 )
-set( RIVET_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/rivet/${RIVET_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/Athena/externals/Sherpa.cmake b/Projects/Athena/externals/Sherpa.cmake
deleted file mode 100644
index e23b878d29f..00000000000
--- a/Projects/Athena/externals/Sherpa.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of Sherpa to use.
-#
-
-set( SHERPA_LCGVERSION 2.2.8 )
-set( SHERPA_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/sherpa/${SHERPA_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/Athena/externals/Starlight.cmake b/Projects/Athena/externals/Starlight.cmake
deleted file mode 100644
index 4e0548db7bf..00000000000
--- a/Projects/Athena/externals/Starlight.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of Starlight to use.
-#
-
-set( STARLIGHT_LCGVERSION r313 )
-set( STARLIGHT_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/starlight/${STARLIGHT_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/Athena/externals/Tauolapp.cmake b/Projects/Athena/externals/Tauolapp.cmake
deleted file mode 100644
index 375c6944f2a..00000000000
--- a/Projects/Athena/externals/Tauolapp.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of Tauola++ to use.
-#
-
-set( TAUOLAPP_LCGVERSION 1.1.6 )
-set( TAUOLAPP_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/tauola++/${TAUOLAPP_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/Athena/externals/ThePEG.cmake b/Projects/Athena/externals/ThePEG.cmake
deleted file mode 100644
index cf5c807c458..00000000000
--- a/Projects/Athena/externals/ThePEG.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of ThePEG to use.
-#
-
-set( THEPEG_LCGVERSION 2.2.0 )
-set( THEPEG_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/thepeg/${THEPEG_LCGVERSION}/${LCG_PLATFORM} )
diff --git a/Projects/Athena/externals/YODA.cmake b/Projects/Athena/externals/YODA.cmake
deleted file mode 100644
index 83538dbcbe7..00000000000
--- a/Projects/Athena/externals/YODA.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# File specifying the location of YODA to use.
-#
-
-set( YODA_LCGVERSION 1.8.0 )
-set( YODA_LCGROOT
-   ${LCG_RELEASE_DIR}/MCGenerators/yoda/${YODA_LCGVERSION}/${LCG_PLATFORM} )
-- 
GitLab