@@ -85,6 +85,23 @@ foreach(TOOL ${TOOL_FOLDERS})
85
85
set_source_files_properties (${test_path} PROPERTIES SYMBOLIC "true" )
86
86
list (APPEND test_set ${test_path} )
87
87
88
+ # Make json for debugging.
89
+ toolinvoke(launch_json_args ${VERONA_LOCAL_DIST} ${test_file} ${output_dir} )
90
+ list (POP_FRONT launch_json_args launch_json_prog)
91
+ # Convert to a json format list.
92
+ string (REPLACE "\" " "\\\" " launch_json_args "${launch_json_args} " )
93
+ string (REPLACE ";" "\" , \" " launch_json_args "${launch_json_args} " )
94
+ list (APPEND LAUNCH_JSON
95
+ " {
96
+ \" name\" : \" ${test_path} \" ,
97
+ \" type\" : \" cppdbg\" ,
98
+ \" request\" : \" launch\" ,
99
+ \" program\" : \" ${launch_json_prog} \" ,
100
+ \" args\" : [\" ${launch_json_args} \" ],
101
+ \" stopAtEntry\" : false,
102
+ \" cwd\" : \" ${TOOL_FOLDER} /${test_dir} \" ,
103
+ }," )
104
+
88
105
# Add output comparison for each golden / output file
89
106
set (golden_dir ${CMAKE_CURRENT_SOURCE_DIR} /${test_path}${GOLDEN_DIR_SUFFIX} )
90
107
file (GLOB_RECURSE results CONFIGURE_DEPENDS RELATIVE ${golden_dir} ${golden_dir} /*)
@@ -147,4 +164,17 @@ foreach(TOOL ${TOOL_FOLDERS})
147
164
list (APPEND UPDATE_DUMPS_TARGETS "update-dump-${TOOL} " )
148
165
endforeach ()
149
166
167
+ string (REPLACE ";" "\n " LAUNCH_JSON "${LAUNCH_JSON} " )
168
+
169
+ if (VERONA_GENERATE_LAUNCH_JSON)
170
+ file (WRITE ${CMAKE_SOURCE_DIR} /.vscode/launch.json
171
+ "{
172
+ \" version\" : \" 0.2.0\" ,
173
+ \" configurations\" : [
174
+ ${LAUNCH_JSON}
175
+ ]
176
+ }" )
177
+ endif ()
178
+
179
+
150
180
add_custom_target (update-dump DEPENDS ${UPDATE_DUMPS_TARGETS} )
0 commit comments