Skip to content

Commit

Permalink
Merge branch 'release/v3_12_00'
Browse files Browse the repository at this point in the history
  • Loading branch information
knoepfel committed Aug 23, 2022
2 parents fe3131d + e66ee57 commit 1dbcf0a
Show file tree
Hide file tree
Showing 93 changed files with 415 additions and 333 deletions.
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
cmake_minimum_required(VERSION 3.19 FATAL_ERROR)

find_package(cetmodules 2.13.00 REQUIRED)
project(art VERSION 3.11.01 LANGUAGES CXX C)
project(art VERSION 3.12.00 LANGUAGES CXX C)

include(CetCMakeEnv)
cet_cmake_env()
Expand Down Expand Up @@ -47,8 +47,6 @@ endif()

cet_report_compiler_flags(REPORT_THRESHOLD VERBOSE)

cet_register_export_set(SET_NAME art NAMESPACE art)

# source
add_subdirectory(art)

Expand Down
48 changes: 22 additions & 26 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,30 +6,14 @@
"type" : "STRING",
"value" : "RelWithDebInfo"
},
"CMAKE_CXX_COMPILER" : {
"type" : "STRING",
"value" : "clang++"
},
"CMAKE_CXX_EXTENSIONS" : {
"type" : "BOOL",
"value" : "OFF"
},
"CMAKE_CXX_STANDARD" : {
"type" : "STRING",
"value" : "17"
},
"CMAKE_CXX_STANDARD_REQUIRED" : {
"type" : "BOOL",
"value" : "ON"
},
"CMAKE_C_COMPILER" : {
"type" : "STRING",
"value" : "clang"
},
"CMAKE_Fortran_COMPILER" : {
"type" : "STRING",
"value" : "gfortran"
},
"art_ADD_NOARCH_DIRS_INIT" : {
"type" : "INTERNAL",
"value" : "PERLLIB_DIR"
Expand All @@ -46,29 +30,45 @@
},
{
"cacheVariables" : {
"CMAKE_CXX_COMPILER" : {
"type" : "STRING",
"value" : "$env{CETPKG_CXX_COMPILER}"
},
"CMAKE_CXX_STANDARD" : {
"type" : "STRING",
"value" : "$env{CETPKG_CXX_STANDARD}"
},
"CMAKE_C_COMPILER" : {
"type" : "STRING",
"value" : "$env{CETPKG_C_COMPILER}"
},
"CMAKE_Fortran_COMPILER" : {
"type" : "STRING",
"value" : "$env{CETPKG_Fortran_COMPILER}"
},
"UPS_CXX_COMPILER_ID" : {
"type" : "STRING",
"value" : "Clang"
"value" : "$env{CETPKG_CXX_COMPILER_ID}"
},
"UPS_CXX_COMPILER_VERSION" : {
"type" : "STRING",
"value" : "7.0.0"
"value" : "$env{CETPKG_CXX_COMPILER_VERSION}"
},
"UPS_C_COMPILER_ID" : {
"type" : "STRING",
"value" : "Clang"
"value" : "$env{CETPKG_C_COMPILER_ID}"
},
"UPS_C_COMPILER_VERSION" : {
"type" : "STRING",
"value" : "7.0.0"
"value" : "$env{CETPKG_C_COMPILER_VERSION}"
},
"UPS_Fortran_COMPILER_ID" : {
"type" : "STRING",
"value" : "GNU"
"value" : "$env{CETPKG_Fortran_COMPILER_ID}"
},
"UPS_Fortran_COMPILER_VERSION" : {
"type" : "STRING",
"value" : "8.2.0"
"value" : "$env{CETPKG_Fortran_COMPILER_VERSION}"
},
"WANT_UPS" : {
"type" : "BOOL",
Expand All @@ -93,10 +93,6 @@
"art_UPS_QUALIFIER_STRING_INIT" : {
"type" : "STRING",
"value" : "$env{CETPKG_QUALSPEC}"
},
"art_UPS_USE_TIME_DEPENDENCIES_INIT" : {
"type" : "STRING",
"value" : "canvas"
}
},
"description" : "Extra configuration for UPS package generation",
Expand Down
3 changes: 0 additions & 3 deletions Modules/ArtMake.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ X

include_guard()

cmake_policy(PUSH)
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)

include(BuildPlugins)
Expand Down Expand Up @@ -300,5 +299,3 @@ function(art_make)
art_dictionary(${dict_args} DICTIONARY_LIBRARIES PRIVATE ${library_name})
endif()
endfunction()

cmake_policy(POP)
6 changes: 3 additions & 3 deletions Modules/BuildPlugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ set(_simple_plugin_var_list CETLIB_EXCEPT HEP_CONCURRENCY CETLIB FHICLCPP
MF_MESSAGELOGGER CANVAS ART_FRAMEWORK_CORE CANVAS_ROOT_IO ART_ROOT_IO
ROOT_CORE_LIBRARY)

find_package(messagefacility PRIVATE QUIET)
find_package(messagefacility QUIET)
if (messagefacility_FOUND)
include(MessagefacilityPlugins)
endif()
find_package(art PRIVATE QUIET)
find_package(art QUIET)
if (art_FOUND)
include(ArtPlugins)
endif()
Expand All @@ -57,7 +57,7 @@ macro(simple_plugin NAME SUFFIX)
_simple_plugin_target_list
_simple_plugin_var_list)
if (NOT (TARGET ${_sp_tgt} OR _sp_var))
find_package(${_sp_pkg} PRIVATE QUIET REQUIRED)
find_package(${_sp_pkg} QUIET REQUIRED)
endif()
endforeach()
unset(_sp_pkg)
Expand Down
3 changes: 0 additions & 3 deletions Modules/art::module.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ X
#]================================================================]
include_guard()

