[CMake] Usage of export(PACKAGE ...)

Stephen Kelly steveire at gmail.com
Thu Mar 28 17:06:59 EDT 2013


Jean-Christophe Fillion-Robin wrote:

> Hi Folks,
> 
> I would like to discussed the usable of "export(PACKAGE ...)" statement.
> 
> Based on my experience, it turns out that exporting the build tree in the
> system package registry is a bad idea when building the same package
> multiple time as it is done on a dashboard client or a developer
> workstation trying out multiple configurations. Indeed, when
> "find_package" is used in "CONFIG" (or "NO_MODULE") mode, by default CMake
> will search into the CMAKE_SYSTEM_PACKAGE_REGISTRY and will resolve to an
> already generated build tree instead of the one passed using
> <PROJECT_NAME>_DIR.
> 
> What do you think ? Should we deprecate the use of "export(PACKAGE ..)" or
> add a warning in the documentation ?
> 
> Reference:
> http://www.cmake.org/cmake/help/v2.8.10/cmake.html#command:export
> 

I filed http://public.kitware.com/Bug/view.php?id=13747 about this some time 
ago, but I haven't tried to reproduce it since, and I don't have a testplan 
for it. Could you describe a reliable way to reproduce the problem?

Thanks,

Steve.




More information about the CMake mailing list