Skip to content

Commit

Permalink
Make nlohmman_json version a single point of configuration
Browse files Browse the repository at this point in the history
Co-authored-by: Andre Sailer <andre.philippe.sailer@cern.ch>
  • Loading branch information
tmadlener and andresailer authored Oct 23, 2024
1 parent 5bb65d2 commit 2b9f971
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ find_package(ROOT REQUIRED COMPONENTS RIO Tree Physics)

option(EDM4HEP_WITH_JSON "Whether or not to build EDM4HEP with JSON support (and edm4hep2json)" ON)
if (EDM4HEP_WITH_JSON)
find_package(nlohmann_json 3.10.5 REQUIRED)
set(EDM4HEP_NLOHMANN_JSON_VERSION 3.10.5)
find_package(nlohmann_json ${EDM4HEP_NLOHMANN_JSON_VERSION} REQUIRED)
endif()

include(cmake/Key4hepConfig.cmake)
Expand Down
2 changes: 1 addition & 1 deletion cmake/EDM4HEPConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ find_dependency(podio REQUIRED)

set(EDM4HEP_WITH_JSON @EDM4HEP_WITH_JSON@)
if (EDM4HEP_WITH_JSON)
find_dependency(nlohmann_json 3.10.5 REQUIRED)
find_dependency(nlohmann_json @EDM4HEP_NLOHMANN_JSON_VERSION@ REQUIRED)
endif()

# - Include the targets file to create the imported targets that a client can
Expand Down

0 comments on commit 2b9f971

Please sign in to comment.