cmake_policy(PUSH)
cmake_minimum_required(VERSION 3.18.2 FATAL_ERROR)

include(BasicPlugin)
Expand All @@ -31,5 +30,3 @@ macro(art::module NAME)
basic_plugin(${NAME} module ${ARGN} ${_art_module_deps})
unset(_art_module_deps)
endmacro()

cmake_policy(POP)
5 changes: 1 addition & 4 deletions Modules/art::plugin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ X
#]================================================================]
include_guard()

cmake_policy(PUSH)
cmake_minimum_required(VERSION 3.18.2...3.20 FATAL_ERROR)
cmake_minimum_required(VERSION 3.18.2...3.22 FATAL_ERROR)

include(BasicPlugin)

Expand All @@ -26,5 +25,3 @@ macro(art::plugin NAME)
basic_plugin(${NAME} plugin ${ARGN} ${_art_plugin_deps})
unset(_art_plugin_deps)
endmacro()

cmake_policy(POP)
3 changes: 0 additions & 3 deletions Modules/art::service.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ X
#]================================================================]
include_guard()

cmake_policy(PUSH)
cmake_minimum_required(VERSION 3.18.2 FATAL_ERROR)

include(BasicPlugin)
Expand All @@ -29,5 +28,3 @@ macro(art::service NAME)
basic_plugin(${NAME} service ${ARGN} ${_art_service_deps})
unset(_art_service_deps)
endmacro()

cmake_policy(POP)
8 changes: 4 additions & 4 deletions Modules/art::source.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ X
#]================================================================]
include_guard()

cmake_policy(PUSH)
cmake_minimum_required(VERSION 3.18.2 FATAL_ERROR)

include(BasicPlugin)

macro(art::source NAME)
if (TARGET art_plugin_types::Source)
if (TARGET art_plugin_types::SourceT)
# The vast majority of sources extant are based on the Source template.
set(_art_source_deps LIBRARIES REG art_plugin_types::SourceT)
elseif (TARGET art_plugin_types::Source)
# The vast majority of sources extant are based on the Source template.
set(_art_source_deps LIBRARIES REG art_plugin_types::Source)
else()
Expand All @@ -32,5 +34,3 @@ macro(art::source NAME)
basic_plugin(${NAME} source NOP ${ARGN} ${_art_source_deps})
unset(_art_source_deps)
endmacro()

