Bug 248190 - CMake 3.25.0: ninja: error: dependency cycle: Source/WebCore/CMakeFiles/WebCore.dir/CXX.dd
Summary: CMake 3.25.0: ninja: error: dependency cycle: Source/WebCore/CMakeFiles/WebCo...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CMake (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-21 13:03 PST by Fujii Hironori
Modified: 2022-11-21 21:40 PST (History)
7 users (show)

See Also:


Attachments
Patch to use target_precompile_headers (13.09 KB, patch)
2022-11-21 17:28 PST, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (1.39 KB, patch)
2022-11-21 19:31 PST, Fujii Hironori
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Fujii Hironori 2022-11-21 13:03:39 PST
[WinCairo] CMake 3.25.0: ninja: error: dependency cycle: Source/WebCore/CMakeFiles/WebCore.dir/CXX.dd

> ninja: error: dependency cycle: Source/WebCore/CMakeFiles/WebCore.dir/CXX.dd -> Source/WebCore/CMakeFiles/WebCore.dir/platform/graphics/FormatConverter.cpp.obj.ddi -> Source/WebCore/WebCore_SOURCES/WebCorePrefix.pch ->
> Source/WebCore/CMakeFiles/WebCore.dir/WebCorePrefix.cpp.obj -> Source/WebCore/CMakeFiles/WebCore.dir/CXX.dd
Comment 1 Fujii Hironori 2022-11-21 13:34:36 PST
I'm observing no problem for building with Visual Studio generator.
build-webkit --wincairo --debug --no-ninja
Comment 2 Fujii Hironori 2022-11-21 17:28:51 PST
Created attachment 463645 [details]
Patch to use target_precompile_headers

I tried to use target_precompile_headers, but it failed.

> ninja: error: dependency cycle: Source/WebCore/CMakeFiles/WebCore.dir/cmake_pch.cxx.obj -> Source/WebCore/CMakeFiles/WebCore.dir/CXX.dd -> Source/WebCore/CMakeFiles/WebCore.dir/platform/graphics/FormatConverter.cpp.obj.ddi ->
> Source/WebCore/CMakeFiles/WebCore.dir/cmake_pch.cxx.pch -> Source/WebCore/CMakeFiles/WebCore.dir/cmake_pch.cxx.obj
Comment 3 Fujii Hironori 2022-11-21 18:37:45 PST
I overlooked a CMake warning:

> CMake Warning (dev):
>   C++20 modules support via CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP is
>   experimental.  It is meant only for compiler developers to try.
> This warning is for project developers.  Use -Wno-dev to suppress it.

we should disable it
> set(CMAKE_EXPERIMENTAL_CXX_MODULE_DYNDEP 0)
Comment 4 Fujii Hironori 2022-11-21 19:31:55 PST
Created attachment 463650 [details]
Patch
Comment 5 Ross Kirsling 2022-11-21 20:18:47 PST
Comment on attachment 463650 [details]
Patch

r=me, seems fine based on the quote you gave.
Comment 6 EWS 2022-11-21 21:40:25 PST
Committed 256922@main (8b54e8f36f5f): <https://commits.webkit.org/256922@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 463650 [details].