1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:07:45 +00:00

StateMachineGenerator: Pass output file as an argument

This allows us to avoid shell redirection to create output files, and
will help with the GN build.
This commit is contained in:
Andrew Kaster 2023-07-26 07:13:07 -06:00 committed by Andrew Kaster
parent f87a488b22
commit f8e1544f41
2 changed files with 11 additions and 5 deletions

View file

@ -69,7 +69,7 @@ function(generate_state_machine source header)
set(output ${CMAKE_CURRENT_BINARY_DIR}/${header})
add_custom_command(
OUTPUT ${output}
COMMAND $<TARGET_FILE:Lagom::StateMachineGenerator> ${source} > ${output}.tmp
COMMAND $<TARGET_FILE:Lagom::StateMachineGenerator> ${source} -o ${output}.tmp
COMMAND "${CMAKE_COMMAND}" -E copy_if_different ${output}.tmp ${output}
COMMAND "${CMAKE_COMMAND}" -E remove ${output}.tmp
VERBATIM