cmake_policy(POP)
10 changes: 7 additions & 3 deletions Modules/art::tool.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,20 @@ X
#]================================================================]
include_guard()

cmake_policy(PUSH)
cmake_minimum_required(VERSION 3.18.2 FATAL_ERROR)

include(BasicPlugin)

macro(art::tool NAME)
if (TARGET art_plugin_types::tool)
set(_art_tool_deps LIBRARIES REG art_plugin_types::tool)
if (TARGET art_plugin_types::tool_interface)
list(APPEND _art_tool_deps
CONDITIONAL art_plugin_types::tool_interface)
else()
list(APPEND _art_tool_deps
CONDITIONAL fhiclcpp::types fhiclcpp::fhiclcpp)
endif()
else()
# Older art suites.
set(_art_tool_deps LIBRARIES CONDITIONAL
Expand All @@ -25,5 +31,3 @@ macro(art::tool NAME)
basic_plugin(${NAME} tool ${ARGN} ${_art_tool_deps})
unset(_art_tool_deps)
endmacro()

cmake_policy(POP)
29 changes: 11 additions & 18 deletions art/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,24 +24,17 @@ function(make_simple_builder NAME)
REG ${TGT} NOP)
endfunction()

find_package(Boost COMPONENTS date_time graph program_options regex REQUIRED PUBLIC)
find_package(Boost PRIVATE COMPONENTS filesystem headers thread unit_test_framework json REQUIRED)
find_package(CLHEP COMPONENTS Random Vector REQUIRED PUBLIC)
find_package(Range-v3 PRIVATE REQUIRED)
find_package(TBB REQUIRED PUBLIC)
find_package(canvas REQUIRED PUBLIC)
find_package(cetlib REQUIRED PUBLIC)
find_package(cetlib_except REQUIRED PUBLIC)
find_package(fhiclcpp REQUIRED PUBLIC)
find_package(hep_concurrency REQUIRED PUBLIC)
find_package(messagefacility REQUIRED PUBLIC)

# Register export sets here in dependency order to avoid issues.
cet_register_export_set(SET_NAME ServicePluginType NAMESPACE art_plugin_types)
cet_register_export_set(SET_NAME Services NAMESPACE art)
cet_register_export_set(SET_NAME ServiceUsers NAMESPACE art)
cet_register_export_set(SET_NAME PluginSupport NAMESPACE art_plugin_support)
cet_register_export_set(SET_NAME PluginTypes NAMESPACE art_plugin_types)
find_package(Boost COMPONENTS date_time graph program_options regex REQUIRED EXPORT)
find_package(Boost COMPONENTS filesystem headers thread unit_test_framework json REQUIRED)
find_package(CLHEP COMPONENTS Random Vector REQUIRED EXPORT)
find_package(Range-v3 REQUIRED)
find_package(TBB REQUIRED EXPORT)
find_package(canvas REQUIRED EXPORT)
find_package(cetlib REQUIRED EXPORT)
find_package(cetlib_except REQUIRED EXPORT)
find_package(fhiclcpp REQUIRED EXPORT)
find_package(hep_concurrency REQUIRED EXPORT)
find_package(messagefacility REQUIRED EXPORT)

