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

Jean-Christophe Fillion-Robin jchris.fillionr at kitware.com
Thu Mar 28 16:20:09 EDT 2013


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

Thanks
Jc

-- 
+1 919 869 8849
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20130328/e8a05011/attachment-0001.htm>


More information about the CMake mailing list