[cmake-developers] [CMake 0015971]: CMake alias resolution appears to be inconsistently applied

Mantis Bug Tracker mantis at public.kitware.com
Thu Feb 11 14:52:37 EST 2016


The following issue has been SUBMITTED. 
====================================================================== 
https://public.kitware.com/Bug/view.php?id=15971 
====================================================================== 
Reported By:                Marcus D. Hanwell
Assigned To:                Robert Maynard
====================================================================== 
Project:                    CMake
Issue ID:                   15971
Category:                   CMake
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             2016-02-11 14:52 EST
Last Modified:              2016-02-11 14:52 EST
====================================================================== 
Summary:                    CMake alias resolution appears to be inconsistently
applied
Description: 
The Tomviz project extends ParaView, and uses a number of imported targets. Some
of these come from VTK, others come from ParaView. When migrating to Qt 5 we hit
a strange bug where the Qt 5 interface library aliases were not getting expanded
unless we explicitly added them to the target_link_libraries line. Printing them
out all the libraries were found, but the link line had -lQt5::Help etc. It
looks like the Qt5::Widgets alias was the only one resolved.

If I switch the order of finding ParaView and finding Qt5 around everything
worked. If I find ParaView first, then Qt 5 it fails at linking, unless I add
all of the libraries to the target_link_libraries, in which case it resolved
them and the link step succeeded. This seems very inconsistent to me, perhaps it
is intended for for reason due to the order in which you resolve aliases? It
took something that was fairly resilient to call order previously and made it
more brittle in our project.

Additional Information: 
https://github.com/OpenChemistry/tomviz/commit/525336b3e94170ec2e2c463894de034d539898cc
shows the commit I am hoping will make this consistent everywhere. If aliases
make this strict ordering necessary that was not evident to me.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2016-02-11 14:52 Marcus D. HanwellNew Issue                                    
2016-02-11 14:52 Marcus D. HanwellStatus                   new => assigned     
2016-02-11 14:52 Marcus D. HanwellAssigned To               => Robert Maynard  
======================================================================



More information about the cmake-developers mailing list