ArthurSonzogni / nlohmann_json_cmake_fetchcontent

A lightweight Release-tracking repository for nlohmann/json. Suitable for CMake fetchcontent. Automatically upgraded every weeks.
MIT License
79 stars 25 forks source link

Update script for >=v3.10.5 #8

Closed ArthurSonzogni closed 2 years ago

ArthurSonzogni commented 2 years ago

Starting from v3.10.5, the update script will directly take the CMakeLists and a few other files directly from the upstream repository.

NicolasIRAGNE commented 2 years ago

I think this is the best thing to do. However, this approach can be confusing for users because it will add some unsupported options to the CMake cache, such as JSON_CI or JSON_BuildTests (this is especially confusing because these options are visible with cache editors like ccache and cmake-gui). I am not sure on what to do here, but I proposed a PR that would prevent the use of these 2 options with minimal changes. See #9. What do you think? This is not ideal because it only works in case of options that call add_subdirectory or include but I'm not sure how it should be done otherwise.

ArthurSonzogni commented 2 years ago

This sounds like a good idea! I merged yours into this patch. Instead of creating two files, they are created from the script.