[cmake-developers] [New Module] FindOpenCL, FindHg

Rolf Eike Beer eike at sf-mail.de
Sat Feb 22 15:59:53 EST 2014


Am Samstag, 8. Februar 2014, 14:28:37 schrieb Matthäus G. Chajdas:
> Hi,
> 
> I would like to propose two new modules for inclusion in CMake:
> FindOpenCL to find OpenCL and FindHg for Mercurial (see attached.)
> FindOpenCL is written in similar spirit to FindOpenGL, while FindHg is
> basically the equivalent of FindSubversion for Mercurial.

I reviewd those modules as new, but as I now see there already has been a 
FindHg.cmake. By changing the variable names youu will now break compatibility 
with older CMake releases.

Some of the changes are wrong, e.g. FindHg -> FindHG in the first line. One 
thing that I sadly have not seen before is that you have all calls to CMake 
commands in uppercase as the conventions is to have everything in lowercase 
There has been an automatic conversion a while ago and every new code must 
follow the convention from the beginning.

Looking on the rest of the changes you basically have only added the 
Hg_WC_INFO macro. That isn't change enough to drop my and Kitwares copyright 
(of course it is right to add your own).

Finally the inclusion of FPHSA should use CMAKE_CURRENT_LIST_DIR to make sure 
the version shipped with CMake is used and not one the user has in his 
project. I sadly have also overlooked this in both modules. When you have an 
external module this will of course not work, but all modules inside CMake use 
that.

So, I'm very sorry to come up with those things now and not having catched 
them earlier. If you now do

git diff master..next Modules/FindHg.cmake

you can see the differences. If you change the commands to lowercase and use 
the variable names that have been in use before the diff will be much smaller. 
The rest should be the Windows paths and the new macro.

Greetings,

Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20140222/d80ec028/attachment-0002.sig>


More information about the cmake-developers mailing list