Skip to content

Commit 255815b

Browse files
authoredNov 24, 2024··
cmake: move find_package from plugin_add to CMakeLists.txt (#1678)
This should bring us below 50 statement limit of cmake-lint. Also, no need to call find_package for every plugin. External plugins already have those looked up in cmake/EICreconConfig.cmake.in.
1 parent 6eb0941 commit 255815b

File tree

2 files changed

+3
-19
lines changed

2 files changed

+3
-19
lines changed
 

‎CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ find_package(EDM4EIC 5.0 REQUIRED)
167167
# spdlog
168168
find_package(spdlog REQUIRED)
169169

170+
# fmt
171+
find_package(fmt 9.0.0 REQUIRED)
172+
170173
# Guidelines Support Library
171174
find_package(Microsoft.GSL CONFIG)
172175

‎cmake/jana_plugin.cmake

-19
Original file line numberDiff line numberDiff line change
@@ -23,25 +23,6 @@ macro(plugin_add _name)
2323
endif()
2424
endforeach()
2525

26-
# Include JANA by default
27-
find_package(JANA REQUIRED)
28-
29-
# TODO: NWB: This really needs to be a dependency of JANA itself. If we don't
30-
# do this here, CMake will later refuse to accept that podio is indeed a
31-
# dependency of JANA and aggressively reorders my target_link_list to reflect
32-
# this misapprehension.
33-
# https://gitlab.kitware.com/cmake/cmake/blob/v3.13.2/Source/cmComputeLinkDepends.cxx
34-
find_package(podio REQUIRED)
35-
36-
# include logging by default
37-
find_package(spdlog REQUIRED)
38-
39-
# include fmt by default
40-
find_package(fmt 9.0.0 REQUIRED)
41-
42-
# include gsl by default
43-
find_package(Microsoft.GSL CONFIG)
44-
4526
# Define plugin
4627
if(${_name}_WITH_PLUGIN)
4728
add_library(${_name}_plugin SHARED ${PLUGIN_SOURCES})

0 commit comments

Comments
 (0)
Please sign in to comment.