From 54d9cd5a1244312151d6f8953f67ef0aa4db4168 Mon Sep 17 00:00:00 2001 From: Niels Lohmann Date: Wed, 18 Aug 2021 13:24:12 +0200 Subject: [PATCH] :wrench: guard tests with JSON_Install flag --- test/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index d0ae29438..e2903b5ea 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -115,8 +115,12 @@ add_dependencies(json_unit download_test_data) # Test the generated build configs ############################################################################# -add_subdirectory(cmake_import) -add_subdirectory(cmake_import_minver) +# these tests depend on the generated file nlohmann_jsonConfig.cmake +if (JSON_Install) + add_subdirectory(cmake_import) + add_subdirectory(cmake_import_minver) +endif() + add_subdirectory(cmake_add_subdirectory) add_subdirectory(cmake_fetch_content) add_subdirectory(cmake_target_include_directories)