Thanks a lot,
Your suggestion worked really well, I ' m now able to separate download
source and build into two separate projects,
I have added a <STAMP_DIR> line into source building project to keep git
download stamp out of binary dir and side to source, so
even if i completely empty the binary dir, the source project does not
get rebuilt
Regarding passing vars from "meta" project to external slave projects,
for cache variables, the TYPE can be found by doing
get_property(mytype CACHE ${myvar} PROPERTY TYPE) but I do not have
found any way to get it.
Is due to my ignorance or really variables have no type defined?
Thanks again
Luigi
On 10/02/2011 8.39, Jean-Christophe Fillion-Robin wrote:
Hi Luigi,
You will find some comments below ...
Jc
On Wed, Feb 9, 2011 at 9:07 AM, Luigi Calori <l.cal...@cineca.it
<mailto:l.cal...@cineca.it>> wrote:
Hi everybody,
I' m trying to use ExternalProject to wrap serveral building
recipies for different packages I have to use:
I am taking the habit of using it as a replacement of shell
scripts or manual session for building from source.
In my usage I found some problems, possibly due to my ignorance,
so please forgive me:
1) I would like to build the same package from the same source
multiple times (for example because I need to change some config
(shared/non shared)
or build (debug /release) ... I would like to keep a common
source dir across the different builds...
So I tried to specify a source dir outside binary dir, but the
the download and patch steps seem repeated even if the source is
already present
(the download step can be saved)
Is this behavior intended or am I missing something?
I have tried to split the projects in two: one that download
and patch the source and another that build it, but
unfortunately the build only project complain that is source
dir is empty at meta-project configure time.
Have a look at the CMakeLists.txt enclosed. It basically checkout a
project using a first external project and then configure+built in
second external project depending on the first one.
The problem seems that the stamp files that decide weather a
step has to be executed, are collected on the same STAMP_DIR:
For a previous version of the module, I patched it by adding a
SOURCE_STAMP_DIR that differentiate the folder where the stamps
files are kept,
between download and patch step, and the other stepsI.
could that be generally useful? In case I could try to dive in
and file a feature request + patch
2) Regarding VCS, I see that CVS, SVN and GIT are now supported,
I' ve to use also Bazaar and Mercurial,
is it possible to use DOWNLOAD_COMMAND for addressing those,
are there any examples?
otherwise would it be useful to add new BZR_REPOSITORY and
HG_REPOSITORY commands?
You will have to use both the DOWNLOAD and the UPDATE command.
I am not familiar with bazaar or mercurial .. but if the "initial
checkout or clone" and the following "update or pull" associated with
these repository can be achieved using a single command line. It
should be pretty straightforward.
Otherwise, you could either:
- create a cmake files that could be invoked as download and update
command (${CMAKE_COMMAND} -P
/path/to/your/bazaar-download-script.cmake, ${CMAKE_COMMAND} -P
/path/to/your/bazaar-update-script.cmake)
- patch ExternalProject and submit a patch
3) In case of Cmake based projects, there seem no way to inherit
variables or settings from the "meta" project into the
ExternalProject apart from explicitly listing
definition variables as CMAKE_ARGS -Dvar1:var1type=${var1}
-Dvar2:var2type=${var2} .
Is that tue or there is some other way to do it? ...
Option and cmake variables defined in the "meta" project could be used
to configure any external project. As of today, there is no way of
automatically guessing with which External project these options and
variables should be assigned to.
That means the options should be explicitly associated with an
external project (using CMAKE_ARGS).
and in case, is the vartype needed?
Under the hood, cmake is invoked, if no vartype is specified, it
default to "UNINITIALIZED". See
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#property:TYPE
If you omit to specify the type, the variable won't show in both
ccmake and cmake-gui.
Sorry for the length and thanks a lot in advance
Luigi
_______________________________________________
Powered by www.kitware.com <http://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
--
Direct: 1-518-836-2174
Ext: 304
_______________________________________________
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