<div dir="ltr"><div>Thank you again Nils for the guidelines, now its time to experiment :).<br><br></div>Thibault<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jul 16, 2014 at 5:40 PM, Nils Gladitz <span dir="ltr"><<a href="mailto:nilsgladitz@gmail.com" target="_blank">nilsgladitz@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 16.07.2014 16:37, Thibault Hild wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks Nils for the hint.<br>
<br>
I guess you had to use Cmake constructs like:<br>
if("new dep" MATCHES "a regex built with ${pack_deps}")<br>
in order to decide whether a new dependency is allowed.<br>
<br>
As I am quite new to CMake functions, can you detail a bit how do you operate such validation ?<br>
</blockquote>
<br></div>
I got the current list of dependencies with get_property().<br>
Then I looped over the list with foreach().<br>
Every list item I split into name and version (with regex) and then compared it to the new dependency.<br>
I used message(FATAL_ERROR) to issue a (fatal) diagnostic if a different version of a dependency has already been requested.<div class=""><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Is there some sort of function repository to share these custom CMake function tools ?<br>
</blockquote>
<br></div>
I am not aware of any except for cmake's own module repository[1] ... which might not be the right place for this though.<br>
Perhaps the Wiki.<br>
<br>
Nils<br>
<br>
[1] <a href="http://www.cmake.org/cmake/help/v3.0/manual/cmake-modules.7.html" target="_blank">http://www.cmake.org/cmake/<u></u>help/v3.0/manual/cmake-<u></u>modules.7.html</a><br>
</blockquote></div><br></div>