add_subdirectory(Version)
add_subdirectory(Utilities)
Expand Down
2 changes: 1 addition & 1 deletion art/Framework/Art/BasicOptionsHandler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ art::BasicOptionsHandler::doProcessOptions(
catch (cet::exception& e) {
std::cerr << "Failed to parse the configuration file '"
<< vm["config"].as<std::string>() << "' with exception\n"
<< e.what() << "\n";
<< e.what() << '\n';
return 90;
}
if (raw_config.empty()) {
Expand Down
2 changes: 1 addition & 1 deletion art/Framework/Art/FileCatalogOptionsHandler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ namespace {
art::Exception e(art::errors::Configuration);
e << "SAM metadata information is required -- missing metadata:\n";
for (auto const& s : missingItems) {
e << s << "\n";
e << s << '\n';
}
}
}
Expand Down
22 changes: 10 additions & 12 deletions art/Framework/Art/OptionsHandler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,34 @@ namespace {
// class F must be callable with no arguments, and return 'int'.
template <class F>
int
exceptionCatcher(F func,
std::string const& funcName [[maybe_unused]],
int failureCode)
exceptionCatcher(F func, std::string const& funcName, int failureCode)
{
try {
return func();
}
catch (cet::exception& e) {
std::cerr << "OptionsHandler caught a cet::exception calling " << funcName
<< "\n"
<< e.what() << "\n";
<< '\n'
<< e.what() << '\n';
}
catch (std::exception& e) {
std::cerr << "OptionsHandler caught an std::exception calling "
<< funcName << "\n"
<< e.what() << "\n";
<< funcName << '\n'
<< e.what() << '\n';
}
catch (std::string& s) {
std::cerr << "OptionsHandler caught a string exception calling "
<< funcName << "\n"
<< s << "\n";
<< funcName << '\n'
<< s << '\n';
}
catch (char const* s) {
std::cerr << "OptionsHandler caught a string exception calling "
<< funcName << "\n"
<< s << "\n";
<< funcName << '\n'
<< s << '\n';
}
catch (...) {
std::cerr << "OptionsHandler caught an unknown exception calling "
<< funcName << "\n";
<< funcName << '\n';
}
return failureCode;
}
Expand Down
2 changes: 1 addition & 1 deletion art/Framework/Art/OptionsHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace art {
private:
// Check selected options for consistency (should throw on failure).
virtual int doCheckOptions(bpo::variables_map const& vm) = 0;
// Act on selected options (should throw on failure).
// Act on selected options (should throw on failure).
virtual int doProcessOptions(bpo::variables_map const& vm,
fhicl::intermediate_table& raw_config) = 0;
};
Expand Down
3 changes: 1 addition & 2 deletions art/Framework/Art/ProcessingOptionsHandler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ art::ProcessingOptionsHandler::doCheckOptions(bpo::variables_map const& vm)
if ((vm.count("rethrow-all") + vm.count("rethrow-default") +
vm.count("no-rethrow-default")) > 1) {
throw Exception(errors::Configuration)
<< "Options --default-exceptions, --rethrow-all, and --rethrow-default "
"\n"
<< "Options --default-exceptions, --rethrow-all, and --rethrow-default\n"
<< "are mutually incompatible.\n";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ namespace art::detail {
details_(LibraryInfo const& li) const
{
std::ostringstream result;
result << indent__2() << "provider: " << li.provider() << "\n"
<< indent__2() << "source : " << li.path() << "\n"
result << indent__2() << "provider: " << li.provider() << '\n'
<< indent__2() << "source : " << li.path() << '\n'
<< indent__2() << "library : " << li.so_name() << "\n\n";
return result.str();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ namespace art::detail {
details_(LibraryInfo const& li) const
{
std::ostringstream result;
result << indent__2() << "provider: " << li.provider() << "\n"
<< indent__2() << "source : " << li.path() << "\n"
result << indent__2() << "provider: " << li.provider() << '\n'
<< indent__2() << "source : " << li.path() << '\n'
<< indent__2() << "library : " << li.so_name() << "\n\n";
return result.str();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ namespace art::detail {
details_(LibraryInfo const& li) const
{
std::ostringstream result;
result << indent__2() << "provider: " << li.provider() << "\n"
<< indent__2() << "type : " << li.plugin_type() << "\n"
<< indent__2() << "source : " << li.path() << "\n"
result << indent__2() << "provider: " << li.provider() << '\n'
<< indent__2() << "type : " << li.plugin_type() << '\n'
<< indent__2() << "source : " << li.path() << '\n'
<< indent__2() << "library : " << li.so_name() << "\n\n";
return result.str();
}
Expand Down
Loading

0 comments on commit 1dbcf0a

Please sign in to comment.