[cmake-developers] Exporting dependent library targets in multiple export sets

Alexander Neundorf neundorf at kde.org
Fri Sep 28 16:21:37 EDT 2012


On Friday 28 September 2012, Alexander Neundorf wrote:
> On Friday 28 September 2012, Brad King wrote:
> > On 09/28/2012 01:21 PM, Alexander Neundorf wrote:
> > > The imported target bld_testExe2lib in ExportBuildTree.cmake links
> > > against the imported target exp_testExe2libImp created in exp.cmake.
> > > 
> > > So if exp.cmake is included after ExportBuildTree.cmake this imported
> > > library does not exist yet.
> > > This sounds like a real dependency to me, not an artificial one.
> > 
> > I wrote the test originally.  It is not a real dependency.
> > The exp_ and bld_ namespaces should be completely separate.
> > One is from install(EXPORT).  One is from export().
> 
> Ok, I see.
> ... working on it.

There is an updated version now on stage.

The behaviour of cmExportBuildFileGenerator now basically is the same as it 
was before.
The collected target exports are not considered at all anymore, error handling 
and APPEND mode should work again exactly as before.
The code for handling missing targets has moved into a virtual function 
HandleMissingTargets(), which makes it IMO easier to handle all combinations 
correctly.
ComplainAboutMissingTarget() is not virtual anymore now.

The test works again as before.

Alex



More information about the cmake-developers mailing list