README-CMake.txt 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. The Utilities/cmjsoncpp directory contains a reduced distribution
  2. of the jsoncpp source tree with only the library source code and
  3. CMake build system. It is not a submodule; the actual content is part
  4. of our source tree and changes can be made and committed directly.
  5. We update from upstream using Git's "subtree" merge strategy. A
  6. special branch contains commits of upstream jsoncpp snapshots and
  7. nothing else. No Git ref points explicitly to the head of this
  8. branch, but it is merged into our history.
  9. Update jsoncpp from upstream as follows. Create a local branch to
  10. explicitly reference the upstream snapshot branch head:
  11. git branch jsoncpp-upstream 53f6ccb0
  12. Use a temporary directory to checkout the branch:
  13. mkdir jsoncpp-tmp
  14. cd jsoncpp-tmp
  15. git init
  16. git pull .. jsoncpp-upstream
  17. rm -rf *
  18. Now place the (reduced) jsoncpp content in this directory. See
  19. instructions shown by
  20. git log 53f6ccb0
  21. for help extracting the content from the upstream svn repo. Then run
  22. the following commands to commit the new version. Substitute the
  23. appropriate date and version number:
  24. git add --all
  25. GIT_AUTHOR_NAME='JsonCpp Upstream' \
  26. GIT_AUTHOR_EMAIL='kwrobot@kitware.com' \
  27. GIT_AUTHOR_DATE='Thu Nov 20 08:45:58 2014 -0600' \
  28. git commit -m 'JsonCpp 1.0.0 (reduced)' &&
  29. git commit --amend
  30. Edit the commit message to describe the procedure used to obtain the
  31. content. Then push the changes back up to the main local repository:
  32. git push .. HEAD:jsoncpp-upstream
  33. cd ..
  34. rm -rf jsoncpp-tmp
  35. Create a topic in the main repository on which to perform the update:
  36. git checkout -b update-jsoncpp master
  37. Merge the jsoncpp-upstream branch as a subtree:
  38. git merge -s recursive -X subtree=Utilities/cmjsoncpp \
  39. jsoncpp-upstream
  40. If there are conflicts, resolve them and commit. Build and test the
  41. tree. Commit any additional changes needed to succeed.
  42. Finally, run
  43. git rev-parse --short=8 jsoncpp-upstream
  44. to get the commit from which the jsoncpp-upstream branch must be started
  45. on the next update. Edit the "git branch jsoncpp-upstream" line above to
  46. record it, and commit this file.