[cmake-developers] fphsa capitalization
Mathieu Malaterre
mathieu.malaterre at gmail.com
Tue Aug 10 16:05:12 EDT 2010
On Tue, Aug 10, 2010 at 8:42 PM, Brad King <brad.king at kitware.com> wrote:
> On 08/07/2010 05:25 PM, Alexander Neundorf wrote:
>> diff --git a/Modules/FindSubversion.cmake b/Modules/FindSubversion.cmake
>> index 58a179d..30220d1 100644
>> --- a/Modules/FindSubversion.cmake
>> +++ b/Modules/FindSubversion.cmake
>> @@ -2,7 +2,12 @@
>> # The module defines the following variables:
>> # Subversion_SVN_EXECUTABLE - path to svn command line client
>> # Subversion_VERSION_SVN - version of svn command line client
>> -# Subversion_FOUND - true if the command line client was found
>> +# SUBVERSION_FOUND - true if the command line client was found
>> +# Subversion_FOUND - same as SUBVERSION_FOUND, kept around for compatibility
>
> IMO the preferred capitalization is "Subversion_FOUND".
> All the other variables use that. IIRC your standard
> macro set the value with upper-case because that was
> what many packages did at the time. I think we should
> start setting both in the macro and then document the
> natural case instead.
>
> If I write
>
> find_package(Subversion)
>
> I would expect to write
>
> if(Subversion_FOUND)
> ... ${Subversion_SVN_EXECUTABLE} ...
> endif()
>
> and not the inconsistent
>
> if(SUBVERSION_FOUND)
> ... ${Subversion_SVN_EXECUTABLE} ...
> endif()
>
> Thoughts?
+1
This has always bitten me in the past. For instance:
find_package(LibXml2)
message(${(LIBXML2_LIBRARIES})
I would really like to see an automated test which check this in the
cmake modules.
On a related note, could we use strcasecmp for :
cmake --help-module FindLibXml2
I could never get the case right...
Thanks,
--
Mathieu
More information about the cmake-developers
mailing list