Skip to content

Commit

Permalink
Remove unneeded whitespace from json
Browse files Browse the repository at this point in the history
  • Loading branch information
robertmaynard committed Feb 26, 2024
1 parent 5ce2caf commit 9101346
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions rapids-cmake/cpm/detail/pinning_write_file.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ function(rapids_cpm_pinning_add_json_entry json_var package_name is_last_package
set(url_string)
set(sha_string)
if(${url_var})
string(CONFIGURE [=["git_url" : "${${url_var}}",]=] url_string)
string(CONFIGURE [=["git_url": "${${url_var}}",]=] url_string)
endif()
if(${sha_var})
string(CONFIGURE [=["git_tag" : "${${sha_var}}",]=] sha_string)
string(CONFIGURE [=["git_tag": "${${sha_var}}",]=] sha_string)
endif()
# We start with a default template, and only add members that don't exist
string(CONFIGURE [=[{
Expand Down Expand Up @@ -122,12 +122,12 @@ function(rapids_cpm_pinning_add_json_entry json_var package_name is_last_package
set(value "\"${value}\"")
endif()
string(CONFIGURE [=[
"${key}" : ${value},
"trailing_place_holder" : "true"
"${key}": ${value},
"trailing_place_holder": "true"
]=]
replacement_string)

string(REPLACE [=[ "trailing_place_holder" : "true"]=] "${replacement_string}" json_blob
string(REPLACE [=[ "trailing_place_holder": "true"]=] "${replacement_string}" json_blob
"${${json_blob_var}}")
set(${json_blob_var} "${json_blob}" PARENT_SCOPE)
endfunction()
Expand All @@ -149,7 +149,7 @@ function(rapids_cpm_pinning_add_json_entry json_var package_name is_last_package
endif()
endforeach()
endforeach()
set(${json_var} "\"${package_name}\" : ${pinned_json_entry}" PARENT_SCOPE)
set(${json_var} "\"${package_name}\": ${pinned_json_entry}" PARENT_SCOPE)
endfunction()

#[=======================================================================[.rst:
Expand Down Expand Up @@ -228,7 +228,7 @@ function(rapids_cpm_pinning_write_file)
set(_rapids_json
[=[
{
"packages" : {
"packages": {
]=])

list(POP_BACK CPM_PACKAGES last_package)
Expand Down
10 changes: 5 additions & 5 deletions rapids-cmake/cpm/generate_pinned_versions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ The generated json file will have the following entries for each package:
.. code-block:: json
{
"version" : "<CPM_PACKAGE_<package_name>_VERSION>",
"git_url" : "<deduced>",
"git_tag" : "<deduced>",
"git_shallow" : "false",
"always_download" : "true"
"version": "<CPM_PACKAGE_<package_name>_VERSION>",
"git_url": "<deduced>",
"git_tag": "<deduced>",
"git_shallow": "false",
"always_download": "true"
}
Expand Down

0 comments on commit 9101346

Please sign in to comment.