diff --git a/Generators/Horace_i/CMakeLists.txt b/Generators/Horace_i/CMakeLists.txt
index 3dfb052dbb695475e5b42050a8115237c08e6d2c..3da55aef82f761d88727331a9577292aa3ab8d5c 100644
--- a/Generators/Horace_i/CMakeLists.txt
+++ b/Generators/Horace_i/CMakeLists.txt
@@ -11,7 +11,7 @@ atlas_subdir( Horace_i )
 # Component(s) in the package:
 atlas_add_library( Horace_i
                    src/*.F
-                   PUBLIC_HEADERS Horace_i )
+                   NO_PUBLIC_HEADERS )
 
 # Install files from the package:
 atlas_install_joboptions( share/*.py )
diff --git a/HLT/Event/TrigByteStreamCnvSvc/CMakeLists.txt b/HLT/Event/TrigByteStreamCnvSvc/CMakeLists.txt
index 0fd3fc337027c2d1dac9e9f59128a585f1bddd39..b58f7f61a4f20db677855c95824c3a7ade9125d2 100644
--- a/HLT/Event/TrigByteStreamCnvSvc/CMakeLists.txt
+++ b/HLT/Event/TrigByteStreamCnvSvc/CMakeLists.txt
@@ -27,8 +27,7 @@ atlas_add_library(
   TrigByteStreamCnvSvcLib
     TrigByteStreamCnvSvc/*.h
     src/*.cxx
-  PUBLIC_HEADERS
-    TrigByteStreamCnvSvc
+  NO_PUBLIC_HEADERS
   LINK_LIBRARIES
     AthenaBaseComps
     ByteStreamData
diff --git a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/CMakeLists.txt b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/CMakeLists.txt
index 7031cfb77e60254eca013d2bd0c758f6c170d8ff..21cf16a47fecc2f8df207238f9f249820aa8bffb 100644
--- a/InnerDetector/InDetConditions/PixelConditionsAlgorithms/CMakeLists.txt
+++ b/InnerDetector/InDetConditions/PixelConditionsAlgorithms/CMakeLists.txt
@@ -42,7 +42,7 @@ find_package( ROOT COMPONENTS Core Hist RIO )
 atlas_add_library( PixelConditionsAlgorithmsLib
    PixelConditionsAlgorithms/*.h
    INTERFACE
-   PUBLIC_HEADERS PixelConditionsAlgorithms
+   NO_PUBLIC_HEADERS
    LINK_LIBRARIES GaudiKernel AthenaKernel AthenaBaseComps PixelConditionsData DetDescrConditions
    AthenaPoolUtilities PathResolver TrkGeometry)
 
diff --git a/LArCalorimeter/LArG4/LArG4FCAL/CMakeLists.txt b/LArCalorimeter/LArG4/LArG4FCAL/CMakeLists.txt
index 7ebb3a1d830f9de8918803b8de1e4df82577b583..67869fbf1e4b6dec2337ec25de709bb6f9061141 100644
--- a/LArCalorimeter/LArG4/LArG4FCAL/CMakeLists.txt
+++ b/LArCalorimeter/LArG4/LArG4FCAL/CMakeLists.txt
@@ -28,7 +28,6 @@ find_package( XercesC )
 atlas_add_component( LArG4FCAL
                    src/*.cc
                    src/components/*.cxx
-                   PUBLIC_HEADERS LArG4FCAL
                    PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
                    LINK_LIBRARIES LArG4Code LArReadoutGeometry CaloG4SimLib StoreGateLib SGtests
diff --git a/LArCalorimeter/LArG4/LArG4H8SD/CMakeLists.txt b/LArCalorimeter/LArG4/LArG4H8SD/CMakeLists.txt
index b49d6410a0b91219954ff5a6b7df029cad18519d..06a905150974bc9d1ceeecce196f8fb9cc952098 100644
--- a/LArCalorimeter/LArG4/LArG4H8SD/CMakeLists.txt
+++ b/LArCalorimeter/LArG4/LArG4H8SD/CMakeLists.txt
@@ -23,7 +23,6 @@ find_package( XercesC )
 atlas_add_component( LArG4H8SD
                    src/*.cc
                    src/components/*.cxx
-                   PUBLIC_HEADERS LArG4H8SD
                    PRIVATE_INCLUDE_DIRS ${GEANT4_INCLUDE_DIRS} ${XERCESC_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
                    LINK_LIBRARIES CaloG4SimLib StoreGateLib SGtests
diff --git a/LArCalorimeter/LArG4/LArG4MiniFCAL/CMakeLists.txt b/LArCalorimeter/LArG4/LArG4MiniFCAL/CMakeLists.txt
index 92c6afff69fbafbdc2e347acc78676061c35046d..a90464572f9aa074e1e64a80c44b245169ec88d3 100644
--- a/LArCalorimeter/LArG4/LArG4MiniFCAL/CMakeLists.txt
+++ b/LArCalorimeter/LArG4/LArG4MiniFCAL/CMakeLists.txt
@@ -28,7 +28,6 @@ find_package( XercesC )
 atlas_add_component( LArG4MiniFCAL
                    src/*.cc
                    src/components/*.cxx
-                   PUBLIC_HEADERS LArG4MiniFCAL
                    INCLUDE_DIRS ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS}
                    PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CORAL_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS}
                    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
diff --git a/MuonSpectrometer/MuonCnv/MuonEventCnvTools/CMakeLists.txt b/MuonSpectrometer/MuonCnv/MuonEventCnvTools/CMakeLists.txt
index ca095520751906cc432d4231546543809ba5c45e..7b031abffb1d13b18d1958e0f64cedbf12c6537f 100644
--- a/MuonSpectrometer/MuonCnv/MuonEventCnvTools/CMakeLists.txt
+++ b/MuonSpectrometer/MuonCnv/MuonEventCnvTools/CMakeLists.txt
@@ -29,6 +29,5 @@ atlas_add_component( MuonEventCnvTools
                      LINK_LIBRARIES AthenaBaseComps StoreGateLib SGtests Identifier EventPrimitives GaudiKernel MuonReadoutGeometry MuonIdHelpersLib MuonPrepRawData MuonRIO_OnTrack TrkDetElementBase TrkPrepRawData TrkRIO_OnTrack )
 
 # Install files from the package:
-atlas_install_headers( MuonEventCnvTools )
 atlas_install_joboptions( share/*.py )
 
diff --git a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/CMakeLists.txt b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/CMakeLists.txt
index b9259511d8dbc1b9ce68cd53f5078f5699304722..4cfda537d0bb44b9977ce5ec9823cec9a1be265d 100644
--- a/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/CMakeLists.txt
+++ b/MuonSpectrometer/MuonReconstruction/MuonTrackMakers/MuonTrackMakerAlgs/MuonSegmentTrackMaker/CMakeLists.txt
@@ -25,5 +25,4 @@ atlas_add_component( MuonSegmentTrackMaker
                      LINK_LIBRARIES AthenaBaseComps GaudiKernel StoreGateLib SGtests MuonSegment MuonRecHelperToolsLib MuonRecToolInterfaces Particle TrkSegment TrkTrack )
 
 # Install files from the package:
-atlas_install_headers( MuonSegmentTrackMaker )
 
diff --git a/PhysicsAnalysis/PhysicsValidation/VKalVrtValidation/CMakeLists.txt b/PhysicsAnalysis/PhysicsValidation/VKalVrtValidation/CMakeLists.txt
index 18d56ccb9b00572eddffeb9ab813f1a0c9eebdb1..bb8b5fa9833d4515c57e8c51fa5b48aeffc936f4 100644
--- a/PhysicsAnalysis/PhysicsValidation/VKalVrtValidation/CMakeLists.txt
+++ b/PhysicsAnalysis/PhysicsValidation/VKalVrtValidation/CMakeLists.txt
@@ -24,7 +24,7 @@ find_package( HepPDT )
 # Libraries in the package:
 atlas_add_library( VKalVrtValidationLib
    VKalVrtValidation/*.h src/*.cxx
-   PUBLIC_HEADERS VKalVrtValidation
+   NO_PUBLIC_HEADERS 
    INCLUDE_DIRS ${ROOT_INCLUDE_DIRS} 
    INCLUDE_DIRS ${HEPPDT_INCLUDE_DIRS}
    LINK_LIBRARIES ${ROOT_LIBRARIES} xAODBase AthenaBaseComps AthAnalysisBaseCompsLib xAODTracking JpsiUpsilonToolsLib
diff --git a/Projects/AnalysisBase/externals.txt b/Projects/AnalysisBase/externals.txt
index 84a910f5157f203d55d1b0beedd6d55237c6ff31..a228ab2d28e1532d66723cfbbb6312659d52a249 100644
--- a/Projects/AnalysisBase/externals.txt
+++ b/Projects/AnalysisBase/externals.txt
@@ -6,4 +6,4 @@
 # forbidden.
 
 # The version of atlas/atlasexternals to use:
-AnalysisBaseExternalsVersion = 2.0.39
+AnalysisBaseExternalsVersion = 2.0.40
diff --git a/Projects/AnalysisTop/externals.txt b/Projects/AnalysisTop/externals.txt
index a56fce9ee46327499b63b8a40ff6a62b3fb1bc1f..82e439cf646f5c2e43db67926e46d7d6e5358328 100644
--- a/Projects/AnalysisTop/externals.txt
+++ b/Projects/AnalysisTop/externals.txt
@@ -1,4 +1,4 @@
 # Versions of the various externals to build before starting the build of
 # this project, when doing a full stack nightly build.
 
-AnalysisBaseExternalsVersion = 2.0.39
+AnalysisBaseExternalsVersion = 2.0.40
diff --git a/Projects/AthDataQuality/externals.txt b/Projects/AthDataQuality/externals.txt
index 7a667e4d3f4f41c7909af3e7d223337b5b8a69de..6f101b6d6ee07611e8c6f6bbd9256bd2b2f5f170 100644
--- a/Projects/AthDataQuality/externals.txt
+++ b/Projects/AthDataQuality/externals.txt
@@ -5,4 +5,4 @@
 # an "origin/" prefix before it. For tags however this is explicitly
 # forbidden.
 
-AtlasExternalsVersion = 2.0.39
+AtlasExternalsVersion = 2.0.40
diff --git a/Projects/AthSimulation/externals.txt b/Projects/AthSimulation/externals.txt
index e97aeba6bf9a2a5e983fa608bb4b90af7806073a..dbe42150a1129dde6bc1d884b0393206cf35dd35 100644
--- a/Projects/AthSimulation/externals.txt
+++ b/Projects/AthSimulation/externals.txt
@@ -6,7 +6,7 @@
 # forbidden.
 
 # The version of atlas/atlasexternals to use:
-AthSimulationExternalsVersion = 2.0.39
+AthSimulationExternalsVersion = 2.0.40
 
 # The version of atlas/Gaudi to use:
 GaudiVersion = v32r2.001
diff --git a/Projects/Athena/externals.txt b/Projects/Athena/externals.txt
index 038cec6076580cfefe36c6f5c6c19517134bbaa7..d8c4d7191e8ef0815d227263afb1a0022353d135 100644
--- a/Projects/Athena/externals.txt
+++ b/Projects/Athena/externals.txt
@@ -6,7 +6,7 @@
 # forbidden.
 
 # The version of atlas/atlasexternals to use:
-AthenaExternalsVersion = 2.0.39
+AthenaExternalsVersion = 2.0.40
 
 # The version of atlas/Gaudi to use:
 GaudiVersion = v32r2.001
diff --git a/Simulation/G4Utilities/Geo2G4/CMakeLists.txt b/Simulation/G4Utilities/Geo2G4/CMakeLists.txt
index ed0d31beba197049e551b290d84a3c69431ea937..8b3e193f82c765235e2df01d9e8651d5a8b00926 100644
--- a/Simulation/G4Utilities/Geo2G4/CMakeLists.txt
+++ b/Simulation/G4Utilities/Geo2G4/CMakeLists.txt
@@ -32,7 +32,7 @@ find_package( GeoModel )
 # Component(s) in the package:
 atlas_add_library( Geo2G4Lib
                    src/*.cxx
-                   PUBLIC_HEADERS Geo2G4
+                   NO_PUBLIC_HEADERS
                    INCLUDE_DIRS ${XERCESC_INCLUDE_DIRS} ${GEANT4_INCLUDE_DIRS} ${ROOT_INCLUDE_DIRS}
                    PRIVATE_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${CLHEP_INCLUDE_DIRS} ${GEOMODEL_INCLUDE_DIRS}
                    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
diff --git a/Simulation/Tools/McEventCollectionFilter/CMakeLists.txt b/Simulation/Tools/McEventCollectionFilter/CMakeLists.txt
index 5291f8355d64535b94fe98526f6430ed0af17cd9..368e2fd0978ec5bc5d82499843ffc0eea7d64b38 100644
--- a/Simulation/Tools/McEventCollectionFilter/CMakeLists.txt
+++ b/Simulation/Tools/McEventCollectionFilter/CMakeLists.txt
@@ -22,7 +22,7 @@ find_package( HepMC )
 # Component(s) in the package:
 atlas_add_library( McEventCollectionFilterLib
                    src/*.cxx
-                   PUBLIC_HEADERS McEventCollectionFilter
+                   NO_PUBLIC_HEADERS
                    PRIVATE_INCLUDE_DIRS ${CLHEP_INCLUDE_DIRS} ${HEPMC_INCLUDE_DIRS} ${EIGEN_INCLUDE_DIRS}
                    PRIVATE_DEFINITIONS ${CLHEP_DEFINITIONS}
                    LINK_LIBRARIES StoreGateLib SGtests
diff --git a/Tracking/Acts/ActsGeometry/src/ActsExtrapolationAlg.cxx b/Tracking/Acts/ActsGeometry/src/ActsExtrapolationAlg.cxx
index c79674a69e60edd5222dc0ea0e462ee5c726b6f5..712941e6943b61ec2f3741a1051922a53194d0c6 100755
--- a/Tracking/Acts/ActsGeometry/src/ActsExtrapolationAlg.cxx
+++ b/Tracking/Acts/ActsGeometry/src/ActsExtrapolationAlg.cxx
@@ -103,7 +103,7 @@ StatusCode ActsExtrapolationAlg::execute(const EventContext& ctx) const
 
   Acts::BoundVector pars;
   pars << d0, z0, phi, theta, qop, t;
-  std::unique_ptr<Acts::BoundSymMatrix> cov = nullptr;
+  std::optional<Acts::BoundSymMatrix> cov = std::nullopt;
 
   std::vector<Acts::detail::Step> steps;