[CMake] LOCATION target property, generator expressions

Hendrik Greving hendrik.greving.smi at gmail.com
Wed Sep 26 10:23:50 EDT 2018


Is there any way before 3.13 to achieve what I need? Right now we modify
LINK_FLAGS based on something that is computed with values from LOCATION.
For CMP0026, I'd like to get rid of LOCATION. As pointed out earlier,
unclear how this would work e.g. by using file(GENERATE.. in this case.
Thanks in advance

On Tue, Sep 25, 2018, 10:45 PM Marc CHEVRIER <marc.chevrier at gmail.com>
wrote:

> LINK_FLAGS does not support expressions.
> However, property LINK_OPTIONS (and INTERFACE counterpart) support
> generator expressions. These properties are new for version 3.13 which will
> be available soon (probably next month).
> Le mer. 26 sept. 2018 à 05:21, Hendrik Greving <
> hendrik.greving.smi at gmail.com> a écrit :
>
>> Hello,
>>
>> our cmake setup is using LOCATION property for two targets to compute a
>> relative path from these two, and adds this to LINK_FLAGS (for rpath, but
>> irrelevant in this context). In order to update our cmake w.r.t. CMP0026, I
>> don't know how to get LINK_FLAGS consume a generator expression. In other
>> cases file(GENERATE.. writing a set(var TARGET_FILE..) into a file, and
>> reading the file to obtain 'var' worked. Thanks in advance!
>> --
>>
>> Powered by www.kitware.com
>>
>> Please keep messages on-topic and check the CMake FAQ at:
>> http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Kitware offers various services to support the CMake community. For more
>> information on each offering, please visit:
>>
>> CMake Support: http://cmake.org/cmake/help/support.html
>> CMake Consulting: http://cmake.org/cmake/help/consulting.html
>> CMake Training Courses: http://cmake.org/cmake/help/training.html
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> https://cmake.org/mailman/listinfo/cmake
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180926/7262c15c/attachment-0001.html>


More information about the CMake mailing list