Skip to content

Commit c876211

Browse files
committed
Merge branch 'release/v3_10_00'
2 parents b786546 + 435b05d commit c876211

File tree

113 files changed

+694
-652
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+694
-652
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Please give instructions so we can reproduce this bug.
15+
16+
**If this is a high-priority issue**
17+
Please add the "high priority" label to this issue.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: feature
6+
assignees: ''
7+
8+
---
9+
10+
**What problem are you trying to solve?**
11+
Please provide the context of this feature request--i.e. what issue has motivated you to file this request.
12+
13+
**Describe your feature request**
14+
A clear and concise description of the requested feature. Please describe *what* you want the feature to provide rather than implementation details.
15+
16+
**If this is a high-priority issue**
17+
Please add the "high priority" label to this issue.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: General issue
3+
about: Create an issue that doesn't fit in the other categories
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
**Describe your request or issue**
11+
A concise and clear description of your request or issue.
12+
13+
**If this is a high-priority issue**
14+
Please add the "high priority" label to this issue.

CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@
1414
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)
1515

1616
find_package(cetmodules 2.13.00 REQUIRED)
17-
project(art VERSION 3.09.03 LANGUAGES CXX C)
17+
project(art VERSION 3.10.00 LANGUAGES CXX C)
1818

1919
include(CetCMakeEnv)
2020
cet_cmake_env()
2121

2222
# Find our own CMake modules, and tell everyone else where to find them.
23-
cet_cmake_module_directories(Modules)
23+
cet_cmake_module_directories(Modules BINARY)
2424

