[CMake] RPM packaging dependencies expressed in subdirectories

Thibault Hild thibault.hild at gmail.com
Thu Jul 17 10:14:10 EDT 2014


Thank you again Nils for the guidelines, now its time to experiment :).

Thibault


On Wed, Jul 16, 2014 at 5:40 PM, Nils Gladitz <nilsgladitz at gmail.com> wrote:

> On 16.07.2014 16:37, Thibault Hild wrote:
>
>> Thanks Nils for the hint.
>>
>> I guess you had to use Cmake constructs like:
>> if("new dep" MATCHES "a regex built with ${pack_deps}")
>> in order to decide whether a new dependency is allowed.
>>
>> As I am quite new to CMake functions, can you detail a bit how do you
>> operate such validation ?
>>
>
> I got the current list of dependencies with get_property().
> Then I looped over the list with foreach().
> Every list item I split into name and version (with regex) and then
> compared it to the new dependency.
> I used message(FATAL_ERROR) to issue a (fatal) diagnostic if a different
> version of a dependency has already been requested.
>
>
>  Is there some sort of function repository to share these custom CMake
>> function tools ?
>>
>
> I am not aware of any except for cmake's own module repository[1] ...
> which might not be the right place for this though.
> Perhaps the Wiki.
>
> Nils
>
> [1] http://www.cmake.org/cmake/help/v3.0/manual/cmake-modules.7.html
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140717/c8cce19b/attachment.html>


More information about the CMake mailing list