[cmake-developers] Depends information in buildsystem files
Brad King
brad.king at kitware.com
Thu Feb 7 11:50:47 EST 2013
On 02/07/2013 11:42 AM, Stephen Kelly wrote:
> Are you sure?
Well, my proposal would be sufficient but may not be necessary
(i.e. overkill).
> It seems to me it would be much easier and less duplicative to
> add a way to specify TARGETS in try_compile, and in cmCoreTryCompile,
> generate the IMPORTED targets there with whatever properties they have.
...and in CMakeExpandImportedTargets handle imported targets in
CMAKE_REQUIRED_LIBRARIES using this underlying CMake feature, yes.
> I pushed the try_compile_targets topic to my clone as a proof of concept,
> but it would likely need to be reworked from scratch (eg a
> cmExportFileGenerator subclass which can re-export imported targets).
Yes. Also along those lines, I've several times seen requests to
allow install(TARGETS) to re-install an imported target. It is
usually requested by people wanting to package dependencies of
a project for distribution with CPack. A similar re-exporting
feature in cmExportFileGenerator would help with that.
-Brad
More information about the cmake-developers
mailing list