Den mån 12 aug. 2024 kl 16:30 skrev Timofei Zhakov <t...@chemodax.net>:

> I agree the version should not be listed when we don't have this
> dependency. Based on Daniel's suggestions, I think that the behaviour
> of the version in the configuration summary should be as explained
> below:
>
> 1. If the ra-serf is enabled:
>
> [[[
> --     Enable RA SERF ................ : ON
> --   Dependecies:
> --     SERF .......................... : 1.3.10
> ]]]
>
> 2. If it is disabled:
>
> [[[
> --     Enable RA SERF ................ : OFF ### it could be 'False' as
> well
> --   Dependecies:
> --     SERF .......................... : NONE
> ]]]
>
> 3. Finally, if the version was not found we will have that empty
> string again. Is it actually okay? See the example below:
>
> [[[
> --     Enable RA SERF ................ : ON
> --   Dependecies:
> --     SERF .......................... :       ### The module somehow
> could not recognise the version, so we have an empty string
> ]]]
>
> Basically the suggested code looks nice, but I would like to add an
> 'else' block to message 'NONE' instead of an empty version if ra-serf
> is disabled.
>
> [[[
> if(SVN_ENABLE_RA_SERF)
>   message(STATUS "    SERF .......................... : ${Serf_VERSION}")
> else()
>   message(STATUS "    SERF .......................... : NONE")
> endif()
> ]]]
>

In that case, I'd suggest to set the Serf_VERSION as we are finding Serf. I
don't know if we are looking at Serf_VERSION anywhere else (when
SVN_ENABLE_RA_SERF is OFF).

[[[
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt      (revision 1919834)
+++ CMakeLists.txt      (working copy)
@@ -240,6 +240,8 @@
 if (SVN_ENABLE_RA_SERF)
   find_package(Serf REQUIRED)
   add_library(external-serf ALIAS Serf::Serf)
+else()
+  set(Serf_VERSION "NONE")
 endif()

 ### Python
]]]

I still think I prefer to not report SERF at all under dependencies, to
make the list a bit shorter by not reporting all the dependencies that we
don't depend on.


> Additionally, the versions of Gettext, Intl, Python, Perl, Ruby (not
> yet implemented but will be soon) currently are not listed there, but
> should be. Most of these dependencies could be disabled via options as
> well.
>

I'll look at these shortly!

Kind regards,
Daniel

Reply via email to