Skip to content

Commit

Permalink
build: Download nlohmann/json zip instead of git clone (#1204)
Browse files Browse the repository at this point in the history
Switches from getting `nlohmann/json` sources via git to a zip file download from GitHub. For some reason, the git repo is very large and takes a while to clone, so this method is much quicker in my testing.
  • Loading branch information
paulgessinger committed Mar 24, 2022
1 parent 0926824 commit 8e168c8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions thirdparty/nlohmann_json/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ message( STATUS "Building nlohmann_json as part of the ACTS project" )


# Declare where to get VecMem from.
set( ACTS_NLOHMANN_JSON_GIT_REPOSITORY "https://github.com/nlohmann/json.git"
CACHE STRING "Git repository to take nlohmann_json from" )
set( ACTS_NLOHMANN_JSON_GIT_TAG "v3.10.5" CACHE STRING "Version of nlohmann_json to build" )
set( ACTS_NLOHMANN_JSON_SHA1 "8969f5ad1a422e01f040ff48dcae9c0e6ad0811d" CACHE STRING "SHA1 hash of the downloaded zip" )
mark_as_advanced( ACTS_NLOHMANN_JSON_GIT_REPOSITORY ACTS_NLOHMANN_JSON_GIT_TAG )
FetchContent_Declare( nlohmann_json
GIT_REPOSITORY "${ACTS_NLOHMANN_JSON_GIT_REPOSITORY}"
GIT_TAG "${ACTS_NLOHMANN_JSON_GIT_TAG}")
URL "https://github.com/nlohmann/json/archive/refs/tags/${ACTS_NLOHMANN_JSON_GIT_TAG}.tar.gz"
URL_HASH SHA1=${ACTS_NLOHMANN_JSON_SHA1})

# Now set up its build.
set(JSON_BuildTests OFF CACHE INTERNAL "")
Expand Down

0 comments on commit 8e168c8

Please sign in to comment.