kou opened a new pull request, #14224: URL: https://github.com/apache/arrow/pull/14224
This approach adds "depends" information to each (bool) build options and use it to resolve transitive build option dependencies automatically. This approach implements topological sort in CMake to resolve transitive dependencies. Another approach proposed in the associated Jira issue: It creates a Python script that generates a CMake code (.cmake file) that handles transitive dependencies. Dependencies information are written in the Python script. I think that this approach is better than the another approach because: * We can put option definitions and their dependencies into the same place. (We don't need to put them into .cmake and .py.) * We don't need to regenerate a .cmake file when we update option dependencies. * We can specify dependencies information with a simple way. (We can just add "DEPENDS ARROW_XXX ARROW_YYY ..." to an option defintion.) Here are downsides of this approach: * We need to maintain topological sort implementation in CMake. Because CMake doesn't provide a topological sort feature that is used in CMake internally. But topological sort algorithm is well-known (Tarjan's algorithm is published at 1976) and it's implementation in this approach has only 20+ CMake lines. I think that we can maintain it. * This can't support complex conditions such as "ARROW_X AND NOT ARROW_Y". But we don't have any complex condition for now. @wesm @lidavidm @pitrou What do you think about this approach? (TODO: Remove this line before we merge this.) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
