[CMake] Writing a custom Find*.cmake file for Pantheios

Rolf Eike Beer eike at sf-mail.de
Sat Jul 28 03:45:39 EDT 2012


Philipp Berger wrote:
> Am 27.07.2012 19:26, schrieb Rolf Eike Beer:
> > Philipp Berger wrote:
> >> I tried to incorporate all hints.
> >> This is my new and better version of FindPantheios.cmake.
> >> Once again, please *review it* and give comments :)
> >> 
> >> See attached file.
> >> 
> >> A few Debug message() calls are still included, just ignore them for now.
> > 
> > The module is, ehm, lengthy. Like your mail ;)
> > 
> > -the debug/optimized stuff can be handled through
> > SelectLibraryConfiguration.cmake
> 
> Thanks for the tip, as I am new to this, I do not know about all those
> helpful macros.
> But in this case I am not sure what advantage this one would give me.
> How am I supposed to use it? One call per component or one for the whole?
> In the current scenario, I require all debug _and_ release versions to
> be available, so choosing between those is unnecessary.

If I build using Makefiles and have set CMAKE_BUILD_TYPE to Release, why 
should I care for debug libraries? This macro is there to handle the case 
where only one is found (i.e. just use the other one in both cases then) as 
well as the case that the generator does not support multiple configurations 
and none is selected (only use release then).

> Additionally, from what it looks like the macro only writes "optimized"
> and "debug" *ONCE*, not once for each file in _LIBRARIES. As you pointed
> out earlier, that does not (should not) work.

You are right and that looks like a bug to me.

Eike
-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120728/dca5f70f/attachment.pgp>


More information about the CMake mailing list