From b615508ff05eaf63aee16414a7c0300ebf1fd6b3 Mon Sep 17 00:00:00 2001 From: Harinath Nampally Date: Tue, 31 Dec 2024 20:23:18 -0500 Subject: [PATCH] add a ci step for Json_Diagnostic_Positions Signed-off-by: Harinath Nampally --- cmake/ci.cmake | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/cmake/ci.cmake b/cmake/ci.cmake index 67b2254e5e..907dfde4c3 100644 --- a/cmake/ci.cmake +++ b/cmake/ci.cmake @@ -551,6 +551,20 @@ add_custom_target(ci_test_diagnostics COMMENT "Compile and test with improved diagnostics enabled" ) +############################################################################### +# Enable improved diagnostics with positions. +############################################################################### + +add_custom_target(ci_test_diagnostics_positions + COMMAND ${CMAKE_COMMAND} + -DCMAKE_BUILD_TYPE=Debug -GNinja + -DJSON_BuildTests=ON -DJSON_Diagnostics=ON -DJSON_Diagnostic_Positions=ON + -S${PROJECT_SOURCE_DIR} -B${PROJECT_BINARY_DIR}/build_diagnostics_positions + COMMAND ${CMAKE_COMMAND} --build ${PROJECT_BINARY_DIR}/build_diagnostics_positions + COMMAND cd ${PROJECT_BINARY_DIR}/build_diagnostics_positions && ${CMAKE_CTEST_COMMAND} --parallel ${N} --output-on-failure + COMMENT "Compile and test with improved diagnostics positions enabled" +) + ############################################################################### # Enable legacy discarded value comparison. ############################################################################### @@ -910,7 +924,7 @@ endfunction() ci_get_cmake(3.1.0 CMAKE_3_1_0_BINARY) ci_get_cmake(3.13.0 CMAKE_3_13_0_BINARY) -set(JSON_CMAKE_FLAGS_3_1_0 JSON_Diagnostics JSON_GlobalUDLs JSON_ImplicitConversions JSON_DisableEnumSerialization +set(JSON_CMAKE_FLAGS_3_1_0 JSON_Diagnostics JSON_Diagnostic_Positions JSON_GlobalUDLs JSON_ImplicitConversions JSON_DisableEnumSerialization JSON_LegacyDiscardedValueComparison JSON_Install JSON_MultipleHeaders JSON_SystemInclude JSON_Valgrind) set(JSON_CMAKE_FLAGS_3_13_0 JSON_BuildTests)