<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Am 27.07.2012 19:26, schrieb Rolf Eike
Beer:<br>
</div>
<blockquote cite="mid:3078329.bOgZoECZcF@eto" type="cite">
<pre wrap="">Philipp Berger wrote:
</pre>
<blockquote type="cite">
<pre wrap="">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.
</pre>
</blockquote>
<pre wrap="">
The module is, ehm, lengthy. Like your mail ;)
-the debug/optimized stuff can be handled through
SelectLibraryConfiguration.cmake</pre>
</blockquote>
Thanks for the tip, as I am new to this, I do not know about all
those helpful macros.<br>
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? <br>
In the current scenario, I require all debug _and_ release versions
to be available, so choosing between those is unnecessary.<br>
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. <br>
<blockquote cite="mid:3078329.bOgZoECZcF@eto" type="cite">
<pre wrap="">
-I see much stuff that looks very much the same, e.g. the loop on line 572 and
the one on 596. Maybe you can wrap parts of that in a macro.</pre>
</blockquote>
<blockquote cite="mid:3078329.bOgZoECZcF@eto" type="cite">
<pre wrap="">
Hint: this works:
set(lr BACKEND_R)
find_library(PATHEIOS_${t}_$PANTHEIOS_${lr}}_...)</pre>
</blockquote>
I know, I know. I needed a lot of playing around and experimentation
with the (weird) CMake Syntax. Also I wanted a fully functional
result as soon as possible, not some easy to maintain masterpiece ;)
But of course I will try to refactor it.<br>
<blockquote cite="mid:3078329.bOgZoECZcF@eto" type="cite">
<pre wrap="">
-say I have a gcc47, but your module will not work with it. I wonder why not
just set(_P_COMP_TAG gcc${GCC_MAJOR}${GCC_MINOR}) and just let the user live
with it when the libraries matching his compiler are not found.
Also I wonder if a gcc45 library can't be used together with e.g. gcc46? Those
gcc stuff is usually compatible, at least in one direction.</pre>
</blockquote>
Well... I just read through the original makefiles and "copied"
them. Your solution is much simpler and more flexible - bought.<br>
<blockquote cite="mid:3078329.bOgZoECZcF@eto" type="cite">
<pre wrap="">
-for the component selection you can probably save a lot of lines if you do
things like this:
elseif (component STREQUAL "Null" OR
                component STREQUAL "Speech" OR
                component STREQUAL "Syslog")
        message(STATUS "Pantheios: Setting BackEnd to ${component}")
        string(TOLOWER "${component}" PANTHEIOS_BACKEND)
Since you have many such cases that are similar to each other you can make
things much less lengthy. This is a programming language, you don't copy code,
you introduce functions and macros to deal with it ;)</pre>
</blockquote>
(See earlier comment, refactoring is due soon)<br>
<blockquote cite="mid:3078329.bOgZoECZcF@eto" type="cite">
<pre wrap="">
Eike
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">--
Powered by <a class="moz-txt-link-abbreviated" href="http://www.kitware.com">www.kitware.com</a>
Visit other Kitware open-source projects at <a class="moz-txt-link-freetext" href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a>
Please keep messages on-topic and check the CMake FAQ at: <a class="moz-txt-link-freetext" href="http://www.cmake.org/Wiki/CMake_FAQ">http://www.cmake.org/Wiki/CMake_FAQ</a>
Follow this link to subscribe/unsubscribe:
<a class="moz-txt-link-freetext" href="http://www.cmake.org/mailman/listinfo/cmake">http://www.cmake.org/mailman/listinfo/cmake</a></pre>
</blockquote>
<br>
</body>
</html>