[Webkit-unassigned] [Bug 182757] [CMake][Ninja] Fails to compile TestWebCore due to missing WebCore's derived headers

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 22 17:33:52 PST 2018


https://bugs.webkit.org/show_bug.cgi?id=182757

--- Comment #19 from Don Olmstead <don.olmstead at sony.com> ---
Comment on attachment 334487
  --> https://bugs.webkit.org/attachment.cgi?id=334487
WIP Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=334487&action=review

This adds the headers from the original WebCore patch as well to see if we get through the regression.

Still work in progress but feels like its getting closer to shippable.

Can you all take a look? I'm wondering if I can split up the WEBKIT_MAKE_FRAMEWORK_HEADERS to call a different function to avoid duplication.

> Source/cmake/WebKitMacros.cmake:297
> +    if (_derived_sources)
> +        if (ON)
> +            set(_build_file ${DERIVED_SOURCES_DIR}/${framework}/prelink.cmd)
> +            file(WRITE ${_build_file})
> +        else ()
> +            set(_build_file ${DERIVED_SOURCES_DIR}/${framework}/prelink.sh)
> +            file(WRITE ${_build_file} "set -ex")
> +        endif ()
> +
> +        foreach (_header IN LISTS _derived_sources)
> +            get_filename_component(_header_filename ${_header} NAME)
> +            set(_framework_header ${_private_destination}/${_header_filename})
> +        
> +            file(APPEND ${_build_file} "${CMAKE_COMMAND} -E copy_if_different ${_header} ${_framework_header}\n")
> +        endforeach ()
> +
> +        add_custom_command(TARGET ${framework} PRE_LINK
> +            COMMAND ${_build_file}
> +            DEPENDS ${_derived_sources}
> +            VERBATIM
> +        )
> +    endif ()

On Ninja the PRE_LINK command is too long to run. To work around this I'm making a file that is then invoked.

This was actually fixed recently in CMake https://gitlab.kitware.com/cmake/cmake/merge_requests/1604 but it'll be forever before everyone is on a latest release.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180223/5ff92d92/attachment.html>


More information about the webkit-unassigned mailing list