Bug 174546 - [CMake] Include most CMake modules from WebKitCommon.cmake
Summary: [CMake] Include most CMake modules from WebKitCommon.cmake
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: Other
Hardware: PC Linux
: P2 Normal
Assignee: Michael Catanzaro
Depends on:
Reported: 2017-07-15 11:09 PDT by Michael Catanzaro
Modified: 2017-07-17 15:50 PDT (History)
5 users (show)

See Also:

Patch (7.03 KB, patch)
2017-07-17 12:10 PDT, Michael Catanzaro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Catanzaro 2017-07-15 11:09:09 PDT
When creating WebCoreMacros.cmake, I forgot to move some includes from WebKitMacros.cmake:

Comment 1 Konstantin Tokarev 2017-07-15 14:30:34 PDT
"include" command of cmake (just like #include in C preprocessor) has no protection against multiple inclusion of the same file ("module"). Some built-in modules implement ad-hoc protection, but not all of them.

It can be a better idea to include built-in cmake modules in shared cmake files instead of moving them down to "subprojects", and maybe even move them all to the root CMakeLists.txt or to new file like Source/cmake/Includes.cmake
Comment 2 Michael Catanzaro 2017-07-15 20:43:21 PDT
I hate CMake....
Comment 3 Konstantin Tokarev 2017-07-16 02:09:40 PDT
Another way is to introduce wrapper for include() that will implement protection, so that it can be used everywhere without limits
Comment 4 Michael Catanzaro 2017-07-17 12:10:39 PDT
Created attachment 315689 [details]
Comment 5 WebKit Commit Bot 2017-07-17 15:50:43 PDT
Comment on attachment 315689 [details]

Clearing flags on attachment: 315689

Committed r219580: <http://trac.webkit.org/changeset/219580>
Comment 6 WebKit Commit Bot 2017-07-17 15:50:45 PDT
All reviewed patches have been landed.  Closing bug.