Including CTest in the top-level CMakeLists.txt sets BUILD_TESTING=ON for parent projects #2513
Closed
1 of 3 tasks
Labels
kind: bug
release item: 🔨 further change
solution: proposed fix
a fix for the issue has been proposed and waits for confirmation
Milestone
What is the issue you have?
BUILD_TESTING is unset in the main project.
nlohmann_json is included in a main project using FetchContent.
JSON_BuildTests=OFF is set in the main project.
nlohmann_json's top-level CMakeLists.txt includes CTest regardless.
BUILD_TESTING=ON is now set in the main project.
Please describe the steps to reproduce the issue.
What is the expected behavior?
CTest should only be included if nlohmann_json is the main project.
And what is the actual behavior instead?
CTest is included although nlohmann_json is added as subproject.
Which version of the library did you use?
develop
branchThe text was updated successfully, but these errors were encountered: