MantisBT - CMake
View Issue Details
0015451CMakeCMakepublic2015-03-17 07:302016-06-10 14:31
Bjoern Thiel 
Kitware Robot 
normalmajoralways
closedmoved 
Windows
 
 
0015451: Setting MAP_IMPORTED_CONFIG_<CONFIG> hides IMPORTED_LOCATION
I thought IMPORTED_LOCATION is a fall back for IMPORTED_LOCATION_<CONFIG> and should be found in any case. But cmTarget::GetMappedConfig gives up too early: if(!mappedConfigs.empty() && !*loc && !*imp) { return false; } (line 5540)
Example: set(CMAKE_MAP_IMPORTED_CONFIG_RELWITHDEBINFO RELEASE) and try to use Qt5::moc in the RelWithDebInfo configuration.
See above.
No tags attached.
Issue History
2015-03-17 07:30Bjoern ThielNew Issue
2015-03-17 14:08Brad KingNote Added: 0038232
2016-06-10 14:29Kitware RobotNote Added: 0042734
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0038232)
Brad King   
2015-03-17 14:08   
The design of MAP_IMPORTED_CONFIG_* intended that if it is defined then it always points to complete configurations instead of using the fallback. It was designed back when the only imported targets were those generated by export() and install(EXPORT) which always have complete IMPORTED_LOCATION_<CONFIG> values and never use IMPORTED_LOCATION. Also it was originally designed to be set on a per-target basis where for each target one knows whether IMPORTED_LOCATION_<MAPPED-CONFIG> is defined, and if not one can just leave out the mapping to use IMPORTED_LOCATION.

What you propose is to map configurations but if the IMPORTED_LOCATION_<MAPPED-CONFIG> is not available still fall back to IMPORTED_LOCATION. I think this is reasonable if you want to try a patch for it (with tests).
(0042734)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.