Sorry if eventually off-topic:
What about projects that do not have config files internally but are
built and installed by ExternalProjects "wrapper"?
Is it possible to generate a config file for the projet inside a custom
step of the External projects ?
Even if possible, would it be preferable?
I'm working in an environment (HPC computing) and on HPC cluster many
packages are not available or outdated as sysadm do not keep the sysyem
updated.
Therefore tcl modulefiles are used to provide user installed packages.
I'm using ExternalProject to wrap module download,conf,build,install.
I usually try to find a packege first, then if not found, use an
ExternalProject to add it.
Up to now, I' ve never wrote config packages but I usually have searched
for useful Findxxx modules if not provided by CMake.
Quite oftne I search google for Findxxx package, if found on some
project try to use it and / or adapt.
If there is a bettere way to work, please let me know, otherwise a
repository of Find modules would probably reduce effort to find
available modules as well as improve their quality.
Thanks in advance
Luigi
On 30/03/2013 12.53, David Cole wrote:
Alan,
Project config files must be installed *with* the project, in its
install tree, in a standard location where CMake's find_package can
find them [1]. If the project is unwilling to put such a file in its
install tree, then it's "game over" for a project config file, and a
Find module then becomes necessary, either in another project's repo
that is a client, or in CMake itself, if it's for a widely used package.
It really does belong with the project, though, so that when its
layout changes, it changes its config file, and there's no need for
CMake to "respond" to a release of that project just for a layout
reorg or an addition of a new library...
Two "rules":
- Project config files can only go *with* the project.
(VTK and ITK have them. Qt 5 has one. KDE uses them... All the
cool projects have one. :-)
- Find modules can *never* go with the project, and must be hosted
*outside* the project.
You will never see any project config files in CMake unless CMake
provides one for itself someday. (Not necessary, since CMake is a tool
that people use, not a library that people build upon.)
This topic is also covered in one of my stackoverflow answers:
http://stackoverflow.com/a/6594839/236192
Hopefully this explanation illuminates the topic a little bit more for
you.
Cheers,
David
[1] for the standard locations where find_package will look for
project config files, please see the find_package documentation, and
search for "CMake constructs a set of possible installation prefixes
for the package" in the text...
http://www.cmake.org/cmake/help/v2.8.10/cmake.html#command:find_package
-----Original Message-----
From: Alan W. Irwin <ir...@beluga.phys.uvic.ca>
To: Bill Hoffman <bill.hoff...@kitware.com>
Cc: cmake <cmake@cmake.org>
Sent: Fri, Mar 29, 2013 7:30 pm
Subject: Re: [CMake] CMakeModules repository at GitHub?
On 2013-03-29 16:58-0400 Bill Hoffman wrote:
On 3/29/2013 4:18 PM, Alan W. Irwin wrote:
Hi Bill:
This may have been covered in this thread already, but I am
interested
in your take on the following questions. Why no downstream (i.e.,
associated with CMake) config files if upstream won't take them? For
the downstream case, are find modules considered to be a better
solution than config files, and if so why?
If the project will not create cmake config files then the only
option is to
have a traditional find module. Maybe I don't get your question?
This sub-topic started with the following thought-provoking statements
from David:
<quote>
CMake needs no new Find modules.
All projects should provide a "project config file .cmake script"
readable by CMake's find_package, and installed in a location where
CMake can find it, so that a CMake find module is completely
unnecessary.
</quote>
Perhaps I am overinterpreting what David said, but it appears to
me he is generally deprecating the find module approach and
recommending the new project config file approach be used instead.
However, for the special case where an external project is not willing
to host anything concerning CMake where should those project config
files be hosted? It appears to me that one possibility is that CMake
host them, just like you do now for the deprecated (according to my
interpretation) find modules. But you say above the only option
for this case is the find module approach. Why? Is there some technical
issue that I am missing concerning project config files that would make
it impossible for CMake to host them?
Alan
__________________________
Alan W. Irwin
Astronomical research affiliation with Department of Physics and
Astronomy,
University of Victoria (astrowww.phys.uvic.ca).
Programming affiliations with the FreeEOS equation-of-state
implementation for stellar interiors (freeeos.sf.net); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________
Linux-powered Science
__________________________
--
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
--
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
--
Luigi Calori
SuperComputing Applications and Innovation Department
CINECA - via Magnanelli, 6/3, 40033 Casalecchio di Reno (Bologna) - ITALY
Tel: +39 051 6171509 Fax: +39 051 6132198
hpc.cineca.it
--
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