From d5d2d9f4543673dfff21b5e2d6f2c9dc43e3dab7 Mon Sep 17 00:00:00 2001
From: Florian Uhlig <f.uhlig@gsi.de>
Date: Tue, 25 Mar 2025 15:13:17 +0100
Subject: [PATCH] Don't install conflicting header files

This fixes the problems that header files with the same name are installed in
the same directory overwritting each other. The solution is not to generate a
dictionary for the library and don't install the header files at all since
without dictionary they are not needed at runtime at all.

Related to #3582
---
 analysis/common/analysis_tree_converter/steer/CMakeLists.txt | 4 ++--
 analysis/common/analysis_tree_converter/steer/Run.cxx        | 2 +-
 analysis/common/analysis_tree_converter/steer/Run.h          | 3 +--
 reco/offline/steer/CMakeLists.txt                            | 4 ++--
 reco/offline/steer/Run.cxx                                   | 2 +-
 reco/offline/steer/Run.h                                     | 2 +-
 sim/response/steer/CMakeLists.txt                            | 4 ++--
 sim/response/steer/Run.cxx                                   | 2 +-
 sim/response/steer/Run.h                                     | 2 +-
 9 files changed, 12 insertions(+), 13 deletions(-)

diff --git a/analysis/common/analysis_tree_converter/steer/CMakeLists.txt b/analysis/common/analysis_tree_converter/steer/CMakeLists.txt
index 185eafc14d..51ec7976c8 100644
--- a/analysis/common/analysis_tree_converter/steer/CMakeLists.txt
+++ b/analysis/common/analysis_tree_converter/steer/CMakeLists.txt
@@ -1,7 +1,7 @@
 # CMakeList file for library libCbmAtcOfflineSteer
 # F. Linz,     27 October 2023
 
-set(SRCS
+set(NO_DICT_SRCS
   Config.cxx
   Run.cxx
   TaskFactory.cxx
@@ -10,7 +10,7 @@ set(SRCS
 set(INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR})
 
 set(LIBRARY_NAME CbmAtConverterSteer)
-set(LINKDEF RootLinkDef.h)
+#set(LINKDEF RootLinkDef.h)
 set(PUBLIC_DEPENDENCIES
   CbmData
   FairRoot::Base
diff --git a/analysis/common/analysis_tree_converter/steer/Run.cxx b/analysis/common/analysis_tree_converter/steer/Run.cxx
index fc5e22e447..ad5e5beb94 100644
--- a/analysis/common/analysis_tree_converter/steer/Run.cxx
+++ b/analysis/common/analysis_tree_converter/steer/Run.cxx
@@ -231,4 +231,4 @@ namespace cbm::atconverter
 
 }  // namespace cbm::atconverter
 
-ClassImp(cbm::atconverter::Run)
+//ClassImp(cbm::atconverter::Run)
diff --git a/analysis/common/analysis_tree_converter/steer/Run.h b/analysis/common/analysis_tree_converter/steer/Run.h
index 1239afe8d1..5ae31bea05 100644
--- a/analysis/common/analysis_tree_converter/steer/Run.h
+++ b/analysis/common/analysis_tree_converter/steer/Run.h
@@ -159,8 +159,7 @@ namespace cbm::atconverter
     Config fConfig                      = {};
     std::set<ECbmModuleId> fDataPresent = {};
 
-
-    ClassDef(cbm::atconverter::Run, 1);
+    // ClassDef(cbm::atconverter::Run, 1);
   };
 
 }  // namespace cbm::atconverter
diff --git a/reco/offline/steer/CMakeLists.txt b/reco/offline/steer/CMakeLists.txt
index 8ada18e7a3..84c3675892 100644
--- a/reco/offline/steer/CMakeLists.txt
+++ b/reco/offline/steer/CMakeLists.txt
@@ -2,7 +2,7 @@
 # V. Friese,     13 May 2023
 
 
-set(SRCS
+set(NO_DICT_SRCS
   Config.cxx
   Run.cxx
   TaskFactory.cxx
@@ -16,7 +16,7 @@ endif()
 
 
 set(LIBRARY_NAME CbmRecoOfflineSteer)
-set(LINKDEF RootLinkDef.h)
+#set(LINKDEF RootLinkDef.h)
 set(PUBLIC_DEPENDENCIES
   AlgoOffline
   CbmData
diff --git a/reco/offline/steer/Run.cxx b/reco/offline/steer/Run.cxx
index af0ac760ee..209e7d8e13 100644
--- a/reco/offline/steer/Run.cxx
+++ b/reco/offline/steer/Run.cxx
@@ -240,4 +240,4 @@ namespace cbm::reco::offline
 
 }  // namespace cbm::reco::offline
 
-ClassImp(cbm::reco::offline::Run)
+//ClassImp(cbm::reco::offline::Run)
diff --git a/reco/offline/steer/Run.h b/reco/offline/steer/Run.h
index 9a47c06022..697e0eb385 100644
--- a/reco/offline/steer/Run.h
+++ b/reco/offline/steer/Run.h
@@ -152,7 +152,7 @@ namespace cbm::reco::offline
     std::set<ECbmModuleId> fDataPresent = {};
 
 
-    ClassDef(cbm::reco::offline::Run, 1);
+    // ClassDef(cbm::reco::offline::Run, 1);
   };
 
 }  // namespace cbm::reco::offline
diff --git a/sim/response/steer/CMakeLists.txt b/sim/response/steer/CMakeLists.txt
index 250a007375..df73c871ce 100644
--- a/sim/response/steer/CMakeLists.txt
+++ b/sim/response/steer/CMakeLists.txt
@@ -1,7 +1,7 @@
 # CMakeList file for library libCbmSimDigitizationSteer
 # F. Linz,     09 January 2024
 
-set(SRCS
+set(NO_DICT_SRCS
   Config.cxx
   Run.cxx
   )
@@ -9,7 +9,7 @@ set(SRCS
 set(INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR})
 
 set(LIBRARY_NAME CbmSimDigitizationSteer)
-set(LINKDEF RootLinkDef.h)
+#set(LINKDEF RootLinkDef.h)
 set(PUBLIC_DEPENDENCIES
   CbmData
   FairRoot::Base
diff --git a/sim/response/steer/Run.cxx b/sim/response/steer/Run.cxx
index 1e76e6be65..a44db7c19b 100644
--- a/sim/response/steer/Run.cxx
+++ b/sim/response/steer/Run.cxx
@@ -176,4 +176,4 @@ namespace cbm::sim::digitization
 
 }  // namespace cbm::sim::digitization
 
-ClassImp(cbm::sim::digitization::Run)
+//ClassImp(cbm::sim::digitization::Run)
diff --git a/sim/response/steer/Run.h b/sim/response/steer/Run.h
index 08ff0a60ec..053a3c5cfa 100644
--- a/sim/response/steer/Run.h
+++ b/sim/response/steer/Run.h
@@ -122,7 +122,7 @@ namespace cbm::sim::digitization
     Config fConfig = {};
 
 
-    ClassDef(cbm::sim::digitization::Run, 1);
+    // ClassDef(cbm::sim::digitization::Run, 1);
   };
 
 }  // namespace cbm::sim::digitization
-- 
GitLab