2525
cet_set_compiler_flags(DIAGS VIGILANT
2626
WERROR
@@ -49,16 +49,16 @@ cet_report_compiler_flags(REPORT_THRESHOLD VERBOSE)
4949

5050
cet_register_export_set(SET_NAME art NAMESPACE art)
5151

52+
# source
53+
add_subdirectory(art)
54+
55+
# CMake modules -- must be after plugin builders have been defined.
56+
add_subdirectory(Modules)
57+
5258
# Plugin skeleton generators for cetskelgen.
5359
add_subdirectory(perllib)
5460

5561
# tools
5662
add_subdirectory(tools)
5763

58-
# source
59-
add_subdirectory(art)
60-
61-
# CMake modules
62-
add_subdirectory(Modules)
63-
6464
cet_cmake_config()

Modules/ArtMake.cmake

Lines changed: 41 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
### MIGRATE-NO-ACTION
2+
#[================================================================[.rst:
3+
X
4+
=
5+
#]================================================================]
26
# art_make
37
#
48
# Identify the files in the current source directory and build
@@ -100,7 +104,7 @@
100104
#
101105
########################################################################
102106

103-
include_guard(DIRECTORY)
107+
include_guard()
104108

105109
cmake_policy(PUSH)
106110
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
@@ -138,22 +142,25 @@ endmacro()
138142
# art_make
139143
####################################
140144
function(art_make)
141-
set(flags BASENAME_ONLY LIB_ONLY NO_DICTIONARY NO_INSTALL NO_LIB NO_PLUGINS
142-
USE_PRODUCT_NAME USE_PROJECT_NAME)
145+
set(flags LIB_ONLY NO_LIB NO_PLUGINS USE_PRODUCT_NAME USE_PROJECT_NAME)
143146
cet_regex_escape(VAR flags_regex ${flags})
144147
list(JOIN flags_regex "|" tmp)
145148
set(flags_regex "^(${tmp})$")
146149
set(seen_art_make_flags "${ARGV}")
147150
list(FILTER seen_art_make_flags INCLUDE REGEX "${flags_regex}")
148-
list(REMOVE_DUPLICATES seen_art_make_flags)
149-
list(TRANSFORM ARGV REPLACE "${flags_regex}" "NOP")
150151
if ("USE_PRODUCT_NAME" IN_LIST seen_art_make_flags AND
151152
"USE_PROJECT_NAME" IN_LIST seen_art_make_flags)
152153
message(WARNING "USE_PRODUCT_NAME and USE_PROJECT_NAME are synonymous")
153-
list(REMOVE_ITEM seen_art_make_flags "USE_PRODUCT_NAME")
154+
endif()
155+
list(TRANSFORM seen_art_make_flags REPLACE "^USE_PRODUCT_NAME$" "USE_PROJECT_NAME")
156+
list(REMOVE_DUPLICATES seen_art_make_flags)
157+
list(TRANSFORM ARGN REPLACE "${flags_regex}" "NOP")
158+
if ("USE_PROJECT_NAME" IN_LIST seen_art_make_flags)
159+
list(APPEND ARGN "USE_PROJECT_NAME")
160+
list(REMOVE_ITEM seen_art_make_flags "USE_PROJECT_NAME")
154161
endif()
155162
foreach (flag IN LISTS seen_art_make_flags)
156-
set(AM_${flag} ${flag})
163+
set(AM_${flag} TRUE)
157164
endforeach()
158165
if (AM_LIB_ONLY AND AM_NO_LIB)
159166
# Nothing to do except hold up tea and no tea to confuse the GPP door
@@ -169,8 +176,9 @@ function(art_make)
169176
set(flags "${flag_keywords_dict}")
170177
set(one_arg_options "${one_arg_option_keywords_dict}")
171178
set(list_options "${list_option_keywords_dict}")
172-
list(APPEND flags ${_cet_make_flags})
173-
list(APPEND one_arg_options ${_cet_make_one_arg_options})
179+
list(APPEND flags ${_cet_make_flags} ALLOW_UNDERSCORES BASENAME_ONLY
180+
NO_DICTIONARY NO_EXPORT NO_INSTALL USE_BOOST_UNIT USE_PROJECT_NAME VERSION)
181+
list(APPEND one_arg_options ${_cet_make_one_arg_options} EXPORT_SET LIB_TYPE SOVERSION)
174182
list(APPEND list_options ${_cet_make_list_options})
175183

176184
# Identify caller-specified plugin types.
@@ -185,7 +193,10 @@ function(art_make)
185193
list(TRANSFORM plugin_types REPLACE "^(.+)$" "*_\\1.cc"
186194
OUTPUT_VARIABLE plugin_glob)
187195
list(TRANSFORM plugin_types TOUPPER OUTPUT_VARIABLE plugin_prefixes)
188-
set(flags_plugin USE_BOOST_UNIT VERSION)
196+
197+
# Identify plugin-specific options and add them to the parsing lists.
198+
set(flags_plugin ALLOW_UNDERSCORES BASENAME_ONLY USE_BOOST_UNIT
199+
USE_PRODUCT_NAME USE_PROJECT_NAME VERSION)
189200
set(one_arg_options_plugin EXPORT_SET LIB_TYPE SOVERSION)
190201
set(list_options_plugin LIBRARIES)
191202
foreach (option_type IN ITEMS flags one_arg_options list_options)
@@ -196,10 +207,12 @@ function(art_make)
196207
endforeach()
197208
list(REMOVE_DUPLICATES ${option_type})
198209
endforeach()
210+
199211
# We have to parse everything at once and pass through to the right
200212
# place if we need to otherwise we could get confused with argument /
201213
# option boundaries with multiple parsing passes.
202-
cmake_parse_arguments(PARSE_ARGV 0 AM "${flags}" "${one_arg_options}" "${list_options}")
214+
cmake_parse_arguments(AM "${flags}" "${one_arg_options}"
215+
"${list_options}" ${ARGN})
203216
# Identify plugin sources.
204217
set(plugins_glob ${plugin_glob})
205218
foreach(subdir IN LISTS AM_SUBDIRS)
@@ -214,6 +227,7 @@ function(art_make)
214227
# whether we're making the plugin.
215228
cet_passthrough(APPEND KEYWORD EXCLUDE plugin_sources AM_EXCLUDE)
216229
set(flag_flag FLAG) # Flags are handled differently to the others.
230+
set(cet_make_args)
217231
foreach (option_type IN ITEMS flag one_arg_option list_option)
218232
# Dictionaries.
219233
foreach (keyword opt IN ZIP_LISTS ${option_type}_keywords_dict ${option_type}s_dict)
@@ -234,16 +248,24 @@ function(art_make)
234248
# Common options.
235249
foreach (type IN ITEMS dict LISTS plugin_types)
236250
string(TOUPPER "${type}" TYPE)
237-
cet_passthrough(FLAG APPEND AM_NO_INSTALL ${type}_args)
238-
if (NOT VERSION IN_LIST ${type}_args)
239-
cet_passthrough(FLAG APPEND AM_VERSION ${type}_args)
240-
endif()
241-
if (NOT (AM_NO_INSTALL OR EXPORT_SET IN_LIST ${type}_args))
242-
cet_passthrough(APPEND AM_EXPORT_SET ${type}_args)
251+
foreach (common_opt IN ITEMS NO_EXPORT NO_INSTALL USE_PROJECT_NAME VERSION)
252+
if (AM_${common_opt} AND NOT "${common_opt}" IN_LIST ${type}_args)
253+
list(APPEND ${type}_args "${common_opt}")
254+
endif()
255+
endforeach()
256+
if (DEFINED AM_EXPORT_SET AND
257+
NOT (AM_NO_INSTALL OR EXPORT_SET IN_LIST ${type}_args))
258+
list(APPEND ${type}_args EXPORT_SET ${AM_EXPORT_SET})
243259
endif()
244-
cet_passthrough(FLAG APPEND AM_USE_PROJECT_NAME ${type}_args)
245260
if (NOT type STREQUAL "dict")
246-
cet_passthrough(FLAG APPEND AM_BASENAME_ONLY ${type}_args)
261+
foreach (plugin_opt IN ITEMS ALLOW_UNDERSCORES BASENAME_ONLY USE_BOOST_UNIT)
262+
if (AM_${plugin_opt} AND NOT ${plugin_opt} IN_LIST ${type}_args)
263+
list(APPEND ${type}_args ${plugin_opt})
264+
endif()
265+
endforeach()
266+
if (DEFINED AM_SOVERSION AND NOT SOVERSION IN_LIST ${type}_args)
267+
list(APPEND ${type}_args SOVERSION ${AM_SOVERSION})
268+
endif()
247269
endif()
248270
endforeach()
249271

Modules/BuildPlugins.cmake

Lines changed: 44 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#[================================================================[.rst:
2+
X
3+
=
4+
#]================================================================]
15
# macros for building plugin libraries
26
#
37
# The plugin type is expected to be service, source, or module, but we
@@ -20,7 +24,7 @@
2024
# cetbuildtools/Modules/BasicPlugin.cmake ### MIGRATE-NO-ACTION
2125
# (https://cdcvs.fnal.gov/redmine/projects/cetbuildtools/repository/revisions/master/entry/Modules/BasicPlugin.cmake). ### MIGRATE-NO-ACTION
2226
########################################################################
23-
include_guard(DIRECTORY)
27+
include_guard()
2428

2529
cmake_policy(PUSH)
2630
cmake_minimum_required(VERSION 3.18.2 FATAL_ERROR)
@@ -38,46 +42,53 @@ set(_simple_plugin_var_list CETLIB_EXCEPT HEP_CONCURRENCY CETLIB FHICLCPP
3842
ROOT_CORE_LIBRARY)
3943

4044
find_package(messagefacility PRIVATE QUIET)
41-
include(mfPlugin OPTIONAL)
42-
include(mfStatsPlugin OPTIONAL)
43-
include(modulePlugin)
44-
include(pluginPlugin)
45-
include(servicePlugin)
46-
include(sourcePlugin)
47-
include(toolPlugin)
45+
if (messagefacility_FOUND)
46+
include(MessagefacilityPlugins)
47+
endif()
48+
find_package(art PRIVATE QUIET)
49+
if (art_FOUND)
50+
include(ArtPlugins)
51+
endif()
4852

4953
# Simple plugin libraries - art suite packages are found automatically.
50-
function(simple_plugin)
51-
foreach (pkg tgt var IN ZIP_LISTS
52-
_simple_plugin_pkg_list _simple_plugin_target_list _simple_plugin_var_list)
53-
if (NOT (TARGET ${tgt} OR var))
54-
find_package(${pkg} PRIVATE QUIET REQUIRED)
54+
macro(simple_plugin NAME SUFFIX)
55+
foreach (_sp_pkg _sp_tgt _sp_var IN ZIP_LISTS
56+
_simple_plugin_pkg_list
57+
_simple_plugin_target_list
58+
_simple_plugin_var_list)
59+
if (NOT (TARGET ${_sp_tgt} OR _sp_var))
60+
find_package(${_sp_pkg} PRIVATE QUIET REQUIRED)
5561
endif()
5662
endforeach()
63+
unset(_sp_pkg)
64+
unset(_sp_tgt)
65+
unset(_sp_var)
5766
build_plugin(${ARGV})
58-
endfunction()
67+
endmacro()
5968

6069
# Per simple_plugin() without the overhead of finding packages one may
61-
# not need.
62-
function(build_plugin NAME SUFFIX)
63-
set(liblist)
64-
_get_plugin_base(BASE ARGN ${ARGN})
65-
if (BASE AND COMMAND "${BASE}")
66-
cmake_language(CALL "${BASE}" ${NAME} ${ARGN})
67-
return()
68-
elseif (BASE AND ${BASE}_LIBRARIES)
69-
set(liblist "${${BASE}_LIBRARIES}")
70-
elseif (COMMAND "${SUFFIX}")
71-
cmake_language(CALL "${SUFFIX}" ${NAME} ${ARGN})
72-
return()
73-
elseif (COMMAND "${SUFFIX}_plugin")
74-
cmake_language(CALL "${SUFFIX}_plugin" ${NAME} "${BASE}" ${ARGN})
75-
return()
76-
elseif (${SUFFIX}_LIBRARIES)
77-
set(liblist "${${SUFFIX}_LIBRARIES}")
70+
# not need (historical).
71+
macro(build_plugin NAME SUFFIX)
72+
_get_plugin_base(_bp_base _bp_args ${ARGN})
73+
if ("${_bp_base}" STREQUAL "")
74+
set(_bp_base ${SUFFIX})
7875
endif()
79-
basic_plugin(${NAME} ${SUFFIX} ${liblist} NOP ${ARGN})
80-
endfunction()
76+
if (_bp_base MATCHES "^[A-Z]")
77+
string(PREPEND _bp_base "art::")
78+
else()
79+
string(REGEX REPLACE "^(module|plugin|service|source|tool)$"
80+
"art::\\1"
81+
_bp_base
82+
"${_bp_base}")
83+
endif()
84+
string(JOIN " " _bp_arg_string ${NAME} ${_bp_base} ${_bp_args})
85+
warn_deprecated(build_plugin NEW "cet_build_plugin(${_bp_arg_string})"
86+
SINCE "cetmodules 2.25.00")
87+
cet_build_plugin(${NAME} ${_bp_base} ${_bp_args})
88+
unset(_bp_base)
89+
unset(_bp_args)
90+
unset(_bp_arg_string)
91+
endmacro()
8192

8293
function(_get_plugin_base RESULT_VAR REMAINDER_VAR)
8394
set(result)

Modules/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
install(DIRECTORY ./ DESTINATION Modules
22
FILES_MATCHING PATTERN "*.cmake" PATTERN "[.#]*.cmake" EXCLUDE)
3+
file(COPY . DESTINATION .
4+
FILES_MATCHING PATTERN "*.cmake" PATTERN "[.#]*.cmake" EXCLUDE)

Modules/art::module.cmake

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#[================================================================[.rst:
2+
X
3+
=
4+
#]================================================================]
5+
include_guard()
6+
7+
cmake_policy(PUSH)
8+
cmake_minimum_required(VERSION 3.18.2 FATAL_ERROR)
9+
10+
include(BasicPlugin)
11+
12+
macro(art::module NAME)
13+
if (TARGET art_plugin_types::module)
14+
set(_art_module_deps LIBRARIES REG art_plugin_types::module)
15+
else()
16+
set(_art_module_deps LIBRARIES CONDITIONAL
17+
art_Framework_Core
18+
art_Framework_Principal
19+
art_Framework_Services_Registry
20+
art_Persistency_Common
21+
art_Persistency_Provenance
22+
art_Utilities
23+
canvas
24+
fhiclcpp
25+
cetlib
26+
cetlib_except
27+
ROOT::Core
28+
Boost::filesystem
29+
)
30+
endif()
31+
basic_plugin(${NAME} module ${ARGN} ${_art_module_deps})
32+
unset(_art_module_deps)
33+
endmacro()
34+
35+
cmake_policy(POP)

Modules/art::plugin.cmake

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#[================================================================[.rst:
2+
X
3+
=
4+
#]================================================================]
5+
include_guard()
6+
7+
cmake_policy(PUSH)
8+
cmake_minimum_required(VERSION 3.18.2...3.20 FATAL_ERROR)
9+
10+
include(BasicPlugin)
11+
12+
macro(art::plugin NAME)
13+
if (TARGET art_plugin_support::plugin_config_macros)
14+
set(_art_plugin_deps LIBRARIES REG
15+
art_plugin_support::plugin_config_macros
16+
art_plugin_support::support_macros
17+
)
18+
else()
19+
set(_art_plugin_deps LIBRARIES CONDITIONAL
20+
art_Utilities
21+
fhiclcpp
22+
cetlib
23+
cetlib_except
24+
Boost::filesystem)
25+
endif()
26+
basic_plugin(${NAME} plugin ${ARGN} ${_art_plugin_deps})
27+
unset(_art_plugin_deps)
28+
endmacro()
29+
30+
cmake_policy(POP)

0 commit comments

Comments
 (0)