Enable CMake policy CMP0077
Projects that import json via [FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html) or `add_subdirectory` pointed at a git submodule may want to set `JSON_BuildTests` to "NO". However, this doesn't work without creating an identical `option()` in the importing project. Enabling CMP0077 in supported versions of CMake changes the behavior of `option()` to allow importing projects to set default values for the variables without touching the cache. See the documentation for CMP0077 here: https://cmake.org/cmake/help/latest/policy/CMP0077.html
Showing
Please register or sign in to comment