File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -18,4 +18,9 @@ if (TARGET shady_fe_llvm)
1818 add_executable (vcc vcc.c)
1919 target_link_libraries (vcc PRIVATE driver api common)
2020 install (TARGETS vcc EXPORT shady_export_set)
21+
22+ add_custom_command (TARGET vcc POST_BUILD
23+ COMMAND ${CMAKE_COMMAND} -E copy -t $<TARGET_FILE_DIR:vcc> $<TARGET_RUNTIME_DLLS:vcc>
24+ COMMAND_EXPAND_LISTS
25+ )
2126endif ()
Original file line number Diff line number Diff line change @@ -16,4 +16,11 @@ function(add_generated_file)
1616 set (F_TARGET_NAME generate_${F_FILE_NAME} )
1717 endif ()
1818 add_custom_target (${F_TARGET_NAME} DEPENDS ${CMAKE_CURRENT_BINARY_DIR} /${F_FILE_NAME} )
19+
20+ # This hacky job is required for being able to run built targets in-place when generating the code
21+ # This is also required for the various drivers but since they're built in the same directory it will work for now
22+ add_custom_command (TARGET ${GENERATOR_NAME} POST_BUILD
23+ COMMAND ${CMAKE_COMMAND} -E copy -t $<TARGET_FILE_DIR:${GENERATOR_NAME} > $<TARGET_RUNTIME_DLLS:${GENERATOR_NAME} >
24+ COMMAND_EXPAND_LISTS
25+ )
1926endfunction ()
You can’t perform that action at this time.
0 commit comments