| Summary: | [CMake] Should be possible for an option to depend on multiple options | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Michael Catanzaro <mcatanzaro> |
| Component: | Tools / Tests | Assignee: | Michael Catanzaro <mcatanzaro> |
| Status: | RESOLVED FIXED | ||
| Severity: | Enhancement | CC: | cgarcia, mcatanzaro, mrobinson, ossy |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Bug Depends on: | 143831 | ||
| Bug Blocks: | 143956 | ||
| Attachments: | |||
|
Description
Michael Catanzaro
2015-04-16 12:27:40 PDT
Created attachment 250939 [details]
Patch
Created attachment 251177 [details]
[CMake] Should be possible for an option to depend on multiple options
Created attachment 251318 [details]
Patch
Comment on attachment 251318 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=251318&action=review Looks good to me. Small suggestion for a cleanup: > Source/cmake/WebKitFeatures.cmake:185 > +macro(_WEBKIT_OPTION_ENFORCE_DEPENDS) > + set(_OPTION_CHANGED TRUE) > + while (${_OPTION_CHANGED}) > + set(_OPTION_CHANGED FALSE) > + foreach (_name ${_WEBKIT_AVAILABLE_OPTIONS}) > + if (${_name}) > + foreach (_dependency ${_WEBKIT_AVAILABLE_OPTIONS_${_name}_DEPENDENCIES}) > + if (NOT ${_dependency}) > + message(STATUS "Disabling ${_name} since ${_dependency} is disabled.") > + set(${_name} OFF) > + set(_OPTION_CHANGED TRUE) > + break () > + endif () > + endforeach () > + endif () > + endforeach () > + endwhile () > +endmacro() You could eliminate the outer loop by running this macro for every option and passing the option name as an argument. I think that would simplify things quite a bit. > Source/cmake/WebKitFeatures.cmake:190 > list(SORT _WEBKIT_AVAILABLE_OPTIONS) > + > set(_MAX_FEATURE_LENGTH 0) This newline looks unrelated. Created attachment 251440 [details]
[CMake] Should be possible for an option to conflict with other options
Created attachment 251442 [details]
[CMake] Should be possible for an option to depend on multiple options
Comment on attachment 251442 [details] [CMake] Should be possible for an option to depend on multiple options Clearing flags on attachment: 251442 Committed r183202: <http://trac.webkit.org/changeset/183202> All reviewed patches have been landed. Closing bug. |