On Wed, 29 Mar 2023 11:09:52 GMT, Lukasz Kostyra <lkost...@openjdk.org> wrote:

>> do you mean as 
>> if(copy_result)
>>             message(WARNING "Failed to copy ${_file} to 
>> ${JavaScriptCore_SCRIPTS_DIR}/${_script}: ${copy_output}")
>> should be as
>> 
>> if(copy_result)
>>             message(WARNING "${copy_result")
>
> Actually, you can disregard this comment - I thought that `cmake -E 
> copy_if_different ...` returns some meaningful error code (ex. one of errno 
> variables) but I double-checked and it seems it returns 0 if succeeded and 1 
> if failed. Won't bring us any good to print it out, so it can stay as it is.

ok, thanks

>> I intentionally left the previous code unchanged. 
>>     add_custom_command(
>>         OUTPUT ${JavaScriptCore_SCRIPTS_DIR}/${_script}
>>         MAIN_DEPENDENCY ${_file}
>>         WORKING_DIRECTORY ${JavaScriptCore_DERIVED_SOURCES_DIR}
>>         COMMAND ${CMAKE_COMMAND} -E copy_if_different ${_file} 
>> ${JavaScriptCore_SCRIPTS_DIR}/${_script}
>>         VERBATIM)
>> copy_if_different  will do nothing , if the changed code already did copy
>> 
>> incase of our changed code fail , the remaining add_custom_comand would 
>> prevent build issue.
>
> Understood, thanks for the explanation!

Thanks for review

-------------

PR Review Comment: https://git.openjdk.org/jfx/pull/1073#discussion_r1151771242
PR Review Comment: https://git.openjdk.org/jfx/pull/1073#discussion_r1151772181

Reply via email to