Re: svn commit: r1919150 - in /subversion/branches/cmake: CMakeLists.txt build/cmake/FindSerf.cmake build/generator/gen_cmake.py

Daniel Sahlberg <[email protected]>
Newsgroups gmane.comp.version-control.subversion.svn
Message-ID <pony-480675c4-ccd3-4c51-8f0e-4e9e8a7f3172-commits@subversion.apache.org>
On 2024/07/11 15:38:21 [email protected] wrote:
> Author: rinrab
> Date: Thu Jul 11 15:38:21 2024
> New Revision: 1919150
> 
> URL: http://svn.apache.org/viewvc?rev=1919150&view=rev
> Log:
> On the 'cmake' branch: Support RA-Serf and add Serf dependency.

[...]

> +### Serf
> +if (SVN_BUILD_RA_SERF)
> +  find_package(Serf REQUIRED)
> +  add_library(external-serf ALIAS Serf::Serf)
> +endif()
> +

[...]

> +message(STATUS "    Build RA SERF ................. : ${SVN_BUILD_RA_SERF}")

[...]

> +message(STATUS "    SERF .......................... : ${Serf_VERSION}")

How about enclosing the last message (${Serf_VERSION}) inside an if (SVN_ENABLE_RA_SERF), like this:
[[[
if (SVN_ENABLE_RA_SERF)
  message(STATUS "    SERF .......................... : ${Serf_VERSION}")
endif()
]]]

Currently the configuration summary output is
[[[
--     Enable RA SERF ................ : OFF
--   Dependecies:
--     SERF .......................... : 
]]]

With the above change it will only be:
[[[
--     Enable RA SERF ................ : OFF
--   Dependecies:
]]]

With SVN_ENABLE_RA_SERF the output is (in any case):
[[[
--     Enable RA SERF ................ : ON
--   Dependecies:
--     SERF .......................... : 1.3.10
]]]

I don't see a reason for listing Serf (with an empty version string) under Dependencies if it is not used.

Another option would be to set the Serf_VERSION string to something reasonable if SVN_ENABLE_RA_SERF is OFF, output could be something like below, but think it is less clear.
[[[
--     Enable RA SERF ................ : OFF
--   Dependecies:
--     SERF .......................... : None
]]]

Kind regards,
Daniel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.