Replies: 4 comments 2 replies
-
I agree. |
Beta Was this translation helpful? Give feedback.
-
I also agree. That would be a good improvement. |
Beta Was this translation helpful? Give feedback.
-
Thanks for confirming! Taking this discussion further there are also some modules that have optional dependencies which do not have a cmake option at all yet. I think it would make sense to introduce options for them (or just make some of them required?). I am not sure how granular it needs to be and how the options should be named/designed. Some suggestions:
|
Beta Was this translation helpful? Give feedback.
-
I do not want to establish a policy until we work through some specific cases to help guide the decision. It might not be a universal policy:
In summary, include the module name as part of the option name if it is really specific to the module. Otherwise, use the prefix |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Right now if you enable a certain module you can't be sure it is really enabled until you read the logs. This is because the module might be disabled later on if a dependency is missing.
Example:
-DMOD_FREI0R=ON
might still not enable the frei0r module ifpkg_check_modules(FREI0R frei0r)
does not findfrei0r
(On the contrary you can be sure that with
-DMOD_FREI0R=OFF
a module is really off)In my opinion this behavior is not good, because it makes it hard to reliably get builds with a certain feature set. I suggest to change this behavior to require the modules dependencies if a module is turned on. This way CMake will fail if the dependencies are missing and the users need to explicitly turn of the module if they don't want to use the module due to the missing dependency.
Using the frei0r module as an example again, the code change would look like this:
What do you think about this suggestion? If you think it makes sense I can go ahead and open a PR
Beta Was this translation helpful? Give feedback.
All reactions