Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add a ci step for Json_Diagnostic_Positions #4579

Merged
merged 6 commits into from
Jan 3, 2025
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion cmake/ci.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,20 @@ add_custom_target(ci_test_diagnostics
COMMENT "Compile and test with improved diagnostics enabled"
)

###############################################################################
# Enable diagnostic positions support.
###############################################################################

add_custom_target(ci_test_diagnostic_positions
nlohmann marked this conversation as resolved.
Show resolved Hide resolved
COMMAND ${CMAKE_COMMAND}
-DCMAKE_BUILD_TYPE=Debug -GNinja
-DJSON_BuildTests=ON -DJSON_Diagnostics=ON -DJSON_Diagnostic_Positions=ON
nlohmann marked this conversation as resolved.
Show resolved Hide resolved
-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
nlohmann marked this conversation as resolved.
Show resolved Hide resolved
COMMENT "Compile and test with diagnostic positions enabled"
)

###############################################################################
# Enable legacy discarded value comparison.
###############################################################################
Expand Down Expand Up @@ -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)

Expand Down
Loading