| Summary: | [CMake] Use target_precompile_headers for Windows | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Fujii Hironori <Hironori.Fujii> | ||||||||
| Component: | CMake | Assignee: | Fujii Hironori <Hironori.Fujii> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | aperez, don.olmstead, ross.kirsling | ||||||||
| Priority: | P2 | ||||||||||
| Version: | WebKit Nightly Build | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=139438 | ||||||||||
| Bug Depends on: | 248246 | ||||||||||
| Bug Blocks: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Fujii Hironori
2022-11-21 20:28:15 PST
Created attachment 463654 [details]
Patch
Created attachment 463655 [details]
Patch
Comment on attachment 463655 [details]
Patch
r=me but I think you should think about adding a check for the CMake version since 3.16 isn't the minimum its 3.12.
Comment on attachment 463655 [details]
Patch
Actually after thinking about this some more how about we use a variable USE_PRECOMPILED_HEADERS and set it as ON for MSVC and then use that for the check. That way Igalia can experiment with precompiled headers usage with an updated CMake and then its easy for them to turn it on.
Also lets just get rid of the WEBKIT_ADD_PRECOMPILED_HEADER macro and just call target_precompile_headers directly.
Comment on attachment 463655 [details] Patch OK. I will remove WEBKIT_ADD_PRECOMPILED_HEADER macro. And, I will set CMAKE_DISABLE_PRECOMPILE_HEADERS ON unless MSVC. https://cmake.org/cmake/help/latest/variable/CMAKE_DISABLE_PRECOMPILE_HEADERS.html No, I can't do that. CMAKE_DISABLE_PRECOMPILE_HEADERS is available since v3.16. I think we should have WEBKIT_ADD_PRECOMPILED_HEADER macro until the minimum version will bump to v3.16. 257053@main (bug#248289) bumpded cmake_minimum_required. I'm going to try CMAKE_DISABLE_PRECOMPILE_HEADERS. Created attachment 463747 [details]
Patch
Committed 257057@main (48aaac1d1115): <https://commits.webkit.org/257057@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 463747 [details]. |