Hello,

On 06/19/2016 02:00 PM, Andreas Weis wrote:
> After fiddling around with the issue, I found that reversing the order
> in which the IMPORTED_LOCATION_* fields on the imported target are being
> set resolves the issue. It seems that the first configuration that's
> added here will be used as a default for the not explicitly added
> configurations?
Seems to be true for me as well. I don't think just reverting the order
is a proper fix though.

Consider exported target configuration files generated by the CMake
itself. They consist of <exported name>.cmake and a set of <exported
name>-<configuration>.cmake files which are included from the former in
unknown order. At east file(GLOB) documentation doesn't specify the
order, but even if it's sorted alphabetically then <exported
name>-debug.cmake always comes before <exported name>-release.cmake or
<exported name>-relwithdebinfo.cmake.

The suggested way to deal with this seems to be to use
MAP_IMPORTED_CONFIG_<CONFIG> target properties, but I suppose it should
only (?) be used when imported target (or target it's being linked to)
has non-standard configurations, which isn't so in this case. Mapping
Release to "Release;RelWithDebInfo" and RelWithDebInfo to
"RelWithDebInfo;Release" looks odd enough (and I didn't add MinRelSize
here). Maybe there should exist some default mapping built-in with the
similar effect?..

Regards,
Mike
-- 

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:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to