From c31369e90e2ec25956adf678b92266bb8b50d73d Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 15:34:09 +0200 Subject: [PATCH 01/40] added root include to duneanaobj/SR/CMLists --- duneanaobj/StandardRecord/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/duneanaobj/StandardRecord/CMakeLists.txt b/duneanaobj/StandardRecord/CMakeLists.txt index bd5677b..517e54a 100644 --- a/duneanaobj/StandardRecord/CMakeLists.txt +++ b/duneanaobj/StandardRecord/CMakeLists.txt @@ -2,7 +2,7 @@ add_subdirectory(Proxy) add_subdirectory(Flat) # for classes_def.xml!! -include_directories( ${CMAKE_CURRENT_SOURCE_DIR} ) +include_directories( ${CMAKE_CURRENT_SOURCE_DIR} "$ENV{ROOT_INCLUDE_DIRECTORIES}") set( PACKAGE duneanaobj_StandardRecord ) FILE( GLOB src_files *.cxx ) From 383f6e2b6e11aea13c3d3b47fce6e8869d7cbc6f Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 15:35:13 +0200 Subject: [PATCH 02/40] changed root include dirs to path --- duneanaobj/StandardRecord/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/duneanaobj/StandardRecord/CMakeLists.txt b/duneanaobj/StandardRecord/CMakeLists.txt index 517e54a..2e38f82 100644 --- a/duneanaobj/StandardRecord/CMakeLists.txt +++ b/duneanaobj/StandardRecord/CMakeLists.txt @@ -2,7 +2,7 @@ add_subdirectory(Proxy) add_subdirectory(Flat) # for classes_def.xml!! -include_directories( ${CMAKE_CURRENT_SOURCE_DIR} "$ENV{ROOT_INCLUDE_DIRECTORIES}") +include_directories( ${CMAKE_CURRENT_SOURCE_DIR} "$ENV{ROOT_INCLUDE_PATH}") set( PACKAGE duneanaobj_StandardRecord ) FILE( GLOB src_files *.cxx ) From 59c79f917bbbaac3d568e71b152025872a61ebe0 Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 15:40:54 +0200 Subject: [PATCH 03/40] added cetbuildtools dep to CMakeLists.txt --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 97be255..e296bf3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,6 +17,7 @@ cmake_minimum_required (VERSION 3.20 FATAL_ERROR) # cmake_policy(VERSION 3.18) find_package(cetmodules REQUIRED) +find_package(cetbuildtools REQUIRED) project(duneanaobj LANGUAGES CXX) set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 03.05.00) From 771ff5f958634ed4d6a50e9aac67d9a8b1bd48dd Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 15:41:51 +0200 Subject: [PATCH 04/40] removed cet_cmake_config from CMLists --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e296bf3..6679b85 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,4 +60,4 @@ endif() add_subdirectory(duneanaobj) -cet_cmake_config() +#cet_cmake_config() From 735fdabae9ae6bf8819a5c6d34d39015c2c4fbb2 Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 15:45:01 +0200 Subject: [PATCH 05/40] removed extra / from proxy genproxy command --- duneanaobj/StandardRecord/Proxy/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/duneanaobj/StandardRecord/Proxy/CMakeLists.txt b/duneanaobj/StandardRecord/Proxy/CMakeLists.txt index 3ae40de..07e865b 100644 --- a/duneanaobj/StandardRecord/Proxy/CMakeLists.txt +++ b/duneanaobj/StandardRecord/Proxy/CMakeLists.txt @@ -3,7 +3,7 @@ FILE(GLOB SR_DEPENDENCIES duneanaobj/StandardRecord/*.h) add_custom_command(# Rebuild if anything in StandardRecord/ changes DEPENDS ${SR_DEPENDENCIES} OUTPUT SRProxy.cxx SRProxy.h FwdDeclare.h - COMMAND gen_srproxy -i duneanaobj/StandardRecord/StandardRecord.h -o SRProxy --target caf::StandardRecord --include-path ${PROJECT_SOURCE_DIR}:$ENV{ROOT_INC} --output-path duneanaobj/StandardRecord/Proxy/ --prolog ${CMAKE_CURRENT_SOURCE_DIR}/Prolog.h --epilog-fwd ${CMAKE_CURRENT_SOURCE_DIR}/EpilogFwd.h --extra-cflags ' -D_Float16=short -fsized-deallocation' + COMMAND gen_srproxy -i duneanaobj/StandardRecord/StandardRecord.h -o SRProxy --target caf::StandardRecord --include-path ${PROJECT_SOURCE_DIR}:$ENV{ROOT_INC} --output-path duneanaobj/StandardRecord/Proxy --prolog ${CMAKE_CURRENT_SOURCE_DIR}/Prolog.h --epilog-fwd ${CMAKE_CURRENT_SOURCE_DIR}/EpilogFwd.h --extra-cflags ' -D_Float16=short -fsized-deallocation' ) include_directories($ENV{SRPROXY_INC}) From a5c7771a823e2d47f4e22515576e31a0815cd66a Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 15:48:16 +0200 Subject: [PATCH 06/40] included top directory for SRProxy --- duneanaobj/StandardRecord/Proxy/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/duneanaobj/StandardRecord/Proxy/CMakeLists.txt b/duneanaobj/StandardRecord/Proxy/CMakeLists.txt index 07e865b..d8b7075 100644 --- a/duneanaobj/StandardRecord/Proxy/CMakeLists.txt +++ b/duneanaobj/StandardRecord/Proxy/CMakeLists.txt @@ -6,7 +6,7 @@ add_custom_command(# Rebuild if anything in StandardRecord/ changes COMMAND gen_srproxy -i duneanaobj/StandardRecord/StandardRecord.h -o SRProxy --target caf::StandardRecord --include-path ${PROJECT_SOURCE_DIR}:$ENV{ROOT_INC} --output-path duneanaobj/StandardRecord/Proxy --prolog ${CMAKE_CURRENT_SOURCE_DIR}/Prolog.h --epilog-fwd ${CMAKE_CURRENT_SOURCE_DIR}/EpilogFwd.h --extra-cflags ' -D_Float16=short -fsized-deallocation' ) -include_directories($ENV{SRPROXY_INC}) +include_directories($ENV{SRPROXY_INC} .) # This is a very picky error buried inside template instantiations #add_definitions(-Wno-int-in-bool-context) From 449ed374f0c26dea14a997f313a245e6ef2e5b30 Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 15:51:06 +0200 Subject: [PATCH 07/40] included build dir for SRProxy include to work --- duneanaobj/StandardRecord/Proxy/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/duneanaobj/StandardRecord/Proxy/CMakeLists.txt b/duneanaobj/StandardRecord/Proxy/CMakeLists.txt index d8b7075..50a8096 100644 --- a/duneanaobj/StandardRecord/Proxy/CMakeLists.txt +++ b/duneanaobj/StandardRecord/Proxy/CMakeLists.txt @@ -6,7 +6,7 @@ add_custom_command(# Rebuild if anything in StandardRecord/ changes COMMAND gen_srproxy -i duneanaobj/StandardRecord/StandardRecord.h -o SRProxy --target caf::StandardRecord --include-path ${PROJECT_SOURCE_DIR}:$ENV{ROOT_INC} --output-path duneanaobj/StandardRecord/Proxy --prolog ${CMAKE_CURRENT_SOURCE_DIR}/Prolog.h --epilog-fwd ${CMAKE_CURRENT_SOURCE_DIR}/EpilogFwd.h --extra-cflags ' -D_Float16=short -fsized-deallocation' ) -include_directories($ENV{SRPROXY_INC} .) +include_directories($ENV{SRPROXY_INC} ${CMAKE_BINARY_DIR}) # This is a very picky error buried inside template instantiations #add_definitions(-Wno-int-in-bool-context) From ec6a0590a4742e564b794786700f30e51635796d Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 15:52:22 +0200 Subject: [PATCH 08/40] included build dir for FlatRecord include to work --- duneanaobj/StandardRecord/Flat/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/duneanaobj/StandardRecord/Flat/CMakeLists.txt b/duneanaobj/StandardRecord/Flat/CMakeLists.txt index 25d2ad8..228029f 100644 --- a/duneanaobj/StandardRecord/Flat/CMakeLists.txt +++ b/duneanaobj/StandardRecord/Flat/CMakeLists.txt @@ -6,7 +6,7 @@ add_custom_command(# Rebuild if anything in StandardRecord/ changes COMMAND gen_srproxy --flat -i duneanaobj/StandardRecord/StandardRecord.h -o FlatRecord --target caf::StandardRecord --include-path ${PROJECT_SOURCE_DIR}:$ENV{ROOT_INC} --output-path duneanaobj/StandardRecord/Flat/ --prolog ${CMAKE_CURRENT_SOURCE_DIR}/Prolog.h --extra-cflags ' -D_Float16=short -fsized-deallocation' ) -include_directories($ENV{SRPROXY_INC}) +include_directories($ENV{SRPROXY_INC} ${CMAKE_BINARY_DIR}) if(DEFINED CETMODULES_CURRENT_PROJECT_NAME) cet_make_library(LIBRARY_NAME duneanaobj_StandardRecordFlat From 17cd034503e56db4649be1069ee5c118591bb50d Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 16:13:28 +0200 Subject: [PATCH 09/40] fixed install directory maybe? --- duneanaobj/StandardRecord/Flat/CMakeLists.txt | 3 ++- duneanaobj/StandardRecord/Proxy/CMakeLists.txt | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/duneanaobj/StandardRecord/Flat/CMakeLists.txt b/duneanaobj/StandardRecord/Flat/CMakeLists.txt index 228029f..98d8bdd 100644 --- a/duneanaobj/StandardRecord/Flat/CMakeLists.txt +++ b/duneanaobj/StandardRecord/Flat/CMakeLists.txt @@ -26,6 +26,7 @@ else() target_link_libraries(duneanaobj_StandardRecordFlat ${ROOT_BASIC_LIB_LIST} ROOT::TreePlayer) install(FILES ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Flat/FlatRecord.h ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Flat/FwdDeclare.h - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/duneanaobj) + DESTINATION ${CMAKE_INSTALL_PREFIX}/duneanaobj) +# DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/duneanaobj) endif() diff --git a/duneanaobj/StandardRecord/Proxy/CMakeLists.txt b/duneanaobj/StandardRecord/Proxy/CMakeLists.txt index 50a8096..6931f69 100644 --- a/duneanaobj/StandardRecord/Proxy/CMakeLists.txt +++ b/duneanaobj/StandardRecord/Proxy/CMakeLists.txt @@ -21,6 +21,7 @@ if(DEFINED CETMODULES_CURRENT_PROJECT_NAME) message(STATUS "MRB_BUILDDIR = $ENV{MRB_BUILDDIR}") set(builddir $ENV{MRB_BUILDDIR}/duneanaobj) else() + message(STATUS "BUILDDIR defaulting to ${CMAKE_BINARY_DIR}") set(builddir ${CMAKE_BINARY_DIR}) endif() install_headers(EXTRAS ${builddir}/duneanaobj/StandardRecord/Proxy/SRProxy.h ${builddir}/duneanaobj/StandardRecord/Proxy/FwdDeclare.h) @@ -30,6 +31,7 @@ else() target_link_libraries(duneanaobj_StandardRecordProxy ${ROOT_BASIC_LIB_LIST} ROOT::TreePlayer) install(FILES ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Proxy/SRProxy.h ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Proxy/FwdDeclare.h - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/duneanaobj) + DESTINATION ${CMAKE_INSTALL_PREFIX}/duneanaobj) +#DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/duneanaobj) endif() From f529e98bfd477c15bf048f509eb9dc7f84fbd68b Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 16:40:55 +0200 Subject: [PATCH 10/40] actually install the headers maybe? useful... --- duneanaobj/StandardRecord/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/duneanaobj/StandardRecord/CMakeLists.txt b/duneanaobj/StandardRecord/CMakeLists.txt index 2e38f82..e228f43 100644 --- a/duneanaobj/StandardRecord/CMakeLists.txt +++ b/duneanaobj/StandardRecord/CMakeLists.txt @@ -6,6 +6,7 @@ include_directories( ${CMAKE_CURRENT_SOURCE_DIR} "$ENV{ROOT_INCLUDE_PATH}") set( PACKAGE duneanaobj_StandardRecord ) FILE( GLOB src_files *.cxx ) +FILE( GLOB inc_files *.h ) # For this directory only, pedantic option to catch uninitialized SR fields # add_compile_options(-Weffc++) @@ -28,5 +29,6 @@ else() target_link_libraries(duneanaobj_StandardRecord ROOT::Core ROOT::Physics ) - # n.b.: missing the dictionary and installation! + install(PUBLIC_HEADER ${inc_files}) + # n.b.: missing the dictionary and installation! # ye lmao it is haha good one xd endif() From 22763365f61c53eaed1764cbdda500f744bb6e37 Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 16:47:27 +0200 Subject: [PATCH 11/40] actually install the headers maybe? useful...2 --- duneanaobj/StandardRecord/CMakeLists.txt | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/duneanaobj/StandardRecord/CMakeLists.txt b/duneanaobj/StandardRecord/CMakeLists.txt index e228f43..61b435f 100644 --- a/duneanaobj/StandardRecord/CMakeLists.txt +++ b/duneanaobj/StandardRecord/CMakeLists.txt @@ -24,10 +24,9 @@ if(DEFINED CETMODULES_CURRENT_PROJECT_NAME) install_headers() install_source() else() - add_library(duneanaobj_StandardRecord - ${src_files}) - target_link_libraries(duneanaobj_StandardRecord - ROOT::Core ROOT::Physics ) + add_library(duneanaobj_StandardRecord ${src_files}) + + target_sources(target_link_libraries(duneanaobj_StandardRecord ROOT::Core ROOT::Physics) install(PUBLIC_HEADER ${inc_files}) # n.b.: missing the dictionary and installation! # ye lmao it is haha good one xd From a5af180c517cdc91f8fbfe12c9431b621fac8ee3 Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 16:48:56 +0200 Subject: [PATCH 12/40] actually install the headers maybe? useful...3 --- duneanaobj/StandardRecord/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/duneanaobj/StandardRecord/CMakeLists.txt b/duneanaobj/StandardRecord/CMakeLists.txt index 61b435f..e019e3e 100644 --- a/duneanaobj/StandardRecord/CMakeLists.txt +++ b/duneanaobj/StandardRecord/CMakeLists.txt @@ -26,8 +26,9 @@ if(DEFINED CETMODULES_CURRENT_PROJECT_NAME) else() add_library(duneanaobj_StandardRecord ${src_files}) - target_sources(target_link_libraries(duneanaobj_StandardRecord ROOT::Core ROOT::Physics) + target_sources(target_link_libraries(duneanaobj_StandardRecord) ROOT::Core ROOT::Physics) + install(LIBRARY duneanaobj_StandardRecord}) install(PUBLIC_HEADER ${inc_files}) # n.b.: missing the dictionary and installation! # ye lmao it is haha good one xd endif() From ad681607c2e5b1e4f2b3697c03ab19a000ff7911 Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 16:50:19 +0200 Subject: [PATCH 13/40] actually install the headers maybe? useful...4 --- duneanaobj/StandardRecord/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/duneanaobj/StandardRecord/CMakeLists.txt b/duneanaobj/StandardRecord/CMakeLists.txt index e019e3e..56d2b29 100644 --- a/duneanaobj/StandardRecord/CMakeLists.txt +++ b/duneanaobj/StandardRecord/CMakeLists.txt @@ -29,6 +29,6 @@ else() target_sources(target_link_libraries(duneanaobj_StandardRecord) ROOT::Core ROOT::Physics) install(LIBRARY duneanaobj_StandardRecord}) - install(PUBLIC_HEADER ${inc_files}) + install(FILE_SET ${inc_files}) # n.b.: missing the dictionary and installation! # ye lmao it is haha good one xd endif() From 059787d0ba02c4bb14495d1ee76e6a99c8769e7d Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 16:53:10 +0200 Subject: [PATCH 14/40] actually install the headers maybe? useful...5 --- duneanaobj/StandardRecord/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/duneanaobj/StandardRecord/CMakeLists.txt b/duneanaobj/StandardRecord/CMakeLists.txt index 56d2b29..9e01ee1 100644 --- a/duneanaobj/StandardRecord/CMakeLists.txt +++ b/duneanaobj/StandardRecord/CMakeLists.txt @@ -29,6 +29,6 @@ else() target_sources(target_link_libraries(duneanaobj_StandardRecord) ROOT::Core ROOT::Physics) install(LIBRARY duneanaobj_StandardRecord}) - install(FILE_SET ${inc_files}) + install(FILES ${inc_files} DESTINATION ${CMAKE_INSTALL_PREFIX}/duneanaobj) # n.b.: missing the dictionary and installation! # ye lmao it is haha good one xd endif() From da0b42fba0ac5f0a5bf5edae1196bc8c0a3a74cb Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 16:56:08 +0200 Subject: [PATCH 15/40] actually install the headers maybe? useful...6 --- duneanaobj/StandardRecord/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/duneanaobj/StandardRecord/CMakeLists.txt b/duneanaobj/StandardRecord/CMakeLists.txt index 9e01ee1..541c8eb 100644 --- a/duneanaobj/StandardRecord/CMakeLists.txt +++ b/duneanaobj/StandardRecord/CMakeLists.txt @@ -28,7 +28,7 @@ else() target_sources(target_link_libraries(duneanaobj_StandardRecord) ROOT::Core ROOT::Physics) - install(LIBRARY duneanaobj_StandardRecord}) + install(TARGETS duneanaobj_StandardRecord LIBRARY DESTINATION lib INCLUDES DESTINATION duneanaobj) install(FILES ${inc_files} DESTINATION ${CMAKE_INSTALL_PREFIX}/duneanaobj) # n.b.: missing the dictionary and installation! # ye lmao it is haha good one xd endif() From 5b4b6d895ed96c0e53ff859c0cb159b5bb5eddef Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 16:57:04 +0200 Subject: [PATCH 16/40] actually install the headers maybe? useful...7 --- duneanaobj/StandardRecord/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/duneanaobj/StandardRecord/CMakeLists.txt b/duneanaobj/StandardRecord/CMakeLists.txt index 541c8eb..2088372 100644 --- a/duneanaobj/StandardRecord/CMakeLists.txt +++ b/duneanaobj/StandardRecord/CMakeLists.txt @@ -28,7 +28,7 @@ else() target_sources(target_link_libraries(duneanaobj_StandardRecord) ROOT::Core ROOT::Physics) - install(TARGETS duneanaobj_StandardRecord LIBRARY DESTINATION lib INCLUDES DESTINATION duneanaobj) + #install(TARGETS duneanaobj_StandardRecord LIBRARY DESTINATION lib INCLUDES DESTINATION duneanaobj) install(FILES ${inc_files} DESTINATION ${CMAKE_INSTALL_PREFIX}/duneanaobj) # n.b.: missing the dictionary and installation! # ye lmao it is haha good one xd endif() From 98eaa8f844fc5b0834482d361aba605a23ce4408 Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 16:58:51 +0200 Subject: [PATCH 17/40] actually install the headers maybe? useful...8 --- duneanaobj/StandardRecord/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/duneanaobj/StandardRecord/CMakeLists.txt b/duneanaobj/StandardRecord/CMakeLists.txt index 2088372..3401dd8 100644 --- a/duneanaobj/StandardRecord/CMakeLists.txt +++ b/duneanaobj/StandardRecord/CMakeLists.txt @@ -26,7 +26,7 @@ if(DEFINED CETMODULES_CURRENT_PROJECT_NAME) else() add_library(duneanaobj_StandardRecord ${src_files}) - target_sources(target_link_libraries(duneanaobj_StandardRecord) ROOT::Core ROOT::Physics) + target_link_libraries(duneanaobj_StandardRecord ROOT::Core ROOT::Physics) #install(TARGETS duneanaobj_StandardRecord LIBRARY DESTINATION lib INCLUDES DESTINATION duneanaobj) install(FILES ${inc_files} DESTINATION ${CMAKE_INSTALL_PREFIX}/duneanaobj) From 0bcc233d0b65451381129f7cac0de6b9fadb96ad Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 17:06:10 +0200 Subject: [PATCH 18/40] actually install the headers maybe? useful...9 --- duneanaobj/StandardRecord/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/duneanaobj/StandardRecord/CMakeLists.txt b/duneanaobj/StandardRecord/CMakeLists.txt index 3401dd8..4490914 100644 --- a/duneanaobj/StandardRecord/CMakeLists.txt +++ b/duneanaobj/StandardRecord/CMakeLists.txt @@ -26,9 +26,9 @@ if(DEFINED CETMODULES_CURRENT_PROJECT_NAME) else() add_library(duneanaobj_StandardRecord ${src_files}) - target_link_libraries(duneanaobj_StandardRecord ROOT::Core ROOT::Physics) + target_link_libraries(duneanaobj_StandardRecord PUBLIC ROOT::Core ROOT::Physics) - #install(TARGETS duneanaobj_StandardRecord LIBRARY DESTINATION lib INCLUDES DESTINATION duneanaobj) - install(FILES ${inc_files} DESTINATION ${CMAKE_INSTALL_PREFIX}/duneanaobj) + install(TARGETS duneanaobj_StandardRecord) + install(FILES ${inc_files} DESTINATION ${CMAKE_INSTALL_PREFIX}/duneanaobj/StandardRecord) # n.b.: missing the dictionary and installation! # ye lmao it is haha good one xd endif() From 2a21ab8e897982a139c2ec971402e93fa60cafa6 Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 17:09:01 +0200 Subject: [PATCH 19/40] installs libraries and headies now? inshallah --- duneanaobj/StandardRecord/CMakeLists.txt | 2 +- duneanaobj/StandardRecord/Flat/CMakeLists.txt | 2 +- duneanaobj/StandardRecord/Proxy/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/duneanaobj/StandardRecord/CMakeLists.txt b/duneanaobj/StandardRecord/CMakeLists.txt index 4490914..8bdcca3 100644 --- a/duneanaobj/StandardRecord/CMakeLists.txt +++ b/duneanaobj/StandardRecord/CMakeLists.txt @@ -29,6 +29,6 @@ else() target_link_libraries(duneanaobj_StandardRecord PUBLIC ROOT::Core ROOT::Physics) install(TARGETS duneanaobj_StandardRecord) - install(FILES ${inc_files} DESTINATION ${CMAKE_INSTALL_PREFIX}/duneanaobj/StandardRecord) + install(FILES ${inc_files} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/duneanaobj/StandardRecord) # n.b.: missing the dictionary and installation! # ye lmao it is haha good one xd endif() diff --git a/duneanaobj/StandardRecord/Flat/CMakeLists.txt b/duneanaobj/StandardRecord/Flat/CMakeLists.txt index 98d8bdd..ef372db 100644 --- a/duneanaobj/StandardRecord/Flat/CMakeLists.txt +++ b/duneanaobj/StandardRecord/Flat/CMakeLists.txt @@ -26,7 +26,7 @@ else() target_link_libraries(duneanaobj_StandardRecordFlat ${ROOT_BASIC_LIB_LIST} ROOT::TreePlayer) install(FILES ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Flat/FlatRecord.h ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Flat/FwdDeclare.h - DESTINATION ${CMAKE_INSTALL_PREFIX}/duneanaobj) + DESTINATION ${CMAKE_INSTALL_PREFIX}/Flat/duneanaobj) # DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/duneanaobj) endif() diff --git a/duneanaobj/StandardRecord/Proxy/CMakeLists.txt b/duneanaobj/StandardRecord/Proxy/CMakeLists.txt index 6931f69..ef9289e 100644 --- a/duneanaobj/StandardRecord/Proxy/CMakeLists.txt +++ b/duneanaobj/StandardRecord/Proxy/CMakeLists.txt @@ -31,7 +31,7 @@ else() target_link_libraries(duneanaobj_StandardRecordProxy ${ROOT_BASIC_LIB_LIST} ROOT::TreePlayer) install(FILES ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Proxy/SRProxy.h ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Proxy/FwdDeclare.h - DESTINATION ${CMAKE_INSTALL_PREFIX}/duneanaobj) + DESTINATION ${CMAKE_INSTALL_PREFIX}/include/duneanaobj) #DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/duneanaobj) endif() From 1b30f8fb69472b5013dfc1886f7c189ca40a7c93 Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 17:20:11 +0200 Subject: [PATCH 20/40] fixing library building? --- duneanaobj/StandardRecord/CMakeLists.txt | 28 ++++++------- duneanaobj/StandardRecord/Flat/CMakeLists.txt | 33 +++++++-------- .../StandardRecord/Proxy/CMakeLists.txt | 42 +++++++++---------- 3 files changed, 50 insertions(+), 53 deletions(-) diff --git a/duneanaobj/StandardRecord/CMakeLists.txt b/duneanaobj/StandardRecord/CMakeLists.txt index 8bdcca3..7960756 100644 --- a/duneanaobj/StandardRecord/CMakeLists.txt +++ b/duneanaobj/StandardRecord/CMakeLists.txt @@ -12,23 +12,23 @@ FILE( GLOB inc_files *.h ) # add_compile_options(-Weffc++) if(DEFINED CETMODULES_CURRENT_PROJECT_NAME) - cet_make_library( LIBRARY_NAME duneanaobj_StandardRecord - SOURCE ${src_files} - LIBRARIES ROOT::Core ROOT::Physics - ) + cet_make_library( LIBRARY_NAME duneanaobj_StandardRecord + SOURCE ${src_files} + LIBRARIES ROOT::Core ROOT::Physics + ) - build_dictionary( duneanaobj_StandardRecord - DICTIONARY_LIBRARIES duneanaobj_StandardRecord - ) + build_dictionary( duneanaobj_StandardRecord + DICTIONARY_LIBRARIES duneanaobj_StandardRecord + ) - install_headers() - install_source() + install_headers() + install_source() else() - add_library(duneanaobj_StandardRecord ${src_files}) + add_library(duneanaobj_StandardRecord SHARED ${src_files}) - target_link_libraries(duneanaobj_StandardRecord PUBLIC ROOT::Core ROOT::Physics) + target_link_libraries(duneanaobj_StandardRecord PUBLIC ROOT::Core ROOT::Physics) - install(TARGETS duneanaobj_StandardRecord) - install(FILES ${inc_files} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/duneanaobj/StandardRecord) - # n.b.: missing the dictionary and installation! # ye lmao it is haha good one xd + install(TARGETS duneanaobj_StandardRecord) + install(FILES ${inc_files} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/duneanaobj/StandardRecord) + # n.b.: missing the dictionary and installation! # ye lmao it is haha good one xd endif() diff --git a/duneanaobj/StandardRecord/Flat/CMakeLists.txt b/duneanaobj/StandardRecord/Flat/CMakeLists.txt index ef372db..f89f135 100644 --- a/duneanaobj/StandardRecord/Flat/CMakeLists.txt +++ b/duneanaobj/StandardRecord/Flat/CMakeLists.txt @@ -4,29 +4,28 @@ add_custom_command(# Rebuild if anything in StandardRecord/ changes DEPENDS ${SR_DEPENDENCIES} OUTPUT FlatRecord.cxx FlatRecord.h FwdDeclare.h COMMAND gen_srproxy --flat -i duneanaobj/StandardRecord/StandardRecord.h -o FlatRecord --target caf::StandardRecord --include-path ${PROJECT_SOURCE_DIR}:$ENV{ROOT_INC} --output-path duneanaobj/StandardRecord/Flat/ --prolog ${CMAKE_CURRENT_SOURCE_DIR}/Prolog.h --extra-cflags ' -D_Float16=short -fsized-deallocation' - ) +) include_directories($ENV{SRPROXY_INC} ${CMAKE_BINARY_DIR}) if(DEFINED CETMODULES_CURRENT_PROJECT_NAME) - cet_make_library(LIBRARY_NAME duneanaobj_StandardRecordFlat - SOURCE FlatRecord.cxx - LIBRARIES ${ROOT_BASIC_LIB_LIST} ROOT::TreePlayer - ) + cet_make_library(LIBRARY_NAME duneanaobj_StandardRecordFlat + SOURCE FlatRecord.cxx + LIBRARIES ${ROOT_BASIC_LIB_LIST} ROOT::TreePlayer + ) - if (DEFINED ENV{MRB_BUILDDIR} AND NOT "$ENV{MRB_BUILDDIR}" STREQUAL "") - set(builddir $ENV{MRB_BUILDDIR}/duneanaobj) - else() - set(builddir ${CMAKE_BINARY_DIR}) - endif() - install_headers(EXTRAS ${builddir}/duneanaobj/StandardRecord/Flat/FlatRecord.h ${builddir}/duneanaobj/StandardRecord/Flat/FwdDeclare.h) + if (DEFINED ENV{MRB_BUILDDIR} AND NOT "$ENV{MRB_BUILDDIR}" STREQUAL "") + set(builddir $ENV{MRB_BUILDDIR}/duneanaobj) + else() + set(builddir ${CMAKE_BINARY_DIR}) + endif() + install_headers(EXTRAS ${builddir}/duneanaobj/StandardRecord/Flat/FlatRecord.h ${builddir}/duneanaobj/StandardRecord/Flat/FwdDeclare.h) else() - add_library(duneanaobj_StandardRecordFlat - FlatRecord.cxx) - target_link_libraries(duneanaobj_StandardRecordFlat ${ROOT_BASIC_LIB_LIST} ROOT::TreePlayer) + add_library(duneanaobj_StandardRecordFlat SHARED FlatRecord.cxx) + target_link_libraries(duneanaobj_StandardRecordFlat ${ROOT_BASIC_LIB_LIST} ROOT::TreePlayer) - install(FILES ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Flat/FlatRecord.h ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Flat/FwdDeclare.h - DESTINATION ${CMAKE_INSTALL_PREFIX}/Flat/duneanaobj) -# DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/duneanaobj) + install(FILES ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Flat/FlatRecord.h ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Flat/FwdDeclare.h + DESTINATION ${CMAKE_INSTALL_PREFIX}/Flat/duneanaobj/StandardRecord/Flat) +# DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/duneanaobj) endif() diff --git a/duneanaobj/StandardRecord/Proxy/CMakeLists.txt b/duneanaobj/StandardRecord/Proxy/CMakeLists.txt index ef9289e..a3f032d 100644 --- a/duneanaobj/StandardRecord/Proxy/CMakeLists.txt +++ b/duneanaobj/StandardRecord/Proxy/CMakeLists.txt @@ -1,10 +1,10 @@ FILE(GLOB SR_DEPENDENCIES duneanaobj/StandardRecord/*.h) add_custom_command(# Rebuild if anything in StandardRecord/ changes - DEPENDS ${SR_DEPENDENCIES} - OUTPUT SRProxy.cxx SRProxy.h FwdDeclare.h - COMMAND gen_srproxy -i duneanaobj/StandardRecord/StandardRecord.h -o SRProxy --target caf::StandardRecord --include-path ${PROJECT_SOURCE_DIR}:$ENV{ROOT_INC} --output-path duneanaobj/StandardRecord/Proxy --prolog ${CMAKE_CURRENT_SOURCE_DIR}/Prolog.h --epilog-fwd ${CMAKE_CURRENT_SOURCE_DIR}/EpilogFwd.h --extra-cflags ' -D_Float16=short -fsized-deallocation' - ) + DEPENDS ${SR_DEPENDENCIES} + OUTPUT SRProxy.cxx SRProxy.h FwdDeclare.h + COMMAND gen_srproxy -i duneanaobj/StandardRecord/StandardRecord.h -o SRProxy --target caf::StandardRecord --include-path ${PROJECT_SOURCE_DIR}:$ENV{ROOT_INC} --output-path duneanaobj/StandardRecord/Proxy --prolog ${CMAKE_CURRENT_SOURCE_DIR}/Prolog.h --epilog-fwd ${CMAKE_CURRENT_SOURCE_DIR}/EpilogFwd.h --extra-cflags ' -D_Float16=short -fsized-deallocation' +) include_directories($ENV{SRPROXY_INC} ${CMAKE_BINARY_DIR}) @@ -12,26 +12,24 @@ include_directories($ENV{SRPROXY_INC} ${CMAKE_BINARY_DIR}) #add_definitions(-Wno-int-in-bool-context) if(DEFINED CETMODULES_CURRENT_PROJECT_NAME) - message(STATUS "CETMODULES_CURRENT_PROJECT_NAME = '${CETMODULES_CURRENT_PROJECT_NAME}'") - cet_make_library(LIBRARY_NAME duneanaobj_StandardRecordProxy - SOURCE SRProxy.cxx Instantiations.cxx - LIBRARIES ${ROOT_BASIC_LIB_LIST} ROOT::TreePlayer) + message(STATUS "CETMODULES_CURRENT_PROJECT_NAME = '${CETMODULES_CURRENT_PROJECT_NAME}'") + cet_make_library(LIBRARY_NAME duneanaobj_StandardRecordProxy + SOURCE SRProxy.cxx Instantiations.cxx + LIBRARIES ${ROOT_BASIC_LIB_LIST} ROOT::TreePlayer) - if (DEFINED ENV{MRB_BUILDDIR} AND NOT "$ENV{MRB_BUILDDIR}" STREQUAL "") - message(STATUS "MRB_BUILDDIR = $ENV{MRB_BUILDDIR}") - set(builddir $ENV{MRB_BUILDDIR}/duneanaobj) - else() - message(STATUS "BUILDDIR defaulting to ${CMAKE_BINARY_DIR}") - set(builddir ${CMAKE_BINARY_DIR}) - endif() - install_headers(EXTRAS ${builddir}/duneanaobj/StandardRecord/Proxy/SRProxy.h ${builddir}/duneanaobj/StandardRecord/Proxy/FwdDeclare.h) + if (DEFINED ENV{MRB_BUILDDIR} AND NOT "$ENV{MRB_BUILDDIR}" STREQUAL "") + message(STATUS "MRB_BUILDDIR = $ENV{MRB_BUILDDIR}") + set(builddir $ENV{MRB_BUILDDIR}/duneanaobj) + else() + message(STATUS "BUILDDIR defaulting to ${CMAKE_BINARY_DIR}") + set(builddir ${CMAKE_BINARY_DIR}) + endif() + install_headers(EXTRAS ${builddir}/duneanaobj/StandardRecord/Proxy/SRProxy.h ${builddir}/duneanaobj/StandardRecord/Proxy/FwdDeclare.h) else() - add_library(duneanaobj_StandardRecordProxy - SRProxy.cxx Instantiations.cxx) - target_link_libraries(duneanaobj_StandardRecordProxy ${ROOT_BASIC_LIB_LIST} ROOT::TreePlayer) + add_library(duneanaobj_StandardRecordProxy SHARED SRProxy.cxx Instantiations.cxx) + target_link_libraries(duneanaobj_StandardRecordProxy ${ROOT_BASIC_LIB_LIST} ROOT::TreePlayer) - install(FILES ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Proxy/SRProxy.h ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Proxy/FwdDeclare.h - DESTINATION ${CMAKE_INSTALL_PREFIX}/include/duneanaobj) -#DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/duneanaobj) + install(FILES ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Proxy/SRProxy.h ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Proxy/FwdDeclare.h + DESTINATION ${CMAKE_INSTALL_PREFIX}/include/duneanaobj/StandardRecord/Proxy) endif() From 6628101ba942e6110d515a0dc8ab0cc2a383f9e9 Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 17:23:26 +0200 Subject: [PATCH 21/40] installing more flat and proxy libs --- duneanaobj/StandardRecord/Flat/CMakeLists.txt | 1 + duneanaobj/StandardRecord/Proxy/CMakeLists.txt | 1 + 2 files changed, 2 insertions(+) diff --git a/duneanaobj/StandardRecord/Flat/CMakeLists.txt b/duneanaobj/StandardRecord/Flat/CMakeLists.txt index f89f135..919e1b4 100644 --- a/duneanaobj/StandardRecord/Flat/CMakeLists.txt +++ b/duneanaobj/StandardRecord/Flat/CMakeLists.txt @@ -24,6 +24,7 @@ else() add_library(duneanaobj_StandardRecordFlat SHARED FlatRecord.cxx) target_link_libraries(duneanaobj_StandardRecordFlat ${ROOT_BASIC_LIB_LIST} ROOT::TreePlayer) + install(TARGETS duneanaobj_StandardRecordFlat) install(FILES ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Flat/FlatRecord.h ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Flat/FwdDeclare.h DESTINATION ${CMAKE_INSTALL_PREFIX}/Flat/duneanaobj/StandardRecord/Flat) # DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/duneanaobj) diff --git a/duneanaobj/StandardRecord/Proxy/CMakeLists.txt b/duneanaobj/StandardRecord/Proxy/CMakeLists.txt index a3f032d..76ebd1d 100644 --- a/duneanaobj/StandardRecord/Proxy/CMakeLists.txt +++ b/duneanaobj/StandardRecord/Proxy/CMakeLists.txt @@ -29,6 +29,7 @@ else() add_library(duneanaobj_StandardRecordProxy SHARED SRProxy.cxx Instantiations.cxx) target_link_libraries(duneanaobj_StandardRecordProxy ${ROOT_BASIC_LIB_LIST} ROOT::TreePlayer) + install(TARGETS duneanaobj_StandardRecordProxy) install(FILES ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Proxy/SRProxy.h ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Proxy/FwdDeclare.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include/duneanaobj/StandardRecord/Proxy) endif() From 1e81b4e1e7a0c046e50f0514a5867b4d49636f9d Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 17:26:00 +0200 Subject: [PATCH 22/40] installing dict --- duneanaobj/StandardRecord/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/duneanaobj/StandardRecord/CMakeLists.txt b/duneanaobj/StandardRecord/CMakeLists.txt index 7960756..3ed982c 100644 --- a/duneanaobj/StandardRecord/CMakeLists.txt +++ b/duneanaobj/StandardRecord/CMakeLists.txt @@ -28,6 +28,8 @@ else() target_link_libraries(duneanaobj_StandardRecord PUBLIC ROOT::Core ROOT::Physics) + build_dictionary(duneanaobj_StandardRecord DICTIONARY_LIBRARIES duneanaobj_StandardRecord) + install(TARGETS duneanaobj_StandardRecord) install(FILES ${inc_files} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/duneanaobj/StandardRecord) # n.b.: missing the dictionary and installation! # ye lmao it is haha good one xd From 654c309bf600fe3ea120cbc335b93a2296f7954a Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 17:31:07 +0200 Subject: [PATCH 23/40] no idea how to build a dictionary tbh --- duneanaobj/StandardRecord/CMakeLists.txt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/duneanaobj/StandardRecord/CMakeLists.txt b/duneanaobj/StandardRecord/CMakeLists.txt index 3ed982c..7aa617b 100644 --- a/duneanaobj/StandardRecord/CMakeLists.txt +++ b/duneanaobj/StandardRecord/CMakeLists.txt @@ -25,12 +25,11 @@ if(DEFINED CETMODULES_CURRENT_PROJECT_NAME) install_source() else() add_library(duneanaobj_StandardRecord SHARED ${src_files}) - target_link_libraries(duneanaobj_StandardRecord PUBLIC ROOT::Core ROOT::Physics) - build_dictionary(duneanaobj_StandardRecord DICTIONARY_LIBRARIES duneanaobj_StandardRecord) + #ROOT_GENERATE_DICTIONARY(duneanaobj_StandardRecord_dict DICTIONARY_LIBRARIES duneanaobj_StandardRecord) + # TODO: Need to generate the dictionary install(TARGETS duneanaobj_StandardRecord) install(FILES ${inc_files} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/duneanaobj/StandardRecord) - # n.b.: missing the dictionary and installation! # ye lmao it is haha good one xd endif() From 97d4fd924a200dc2f32385a7c68a421cbc1a8333 Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 17:32:47 +0200 Subject: [PATCH 24/40] Fixed Flat include install path --- duneanaobj/StandardRecord/Flat/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/duneanaobj/StandardRecord/Flat/CMakeLists.txt b/duneanaobj/StandardRecord/Flat/CMakeLists.txt index 919e1b4..892a985 100644 --- a/duneanaobj/StandardRecord/Flat/CMakeLists.txt +++ b/duneanaobj/StandardRecord/Flat/CMakeLists.txt @@ -26,7 +26,7 @@ else() install(TARGETS duneanaobj_StandardRecordFlat) install(FILES ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Flat/FlatRecord.h ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Flat/FwdDeclare.h - DESTINATION ${CMAKE_INSTALL_PREFIX}/Flat/duneanaobj/StandardRecord/Flat) + DESTINATION ${CMAKE_INSTALL_PREFIX}/include/duneanaobj/StandardRecord/Flat) # DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/duneanaobj) endif() From 51b5f2288bd2cfa8822731c6c6ee7417fdf120a9 Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 17:45:00 +0200 Subject: [PATCH 25/40] adding config writing so find_package can find this package --- CMakeLists.txt | 63 ++++++++++++++++++++++++++++++++------------------ 1 file changed, 41 insertions(+), 22 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6679b85..c2f2de1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,38 +24,57 @@ set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 03.05.00) message(STATUS "\n\n ========================== ${PROJECT_NAME} ==========================") if(DEFINED ENV{UPS_DIR}) - # cetbuildtools contains our cmake modules + # cetbuildtools contains our cmake modules - include(CetCMakeEnv) - cet_cmake_env() + include(CetCMakeEnv) + cet_cmake_env() - set_install_root() + set_install_root() - # The specification of the C++ standard is required because CET macros - # set it to C++98 by default, and then override it depending on the - # compiler version, as determined by the compiler qualifier. - # Removing that qualifier, we need to supply that information manually, - # and maintain it too. - cet_set_compiler_flags(DIAGS CAUTIOUS - WERROR - NO_UNDEFINED - ALLOW_DEPRECATIONS - EXTRA_FLAGS -pedantic -Wno-unused-local-typedefs -Wno-undefined-var-template -I $ENV{CLANG_FQ_DIR}/include/c++/v1 - ) + # The specification of the C++ standard is required because CET macros + # set it to C++98 by default, and then override it depending on the + # compiler version, as determined by the compiler qualifier. + # Removing that qualifier, we need to supply that information manually, + # and maintain it too. + cet_set_compiler_flags(DIAGS CAUTIOUS + WERROR + NO_UNDEFINED + ALLOW_DEPRECATIONS + EXTRA_FLAGS -pedantic -Wno-unused-local-typedefs -Wno-undefined-var-template -I $ENV{CLANG_FQ_DIR}/include/c++/v1 + ) - cet_report_compiler_flags() + cet_report_compiler_flags() - # these are minimum required versions, not the actual product versions - find_package(ROOT 6.00.00 REQUIRED) + # these are minimum required versions, not the actual product versions + find_package(ROOT 6.00.00 REQUIRED) - include(BuildDictionary) + include(BuildDictionary) - # packaging utility + # packaging utility else() - find_package(ROOT) - include_directories(.) + # This is where the real stuff happens, ain't nobody usin' this cet sit + # Include module with function 'write_basic_package_version_file' + include(CMakePackageConfigHelpers) + + # Write the ConfigVersion.cmake file which can be used to + # check if a version meets the requested properties. + write_basic_package_version_file( + DUNEAnaObjConfigVersion.cmake + COMPATIBILITY SameMajorVersion) + + # Write the Config.cmake file so that a user package can + # access this with find_package. + configure_package_config_file( + PackageConfig.cmake.in + DUNEAnaObjConfig.cmake + PATH_VARS CMAKE_INSTALL_PREFIX + INSTALL_DESTINATION lib/cmake/duneanaobj) + + find_package(ROOT) + include(BuildDictionary) + include_directories(.) endif() add_subdirectory(duneanaobj) From a881e42f3d9787edc3a8edd29fd89ec4dae5645d Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 17:47:53 +0200 Subject: [PATCH 26/40] adding version info that makes config writer happy --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c2f2de1..0a95a01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,7 @@ cmake_minimum_required (VERSION 3.20 FATAL_ERROR) find_package(cetmodules REQUIRED) find_package(cetbuildtools REQUIRED) -project(duneanaobj LANGUAGES CXX) +project(duneanaobj VERSION 03.05.00 LANGUAGES CXX) set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 03.05.00) message(STATUS "\n\n ========================== ${PROJECT_NAME} ==========================") From 027f985f813c36b3a593262b257134e2ae577dee Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 17:52:24 +0200 Subject: [PATCH 27/40] copied PackageConfig.cmake.in from edep-sim --- CMakeLists.txt | 2 +- PackageConfig.cmake.in | 45 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 PackageConfig.cmake.in diff --git a/CMakeLists.txt b/CMakeLists.txt index 0a95a01..9bdee4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,7 @@ cmake_minimum_required (VERSION 3.20 FATAL_ERROR) # cmake_policy(VERSION 3.18) find_package(cetmodules REQUIRED) -find_package(cetbuildtools REQUIRED) + project(duneanaobj VERSION 03.05.00 LANGUAGES CXX) set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 03.05.00) diff --git a/PackageConfig.cmake.in b/PackageConfig.cmake.in new file mode 100644 index 0000000..b6a8259 --- /dev/null +++ b/PackageConfig.cmake.in @@ -0,0 +1,45 @@ +########################## +# Scaldily nicked from edep-sim by Liam, sound lad Clark +# +# A template for a Config.cmake that can be found by using +# the find_package macro. This should be modified to import all of +# the dependencies required by the local package. The template is +# fairly generic, except for the "find_package" related code between +# the beginning and ending boiler plate. +# +# This expect that any targets that are being exported will be +# installed using a command like +# +# install(TARGETS myTarget +# EXPORT Targets +# etc) +# +# Note that the is set in the project( ) macro +# that should be at the start of your top level CMakeLists.txt +########################## + +############# BOILER PLATE +# Include the cmake boiler plate. The next line should not be touched +@PACKAGE_INIT@ +############# END BOILER PLATE + +########################## +# Add any specific packages that the current package depends on. This is +# where the find_package commands needed to make the current package +# compile should be listed. +########################## + +find_package(ROOT REQUIRED) +if(ROOT_FOUND) + include(${ROOT_USE_FILE}) +endif(ROOT_FOUND) + +######################### +# Leave the next couple of lines alone since it will automatically customize +# for your package. +######################### + +############# BOILER PLATE +include("@CMAKE_INSTALL_PREFIX@/lib/cmake/@PROJECT_NAME@/@PROJECT_NAME@Targets.cmake") +check_required_components("@PROJECT_NAME@") +############# END BOILER PLATE From 1485f9cacd9fb117af71b8d8c620d37ad352386e Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 17:57:44 +0200 Subject: [PATCH 28/40] Actually install the config files --- CMakeLists.txt | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9bdee4a..36f5a93 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,26 +55,23 @@ if(DEFINED ENV{UPS_DIR}) else() # This is where the real stuff happens, ain't nobody usin' this cet sit - # Include module with function 'write_basic_package_version_file' - include(CMakePackageConfigHelpers) - - # Write the ConfigVersion.cmake file which can be used to - # check if a version meets the requested properties. - write_basic_package_version_file( - DUNEAnaObjConfigVersion.cmake - COMPATIBILITY SameMajorVersion) - - # Write the Config.cmake file so that a user package can - # access this with find_package. - configure_package_config_file( - PackageConfig.cmake.in - DUNEAnaObjConfig.cmake - PATH_VARS CMAKE_INSTALL_PREFIX - INSTALL_DESTINATION lib/cmake/duneanaobj) - find_package(ROOT) include(BuildDictionary) include_directories(.) + + # Include module with function 'write_basic_package_version_file' + include(CMakePackageConfigHelpers) + + # Write the ConfigVersion.cmake file which can be used to + # check if a version meets the requested properties. + write_basic_package_version_file(duneanaobjConfigVersion.cmake COMPATIBILITY SameMajorVersion) + + # Write the Config.cmake file so that a user package can + # access this with find_package. + configure_package_config_file(PackageConfig.cmake.in duneanaobjConfig.cmake PATH_VARS CMAKE_INSTALL_PREFIX INSTALL_DESTINATION lib/cmake/duneanaobj) + + # Install the config files. + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/duneanaobjConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/duneanaobjVersion.cmake DESTINATION lib/cmake/duneanaobj) endif() add_subdirectory(duneanaobj) From 2b6d0138ad7f468f9b003ea4fe538ba1c70339d2 Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Tue, 27 Aug 2024 18:00:01 +0200 Subject: [PATCH 29/40] missing 'Config' includes --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 36f5a93..3a9a474 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,7 +71,7 @@ else() configure_package_config_file(PackageConfig.cmake.in duneanaobjConfig.cmake PATH_VARS CMAKE_INSTALL_PREFIX INSTALL_DESTINATION lib/cmake/duneanaobj) # Install the config files. - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/duneanaobjConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/duneanaobjVersion.cmake DESTINATION lib/cmake/duneanaobj) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/duneanaobjConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/duneanaobjConfigVersion.cmake DESTINATION lib/cmake/duneanaobj) endif() add_subdirectory(duneanaobj) From 08a26d0dfeec0f6155125a5816ae1bc6007b145d Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Wed, 28 Aug 2024 13:30:57 +0200 Subject: [PATCH 30/40] Install duneanaobjTargets.cmake file for pkgconfig/find_package --- duneanaobj/StandardRecord/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/duneanaobj/StandardRecord/CMakeLists.txt b/duneanaobj/StandardRecord/CMakeLists.txt index 7aa617b..a37b4d1 100644 --- a/duneanaobj/StandardRecord/CMakeLists.txt +++ b/duneanaobj/StandardRecord/CMakeLists.txt @@ -32,4 +32,5 @@ else() install(TARGETS duneanaobj_StandardRecord) install(FILES ${inc_files} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/duneanaobj/StandardRecord) + install(EXPORT duneanaobjTargets NAMESPACE duneanaobj:: DESTINATION lib/cmake/duneanaobj) endif() From 8df2a47eecfab3ad53f1b311f8ed190e350b5497 Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Wed, 28 Aug 2024 13:35:00 +0200 Subject: [PATCH 31/40] corrected targets export --- CMakeLists.txt | 1 + duneanaobj/StandardRecord/CMakeLists.txt | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a9a474..330c9c2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,6 +72,7 @@ else() # Install the config files. install(FILES ${CMAKE_CURRENT_BINARY_DIR}/duneanaobjConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/duneanaobjConfigVersion.cmake DESTINATION lib/cmake/duneanaobj) + install(EXPORT EDepSimTargets NAMESPACE EDepSim:: DESTINATION lib/cmake/EDepSim) endif() add_subdirectory(duneanaobj) diff --git a/duneanaobj/StandardRecord/CMakeLists.txt b/duneanaobj/StandardRecord/CMakeLists.txt index a37b4d1..0b57e25 100644 --- a/duneanaobj/StandardRecord/CMakeLists.txt +++ b/duneanaobj/StandardRecord/CMakeLists.txt @@ -30,7 +30,10 @@ else() #ROOT_GENERATE_DICTIONARY(duneanaobj_StandardRecord_dict DICTIONARY_LIBRARIES duneanaobj_StandardRecord) # TODO: Need to generate the dictionary - install(TARGETS duneanaobj_StandardRecord) + install(TARGETS duneanaobj_StandardRecord + EXPORT duneanaobjTargets + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin + INCLUDES DESTINATION include/duneanaobj) install(FILES ${inc_files} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/duneanaobj/StandardRecord) - install(EXPORT duneanaobjTargets NAMESPACE duneanaobj:: DESTINATION lib/cmake/duneanaobj) endif() From 3468933b6435a16fb842cc241c30ca460e35bf3d Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Wed, 28 Aug 2024 13:36:01 +0200 Subject: [PATCH 32/40] Removed copy/pasted EDepSim references --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 330c9c2..b32efdd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -72,7 +72,7 @@ else() # Install the config files. install(FILES ${CMAKE_CURRENT_BINARY_DIR}/duneanaobjConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/duneanaobjConfigVersion.cmake DESTINATION lib/cmake/duneanaobj) - install(EXPORT EDepSimTargets NAMESPACE EDepSim:: DESTINATION lib/cmake/EDepSim) + install(EXPORT duneanaobjTargets NAMESPACE duneanaobj:: DESTINATION lib/cmake/duneanaobj) endif() add_subdirectory(duneanaobj) From 7353f5a2e0bc2814b59857a20869703004b22b9a Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Thu, 29 Aug 2024 17:43:01 +0200 Subject: [PATCH 33/40] unfudged the indentation for the sanity of reviewers --- CMakeLists.txt | 75 ++++++++++++------------ duneanaobj/StandardRecord/CMakeLists.txt | 42 ++++++------- 2 files changed, 57 insertions(+), 60 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b32efdd..f486e6c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,64 +17,61 @@ cmake_minimum_required (VERSION 3.20 FATAL_ERROR) # cmake_policy(VERSION 3.18) find_package(cetmodules REQUIRED) - project(duneanaobj VERSION 03.05.00 LANGUAGES CXX) set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 03.05.00) message(STATUS "\n\n ========================== ${PROJECT_NAME} ==========================") if(DEFINED ENV{UPS_DIR}) - # cetbuildtools contains our cmake modules - - include(CetCMakeEnv) - cet_cmake_env() + # cetbuildtools contains our cmake modules - set_install_root() + include(CetCMakeEnv) + cet_cmake_env() - # The specification of the C++ standard is required because CET macros - # set it to C++98 by default, and then override it depending on the - # compiler version, as determined by the compiler qualifier. - # Removing that qualifier, we need to supply that information manually, - # and maintain it too. - cet_set_compiler_flags(DIAGS CAUTIOUS - WERROR - NO_UNDEFINED - ALLOW_DEPRECATIONS - EXTRA_FLAGS -pedantic -Wno-unused-local-typedefs -Wno-undefined-var-template -I $ENV{CLANG_FQ_DIR}/include/c++/v1 - ) + set_install_root() - cet_report_compiler_flags() + # The specification of the C++ standard is required because CET macros + # set it to C++98 by default, and then override it depending on the + # compiler version, as determined by the compiler qualifier. + # Removing that qualifier, we need to supply that information manually, + # and maintain it too. + cet_set_compiler_flags(DIAGS CAUTIOUS + WERROR + NO_UNDEFINED + ALLOW_DEPRECATIONS + EXTRA_FLAGS -pedantic -Wno-unused-local-typedefs -Wno-undefined-var-template -I $ENV{CLANG_FQ_DIR}/include/c++/v1 + ) - # these are minimum required versions, not the actual product versions - find_package(ROOT 6.00.00 REQUIRED) + cet_report_compiler_flags() - include(BuildDictionary) + # these are minimum required versions, not the actual product versions + find_package(ROOT 6.00.00 REQUIRED) - # packaging utility + include(BuildDictionary) + # packaging utility + cet_cmake_config() # Put this here but am not sure... probably not going to see a lot of use anyway /shrug else() - # This is where the real stuff happens, ain't nobody usin' this cet sit - find_package(ROOT) - include(BuildDictionary) - include_directories(.) + # This is where the real stuff happens, ain't nobody usin' this cet sit + find_package(ROOT) + include(BuildDictionary) + include_directories(.) - # Include module with function 'write_basic_package_version_file' - include(CMakePackageConfigHelpers) + # Include module with function 'write_basic_package_version_file' + include(CMakePackageConfigHelpers) - # Write the ConfigVersion.cmake file which can be used to - # check if a version meets the requested properties. - write_basic_package_version_file(duneanaobjConfigVersion.cmake COMPATIBILITY SameMajorVersion) + # Write the ConfigVersion.cmake file which can be used to + # check if a version meets the requested properties. + write_basic_package_version_file(duneanaobjConfigVersion.cmake COMPATIBILITY SameMajorVersion) - # Write the Config.cmake file so that a user package can - # access this with find_package. - configure_package_config_file(PackageConfig.cmake.in duneanaobjConfig.cmake PATH_VARS CMAKE_INSTALL_PREFIX INSTALL_DESTINATION lib/cmake/duneanaobj) + # Write the Config.cmake file so that a user package can + # access this with find_package. + configure_package_config_file(PackageConfig.cmake.in duneanaobjConfig.cmake PATH_VARS CMAKE_INSTALL_PREFIX INSTALL_DESTINATION lib/cmake/duneanaobj) - # Install the config files. - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/duneanaobjConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/duneanaobjConfigVersion.cmake DESTINATION lib/cmake/duneanaobj) - install(EXPORT duneanaobjTargets NAMESPACE duneanaobj:: DESTINATION lib/cmake/duneanaobj) + # Install the config files. + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/duneanaobjConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/duneanaobjConfigVersion.cmake DESTINATION lib/cmake/duneanaobj) + install(EXPORT duneanaobjTargets NAMESPACE duneanaobj:: DESTINATION lib/cmake/duneanaobj) endif() add_subdirectory(duneanaobj) - -#cet_cmake_config() diff --git a/duneanaobj/StandardRecord/CMakeLists.txt b/duneanaobj/StandardRecord/CMakeLists.txt index 0b57e25..3c5b4ee 100644 --- a/duneanaobj/StandardRecord/CMakeLists.txt +++ b/duneanaobj/StandardRecord/CMakeLists.txt @@ -12,28 +12,28 @@ FILE( GLOB inc_files *.h ) # add_compile_options(-Weffc++) if(DEFINED CETMODULES_CURRENT_PROJECT_NAME) - cet_make_library( LIBRARY_NAME duneanaobj_StandardRecord - SOURCE ${src_files} - LIBRARIES ROOT::Core ROOT::Physics - ) + cet_make_library( LIBRARY_NAME duneanaobj_StandardRecord + SOURCE ${src_files} + LIBRARIES ROOT::Core ROOT::Physics + ) - build_dictionary( duneanaobj_StandardRecord - DICTIONARY_LIBRARIES duneanaobj_StandardRecord - ) + build_dictionary( duneanaobj_StandardRecord + DICTIONARY_LIBRARIES duneanaobj_StandardRecord + ) - install_headers() - install_source() + install_headers() + install_source() else() - add_library(duneanaobj_StandardRecord SHARED ${src_files}) - target_link_libraries(duneanaobj_StandardRecord PUBLIC ROOT::Core ROOT::Physics) - - #ROOT_GENERATE_DICTIONARY(duneanaobj_StandardRecord_dict DICTIONARY_LIBRARIES duneanaobj_StandardRecord) - # TODO: Need to generate the dictionary - - install(TARGETS duneanaobj_StandardRecord - EXPORT duneanaobjTargets - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin - INCLUDES DESTINATION include/duneanaobj) - install(FILES ${inc_files} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/duneanaobj/StandardRecord) + add_library(duneanaobj_StandardRecord SHARED ${src_files}) + target_link_libraries(duneanaobj_StandardRecord PUBLIC ROOT::Core ROOT::Physics) + + #ROOT_GENERATE_DICTIONARY(duneanaobj_StandardRecord_dict DICTIONARY_LIBRARIES duneanaobj_StandardRecord) + # TODO: Need to generate the dictionary + + install(TARGETS duneanaobj_StandardRecord + EXPORT duneanaobjTargets + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin + INCLUDES DESTINATION include/duneanaobj) + install(FILES ${inc_files} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/duneanaobj/StandardRecord) endif() From 9a85c1e35f7bc41b93c2b6fa26922d4c8e5416de Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Thu, 29 Aug 2024 17:45:12 +0200 Subject: [PATCH 34/40] unfudged the indentation for the sanity of reviewers --- duneanaobj/StandardRecord/Flat/CMakeLists.txt | 32 ++++++++--------- .../StandardRecord/Proxy/CMakeLists.txt | 34 +++++++++---------- 2 files changed, 33 insertions(+), 33 deletions(-) diff --git a/duneanaobj/StandardRecord/Flat/CMakeLists.txt b/duneanaobj/StandardRecord/Flat/CMakeLists.txt index 892a985..750c999 100644 --- a/duneanaobj/StandardRecord/Flat/CMakeLists.txt +++ b/duneanaobj/StandardRecord/Flat/CMakeLists.txt @@ -9,24 +9,24 @@ add_custom_command(# Rebuild if anything in StandardRecord/ changes include_directories($ENV{SRPROXY_INC} ${CMAKE_BINARY_DIR}) if(DEFINED CETMODULES_CURRENT_PROJECT_NAME) - cet_make_library(LIBRARY_NAME duneanaobj_StandardRecordFlat - SOURCE FlatRecord.cxx - LIBRARIES ${ROOT_BASIC_LIB_LIST} ROOT::TreePlayer - ) + cet_make_library(LIBRARY_NAME duneanaobj_StandardRecordFlat + SOURCE FlatRecord.cxx + LIBRARIES ${ROOT_BASIC_LIB_LIST} ROOT::TreePlayer + ) - if (DEFINED ENV{MRB_BUILDDIR} AND NOT "$ENV{MRB_BUILDDIR}" STREQUAL "") - set(builddir $ENV{MRB_BUILDDIR}/duneanaobj) - else() - set(builddir ${CMAKE_BINARY_DIR}) - endif() - install_headers(EXTRAS ${builddir}/duneanaobj/StandardRecord/Flat/FlatRecord.h ${builddir}/duneanaobj/StandardRecord/Flat/FwdDeclare.h) + if (DEFINED ENV{MRB_BUILDDIR} AND NOT "$ENV{MRB_BUILDDIR}" STREQUAL "") + set(builddir $ENV{MRB_BUILDDIR}/duneanaobj) + else() + set(builddir ${CMAKE_BINARY_DIR}) + endif() + install_headers(EXTRAS ${builddir}/duneanaobj/StandardRecord/Flat/FlatRecord.h ${builddir}/duneanaobj/StandardRecord/Flat/FwdDeclare.h) else() - add_library(duneanaobj_StandardRecordFlat SHARED FlatRecord.cxx) - target_link_libraries(duneanaobj_StandardRecordFlat ${ROOT_BASIC_LIB_LIST} ROOT::TreePlayer) + add_library(duneanaobj_StandardRecordFlat SHARED FlatRecord.cxx) + target_link_libraries(duneanaobj_StandardRecordFlat ${ROOT_BASIC_LIB_LIST} ROOT::TreePlayer) - install(TARGETS duneanaobj_StandardRecordFlat) - install(FILES ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Flat/FlatRecord.h ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Flat/FwdDeclare.h - DESTINATION ${CMAKE_INSTALL_PREFIX}/include/duneanaobj/StandardRecord/Flat) -# DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/duneanaobj) + install(TARGETS duneanaobj_StandardRecordFlat) + install(FILES ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Flat/FlatRecord.h ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Flat/FwdDeclare.h + DESTINATION ${CMAKE_INSTALL_PREFIX}/include/duneanaobj/StandardRecord/Flat) +# DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/duneanaobj) endif() diff --git a/duneanaobj/StandardRecord/Proxy/CMakeLists.txt b/duneanaobj/StandardRecord/Proxy/CMakeLists.txt index 76ebd1d..7c73859 100644 --- a/duneanaobj/StandardRecord/Proxy/CMakeLists.txt +++ b/duneanaobj/StandardRecord/Proxy/CMakeLists.txt @@ -12,25 +12,25 @@ include_directories($ENV{SRPROXY_INC} ${CMAKE_BINARY_DIR}) #add_definitions(-Wno-int-in-bool-context) if(DEFINED CETMODULES_CURRENT_PROJECT_NAME) - message(STATUS "CETMODULES_CURRENT_PROJECT_NAME = '${CETMODULES_CURRENT_PROJECT_NAME}'") - cet_make_library(LIBRARY_NAME duneanaobj_StandardRecordProxy - SOURCE SRProxy.cxx Instantiations.cxx - LIBRARIES ${ROOT_BASIC_LIB_LIST} ROOT::TreePlayer) + message(STATUS "CETMODULES_CURRENT_PROJECT_NAME = '${CETMODULES_CURRENT_PROJECT_NAME}'") + cet_make_library(LIBRARY_NAME duneanaobj_StandardRecordProxy + SOURCE SRProxy.cxx Instantiations.cxx + LIBRARIES ${ROOT_BASIC_LIB_LIST} ROOT::TreePlayer) - if (DEFINED ENV{MRB_BUILDDIR} AND NOT "$ENV{MRB_BUILDDIR}" STREQUAL "") - message(STATUS "MRB_BUILDDIR = $ENV{MRB_BUILDDIR}") - set(builddir $ENV{MRB_BUILDDIR}/duneanaobj) - else() - message(STATUS "BUILDDIR defaulting to ${CMAKE_BINARY_DIR}") - set(builddir ${CMAKE_BINARY_DIR}) - endif() - install_headers(EXTRAS ${builddir}/duneanaobj/StandardRecord/Proxy/SRProxy.h ${builddir}/duneanaobj/StandardRecord/Proxy/FwdDeclare.h) + if (DEFINED ENV{MRB_BUILDDIR} AND NOT "$ENV{MRB_BUILDDIR}" STREQUAL "") + message(STATUS "MRB_BUILDDIR = $ENV{MRB_BUILDDIR}") + set(builddir $ENV{MRB_BUILDDIR}/duneanaobj) + else() + message(STATUS "BUILDDIR defaulting to ${CMAKE_BINARY_DIR}") + set(builddir ${CMAKE_BINARY_DIR}) + endif() + install_headers(EXTRAS ${builddir}/duneanaobj/StandardRecord/Proxy/SRProxy.h ${builddir}/duneanaobj/StandardRecord/Proxy/FwdDeclare.h) else() - add_library(duneanaobj_StandardRecordProxy SHARED SRProxy.cxx Instantiations.cxx) - target_link_libraries(duneanaobj_StandardRecordProxy ${ROOT_BASIC_LIB_LIST} ROOT::TreePlayer) + add_library(duneanaobj_StandardRecordProxy SHARED SRProxy.cxx Instantiations.cxx) + target_link_libraries(duneanaobj_StandardRecordProxy ${ROOT_BASIC_LIB_LIST} ROOT::TreePlayer) - install(TARGETS duneanaobj_StandardRecordProxy) - install(FILES ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Proxy/SRProxy.h ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Proxy/FwdDeclare.h - DESTINATION ${CMAKE_INSTALL_PREFIX}/include/duneanaobj/StandardRecord/Proxy) + install(TARGETS duneanaobj_StandardRecordProxy) + install(FILES ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Proxy/SRProxy.h ${CMAKE_BINARY_DIR}/duneanaobj/StandardRecord/Proxy/FwdDeclare.h + DESTINATION ${CMAKE_INSTALL_PREFIX}/include/duneanaobj/StandardRecord/Proxy) endif() From 937a3a775a838bcb22a1924f4392ec0f6565f2dd Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Thu, 29 Aug 2024 17:46:14 +0200 Subject: [PATCH 35/40] unfudged the indentation for the sanity of reviewers --- duneanaobj/StandardRecord/Proxy/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/duneanaobj/StandardRecord/Proxy/CMakeLists.txt b/duneanaobj/StandardRecord/Proxy/CMakeLists.txt index 7c73859..b820416 100644 --- a/duneanaobj/StandardRecord/Proxy/CMakeLists.txt +++ b/duneanaobj/StandardRecord/Proxy/CMakeLists.txt @@ -1,9 +1,9 @@ FILE(GLOB SR_DEPENDENCIES duneanaobj/StandardRecord/*.h) add_custom_command(# Rebuild if anything in StandardRecord/ changes - DEPENDS ${SR_DEPENDENCIES} - OUTPUT SRProxy.cxx SRProxy.h FwdDeclare.h - COMMAND gen_srproxy -i duneanaobj/StandardRecord/StandardRecord.h -o SRProxy --target caf::StandardRecord --include-path ${PROJECT_SOURCE_DIR}:$ENV{ROOT_INC} --output-path duneanaobj/StandardRecord/Proxy --prolog ${CMAKE_CURRENT_SOURCE_DIR}/Prolog.h --epilog-fwd ${CMAKE_CURRENT_SOURCE_DIR}/EpilogFwd.h --extra-cflags ' -D_Float16=short -fsized-deallocation' + DEPENDS ${SR_DEPENDENCIES} + OUTPUT SRProxy.cxx SRProxy.h FwdDeclare.h + COMMAND gen_srproxy -i duneanaobj/StandardRecord/StandardRecord.h -o SRProxy --target caf::StandardRecord --include-path ${PROJECT_SOURCE_DIR}:$ENV{ROOT_INC} --output-path duneanaobj/StandardRecord/Proxy --prolog ${CMAKE_CURRENT_SOURCE_DIR}/Prolog.h --epilog-fwd ${CMAKE_CURRENT_SOURCE_DIR}/EpilogFwd.h --extra-cflags ' -D_Float16=short -fsized-deallocation' ) include_directories($ENV{SRPROXY_INC} ${CMAKE_BINARY_DIR}) From 1800c9353bd86d683190c4cd2b150c3b172f502e Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Thu, 5 Sep 2024 01:06:19 +0200 Subject: [PATCH 36/40] added inc and lib dirs to config file --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f486e6c..090e7d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,7 +71,7 @@ else() # Install the config files. install(FILES ${CMAKE_CURRENT_BINARY_DIR}/duneanaobjConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/duneanaobjConfigVersion.cmake DESTINATION lib/cmake/duneanaobj) - install(EXPORT duneanaobjTargets NAMESPACE duneanaobj:: DESTINATION lib/cmake/duneanaobj) + install(EXPORT duneanaobjTargets NAMESPACE duneanaobj:: DESTINATION lib/cmake/duneanaobj INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() add_subdirectory(duneanaobj) From f7e78cdf8ca318b4448e31ea5054530eb005ad06 Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Thu, 5 Sep 2024 01:08:26 +0200 Subject: [PATCH 37/40] added inc and lib dirs to config file --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 090e7d7..4ce713e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,8 +70,8 @@ else() configure_package_config_file(PackageConfig.cmake.in duneanaobjConfig.cmake PATH_VARS CMAKE_INSTALL_PREFIX INSTALL_DESTINATION lib/cmake/duneanaobj) # Install the config files. - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/duneanaobjConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/duneanaobjConfigVersion.cmake DESTINATION lib/cmake/duneanaobj) - install(EXPORT duneanaobjTargets NAMESPACE duneanaobj:: DESTINATION lib/cmake/duneanaobj INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/duneanaobjConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/duneanaobjConfigVersion.cmake DESTINATION lib/cmake/duneanaobj INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})) + install(EXPORT duneanaobjTargets NAMESPACE duneanaobj:: DESTINATION lib/cmake/duneanaobj)# INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() add_subdirectory(duneanaobj) From 3125f9be3f90ea1bc6ad56d9328c41a3d861ec45 Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Thu, 5 Sep 2024 01:09:34 +0200 Subject: [PATCH 38/40] added inc and lib dirs to config file --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ce713e..5043c2f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,7 +70,7 @@ else() configure_package_config_file(PackageConfig.cmake.in duneanaobjConfig.cmake PATH_VARS CMAKE_INSTALL_PREFIX INSTALL_DESTINATION lib/cmake/duneanaobj) # Install the config files. - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/duneanaobjConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/duneanaobjConfigVersion.cmake DESTINATION lib/cmake/duneanaobj INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/duneanaobjConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/duneanaobjConfigVersion.cmake DESTINATION lib/cmake/duneanaobj INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) install(EXPORT duneanaobjTargets NAMESPACE duneanaobj:: DESTINATION lib/cmake/duneanaobj)# INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() From ad8734138a78804a54597c9a5bf7920c69d9d9f3 Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Thu, 5 Sep 2024 01:23:41 +0200 Subject: [PATCH 39/40] added inc and lib dirs to config file --- CMakeLists.txt | 2 +- duneanaobj/StandardRecord/CMakeLists.txt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5043c2f..542c3fc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -70,7 +70,7 @@ else() configure_package_config_file(PackageConfig.cmake.in duneanaobjConfig.cmake PATH_VARS CMAKE_INSTALL_PREFIX INSTALL_DESTINATION lib/cmake/duneanaobj) # Install the config files. - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/duneanaobjConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/duneanaobjConfigVersion.cmake DESTINATION lib/cmake/duneanaobj INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/duneanaobjConfig.cmake ${CMAKE_CURRENT_BINARY_DIR}/duneanaobjConfigVersion.cmake DESTINATION lib/cmake/duneanaobj) install(EXPORT duneanaobjTargets NAMESPACE duneanaobj:: DESTINATION lib/cmake/duneanaobj)# INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() diff --git a/duneanaobj/StandardRecord/CMakeLists.txt b/duneanaobj/StandardRecord/CMakeLists.txt index 3c5b4ee..fa97fb9 100644 --- a/duneanaobj/StandardRecord/CMakeLists.txt +++ b/duneanaobj/StandardRecord/CMakeLists.txt @@ -32,8 +32,8 @@ else() install(TARGETS duneanaobj_StandardRecord EXPORT duneanaobjTargets - LIBRARY DESTINATION lib - RUNTIME DESTINATION bin - INCLUDES DESTINATION include/duneanaobj) + LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib + RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin + INCLUDES DESTINATION ${CMAKE_INSTALL_PREFIX}/include/duneanaobj) install(FILES ${inc_files} DESTINATION ${CMAKE_INSTALL_PREFIX}/include/duneanaobj/StandardRecord) endif() From e76063b1be67ec42dcfea6f9fda4bf13183d9118 Mon Sep 17 00:00:00 2001 From: Liam O'Sullivan Date: Thu, 12 Sep 2024 17:25:24 +0200 Subject: [PATCH 40/40] removed HEAD merge marker --- CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index eb0b42a..3667cac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,7 +17,6 @@ cmake_minimum_required (VERSION 3.20 FATAL_ERROR) # cmake_policy(VERSION 3.18) find_package(cetmodules REQUIRED) -<<<<<<< HEAD project(duneanaobj VERSION 03.06.01 LANGUAGES CXX) set(${PROJECT_NAME}_CMAKE_PROJECT_VERSION_STRING 03.06.01)