[CMake] Usage of export(PACKAGE ...)
David Cole
dlrdave at aol.com
Thu Mar 28 17:18:24 EDT 2013
If <PROJECT_NAME>_DIR is given and has a correct value, it is a bug if
find_package finds the project anywhere else. Whether that's generally
true or not, I sort of doubt it. It probably depends on the project
itself, and the find and/or config files involved.
I second Stephen's request for steps to reproduce.
If it's true, it's a bug that should be fixed, not something where we
should deprecate export(PACKAGE or add warnings...
Just my opinion,
David C.
-----Original Message-----
From: Stephen Kelly <steveire at gmail.com>
To: cmake <cmake at cmake.org>
Sent: Thu, Mar 28, 2013 5:12 pm
Subject: Re: [CMake] Usage of export(PACKAGE ...)
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.
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake
More information about the CMake
mailing list