Skip to content

Commit

Permalink
Fix v8_torque_generated failing to build on Windows (#82)
Browse files Browse the repository at this point in the history
The torque-outputs and torque_outputs variables can have too many
characters on Windows to be executed on the command line, so we have to
write it to a temporary file and execute that.

Fixes: #42
Fixes: #67
  • Loading branch information
AnotherFoxGuy authored Mar 4, 2024
1 parent beb327f commit 11e1f93
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -999,14 +999,20 @@ target_include_directories(v8_torque_generated
${PROJECT_SOURCE_DIR}/v8
)

# The torque-outputs and torque_outputs variables can have too many characters
# on Windows to be executed on the command line, so we have to write it to a
# temporary file and execute that
file(WRITE "${PROJECT_BINARY_DIR}/touch_torque_outputs.cmake"
"file(TOUCH ${torque-outputs};${torque_outputs})")

add_custom_command(
COMMAND
torque
-o ${PROJECT_BINARY_DIR}/torque-generated
-v8-root ${PROJECT_SOURCE_DIR}/v8
${torque_files}
COMMAND
${CMAKE_COMMAND} -E touch ${torque-outputs} ${torque_outputs}
${CMAKE_COMMAND} -P ${PROJECT_BINARY_DIR}/touch_torque_outputs.cmake
DEPENDS
torque
${torque_dirs}
Expand Down

0 comments on commit 11e1f93

Please sign in to comment.