summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/FileAPI/RunCMakeTest.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-08-18 16:29:51 (GMT)
committerBrad King <brad.king@kitware.com>2022-08-18 19:49:07 (GMT)
commit68d3ca70088a744d00affa135e6d02872ef88ddc (patch)
tree6293c7b62db6890933cdafa735c1a1ff4c944c0e /Tests/RunCMake/FileAPI/RunCMakeTest.cmake
parent36d35d4eb1a0cbbcf4687e021ad236cbe186a2f3 (diff)
downloadCMake-68d3ca70088a744d00affa135e6d02872ef88ddc.zip
CMake-68d3ca70088a744d00affa135e6d02872ef88ddc.tar.gz
CMake-68d3ca70088a744d00affa135e6d02872ef88ddc.tar.bz2
Tests: Fix RunCMake.FileAPI test with jsoncpp < 1.7.5
Prior to jsoncpp commit `126bdc2b05` (Reject extra chars if strictRoot, 2016-08-21, 1.7.5~2), it did not diagnose trailing characters in the input after a JSON value. Teach our corresponding test case to tolerate the old behavior.
Diffstat (limited to 'Tests/RunCMake/FileAPI/RunCMakeTest.cmake')
-rw-r--r--Tests/RunCMake/FileAPI/RunCMakeTest.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/Tests/RunCMake/FileAPI/RunCMakeTest.cmake b/Tests/RunCMake/FileAPI/RunCMakeTest.cmake
index 61dce17..961b73a 100644
--- a/Tests/RunCMake/FileAPI/RunCMakeTest.cmake
+++ b/Tests/RunCMake/FileAPI/RunCMakeTest.cmake
@@ -39,6 +39,10 @@ if(RunCMake_GENERATOR_IS_MULTI_CONFIG)
set(RunCMake_TEST_OPTIONS "-DCMAKE_CONFIGURATION_TYPES=Debug\\;Release\\;MinSizeRel\\;RelWithDebInfo")
endif()
+if(JsonCpp_VERSION_STRING AND JsonCpp_VERSION_STRING VERSION_LESS 1.7.5)
+ set(ENV{CMake_JSONCPP_PRE_1_7_5} 1)
+endif()
+
run_cmake(Nothing)
run_cmake(Empty)
run_cmake(EmptyClient)