Re: [CMake] CMakeModules repository at GitHub?

2013-03-30 Thread Luigi Calori
 (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


Re: [CMake] External dependencies and Windows

2013-02-04 Thread Luigi Calori
I think your question make sense, I would be interested to know proposed 
solutions, as likely have similar problems.


I' m far from being a cmake guru, but I like SuperBuild pattern as well .
I would do these steps:

0) define where are on the different platform the sources of the SDL 
library   you want  ( is it http://www.libsdl.org/download-1.2.php ?)
 also you should think  if is likely to find it already installed 
and you want to let your users to use it
1) test the currently available FindSDL.cmake with latest cmake release 
with find_package(SDL) and see if it is working on all targetplatforms.

If it is not suitable, build one which fits your need.
2) build your simple project hello world by using find_package(SDL), 
eventually using your own FindSDL.cmake

3) build one hello_world_SDL_superbuild project which
find_package(SDL)
if(NOT SDL_FOUND)
add_external_project(SDL
   ..
   ..
)
)
   add_external_project(HELLO_WORLD_SDL
  .
  .
 DEPENDS SDL
   )

If the SDL external project has an INSTALL_PREFIX path that is reported 
inside as CMAKE_PREFIX_PATH, the find should work in both situations


when everything works fine, it is likely that your SDL external project 
as well as your Find_SDL.cmake could be of interest to others ;-)




If the cmake gurus agree that this form of SuperBuild pattern is the 
right one, it could be good  to develop it as an example, with proper 
FindSDL.cmake







On 04/02/2013 15.14, Ansis Ma-lin,s( wrote:

It looks like I'm still asking the wrong questions.

As a last resort, here's my specific problem: I want to compile and 
run a hello world SDL2 application on Windows, Linux, and OS X - 
purely as an exercise in CMake. How would YOU do this?


SDL2 only exists in source form in their repository.

This is my main.cpp:
#include SDL.h
int main(int argc, char** argv)
{
if (SDL_Init(SDL_INIT_VIDEO)  0) printf(FAILURE\n);
else printf(SUCCESS\n);
SDL_Quit();
return 0;
}


--

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

Re: [CMake] Why does ExternalProject require root access?

2013-01-21 Thread Luigi Calori
I' m not sure of which are exactly your problems but I probably had 
similar ones:
I use to have a meta-project which assembles all the needed external 
project set up to download,configure,build and install.
I setup for all the project the same CMAKE_INSTALL_PREFIX and the same 
CMAKE_PREFIX_PATH ( passed as cmake configure options with -D)

For configure based project you need to use the --prefix option

If this assumption can work for you,  let me know,
I can try to figure out something useful out of my mess of 
external_project cmake-based builds


HTH

On 01/21/2013 12:00 AM, Ansis Ma-lin,s( wrote:
There is no Bullet package for Ubuntu. But most importantly there is 
no such thing as packages in Windows. So I have to build it into my app.


I also want to avoid having to alter the CMake files of my 
dependencies. I want other devs to be able to just check out the 
latest version of Bullet into a specific folder and hit compile on my 
meta project.



--

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

Re: [CMake] ExternalProject_Add examples

2012-03-17 Thread Luigi Calori

On 17/03/2012 22.11, Marcus D. Hanwell wrote:

On Sat, Mar 17, 2012 at 5:03 PM, Bill Lorensenbill.loren...@gmail.com  wrote:

Folks,

I've recently created a number of super builds using CMake's External
Project mechanism. Each external project requires some sort of
download, configuration, build and possibly install. The CMake defines
needed to correctly access the results of the external project vary
significantly. The trickiest part is find the proper download,
configuration and CMake defines.

For example, for the Point Cloud Library (http://pointclouds.org/) I
created these external projects:
VTK - git, cmake, make; VTK_DIR
FLANN - zip, cmake, make install; FLANN_LIBRARY, FLANN_INCUDE_DIR
Eigen - .tar.bz2,; EIGEN_INCLUDE_DIR
Qhull - git, cmake, make;QHULL_LIBRARY,QHULL_INCLUDE_DIR
Boost - .tar.gz, bootstrap.sh, b2; BOOST_ROOT
GTest - .zip, cmake, make; GTEST_ROOT,GTEST_INCLUDE_DIR

Slicer4 has many more.

Should we start collecting sample ExternalProject_Add files for
external projects?

We have talked about doing this too (I have Eigen, Boost, GTest and
others for example). The standard CMake based projects hardly seem
worth it, but it depends on what you want to do with them I suppose.
For the work we are doing in chemistry we have been working on an
experimental superbuild that uses a common prefix in the build tree to
install to, and then all we need pass in is CMAKE_PREFIX_PATH - this
can make the logic significantly easier for dependent CMake projects
as it will always search within the prefix first.
I did something similar, trying to collet all the build of stuff that I 
had to do in a single place powered by cmake
Used  CMAKE_PREFIX_PATH and a single source place where all the builds 
download  and expand


you can have a look at

https://hpc-forge.cineca.it/svn/CmakeBuilds/lib/

It's just for my use only, so really dirty and not properly checked, I' 
m also looking for good starting point for common stuff like Qt, boost 
and others
(I' tried to collect in the folder  Packages the tricky part of 
building  the components,) I' ve tried to define a dependency graph but 
it' still messy


anyway I would really appreciate a place where to share good recipies 
for CMake building packeges


Thanks
  Luigi







The Qt external project was pretty tricky too, and we are using that
in several places along with smaller libraries like libxml2.

Marcus
--

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


Re: [CMake] Environment variables and ExternalProject

2011-10-17 Thread Luigi Calori

On 17/10/2011 18.27, Milutin Jovanovic' wrote:


Hi all,

Hi all. First time posting. Before I start I'd like to thank all the 
Kitware guys for a very nice and useful tool. I did a fair bit of 
searching to try to avoid asking duplicate questions, but did not find 
answer to my problem.


I am trying to make a private build of some dependencies, ogg and 
vorbis in this case. The initial problem is that second library make 
is not finding first, due to pkg-config not finding output files from 
the first library. OK, I said, and did PKG_CONFIG_PATH=... and export 
PKG_CONFIG_PATH before executing cmake build. And this fixed the problem.


However then I tried to ease the job of whoever might be using this, 
and tried setting the PKG_CONFIG_PATH inside the cmake script. But 
this does not work. I did some tests, and indeed, configure executed 
as part of ExternalProject does not see environmental variables set by 
cmake.


So, the question is, am I doing something wrong or is this cmake 
limitation?
I' m not really sure, but I think it is a CMake limitation that has been 
discussed before:

When you do

set(ENV{PKG_CONFIG_PATH} 
${CMAKE_INSTALL_PREFIX}/lib/pkgconfig/:$ENV{PKG_CONFIG_PATH})


I think that you are setting the environment for the current cmake 
process and all it' s child processes.


The problem is that when you use ExternalProject_Add() you are building 
a Makefile that will be processed at build time whwn you invoke make 
(or a XCode ide processing)


That process is NOT a child of your cmake, so the env is lost

As far as I know, there is (unfortunately) no ENV clause in 
ExternalProcess,  so the only (ugly) workaround that I have found is to 
define a wrapper of the two configure and make processes that pass the 
env you need like:


1) using the included pkgconfig_env.cmake
2) calling the wrapper script as I' ve tried to show subsequently by 
modifying your second call


There could be a simpler way in your case, but I' ve included this as is 
what I' m using for packaging external libraries.


I would really like to have an ENV clause in ExternalProcess to force 
all the called steps to have a defined environment


HTH
  Luigi












Miki.

P.S. I am doing this on a Mac OSX Lion, but I expect it to work on 
Linux without modifications.


=== CMakeLists.txt ===

cmake_minimum_required(VERSION 2.8)

set(CMAKE_INSTALL_PREFIX ${CMAKE_BINARY_DIR} CACHE PATH Path where to 
install.)


project(dependecies)

include(ExternalProject)

set(ENV{PKG_CONFIG_PATH} 
${CMAKE_INSTALL_PREFIX}/lib/pkgconfig/:$ENV{PKG_CONFIG_PATH})

message(STATUS PKG_CONFIG_PATH=$ENV{PKG_CONFIG_PATH})

ExternalProject_Add(
libogg
PREFIX libogg
URL http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz
URL_MD5 0a7eb40b86ac050db3a789ab65fe21c2
UPDATE_COMMAND set
CONFIGURE_COMMAND ./configure --prefix=${CMAKE_INSTALL_PREFIX}
   BUILD_COMMAND make
# INSTALL_COMMAND make install
   BUILD_IN_SOURCE 1
)

set(_mymoduledir  where you put the included file 
pkgconfig_env.cmake --
set(conf_command_body ./configure --prefix=${CMAKE_INSTALL_PREFIX}  
--with-ogg=${CMAKE_INSTALL_PREFIX}

string(REPLACE ; @@ managed_conf_command_body ${conf_command_body} )
 set(conf_command CONFIGURE_COMMAND ${CMAKE_COMMAND} 
-Dmy_binary_dir:PATH=BINARY_DIR -Dmy_source_dir:PATH=SOURCE_DIR 
-Dmy_install_dir:PATH=${CMAKE_INSTALL_PREFIX} 
-Dmy_configure:STRING=${managed_conf_command_body} -P 
${_mymoduledir}/pkgconfig_env.cmake)


set(make_command_body make --jobs 4)
string(REPLACE ; @@ managed_make_command_body ${make_command_body} )
set(make_command BUILD_COMMAND ${CMAKE_COMMAND} 
-Dmy_binary_dir:PATH=BINARY_DIR -Dmy_source_dir:PATH=SOURCE_DIR 
-Dmy_install_dir:PATH=${CMAKE_INSTALL_PREFIX} 
-Dmy_configure:STRING=${managed_make_command_body} -P 
${_mymoduledir}/pkgconfig_env.cmake)

 set(list_separator LIST_SEPARATOR @@)


ExternalProject_Add(
libvorbis
DEPENDS libogg
PREFIX libvorbis
URL http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.2.tar.bz2
URL_MD5 798a4211221073c1409f26eac4567e8b
UPDATE_COMMAND set

${conf_command}
${make_command}
${list_separator}


# INSTALL_COMMAND make install
   BUILD_IN_SOURCE 1
)



--

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

set(ENV{PATH} ${my_install_dir}/bin:$ENV{PATH})
string(REPLACE @@ ; my_configure ${my_configure} )

set(ENV{PKG_CONFIG_PATH} ${my_install_dir}/lib/pkgconfig)
set(ENV{LD_LIBRARY_PATH

Re: [CMake] ExternalProject_Add without download of local sources?

2011-09-15 Thread Luigi Calori

Did you tried specifying SOURCE_DIR without any URL and / or
DOWNLOAD_COMMAND 
UPDATE_COMMAND 

Not sure this is correct but for my case seems to work

HTH
  Luigi

On 15/09/2011 17.13, Thomas Wolf wrote:

Hello,

i am wondering if it is possible to have an external project building
from local sources, *without* attemtping to download (in that case,
copy) to a specific location.

My sources of the externals are already in my repository, i do not want
to have them compiled.

I looked around for some while now, but didn't find anything rearding
this topic. Maybe i just missed it.

Setting URL and SOURCE_DIR to the same directory deletes the files...

The 3rdpart project in question is just a normal CMakke project, nothing
fancy.

Regards,
Thomas
___
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


Re: [CMake] ExternalProject + Patch command

2011-03-16 Thread Luigi Calori

On 16/03/2011 17.37, David Cole wrote:

It would be nice (as a future feature addition) to be able to support
sharing the download/update/patch/source_dir aspects of an
ExternalProject target among multiple configurations and avoid the
multiple runs of these things that are exactly the same independent of
the config.

Until that dream becomes reality, though.

I had once modified the External to include support for SRC_STAMP_DIR
#[SRCSTAMP_DIR dir]  # Directory to store source step timestamps

I still have the file but i unfortunated did not kept it up to date with 
recent mods

You could run a script as the PATCH_COMMAND, and put some sort of has
this patch already been applied to this source tree logic into the
script, and only actually do the patch command if not already applied.

It's a work-around, and might be ugly, but it should work.

Another way is to split the project in two:

one build the source and the other do the config,build,install like

ExternalProject_Add(
${PACKAGE}-GetSource
SOURCE_DIR ${Package_Source_Dir}
STAMP_DIR ${Package_Source_Stamp_Dir} 
--- I set this in a place 
near the sources, so can remove the build without re-patch

SVN_REPOSITORY 
PATCH_COMMAND - your patch---
UPDATE_COMMAND 
CONFIGURE_COMMAND 
BUILD_COMMAND 
INSTALL_COMMAND 
)

if(Package_current_dependencies_effective_line)
set( Package_current_dependencies_effective_line 
${Package_current_dependencies_effective_line} ${PACKAGE}-GetSource)

else()
set(Package_current_dependencies_effective_line DEPENDS 
${PACKAGE}-GetSource)

endif()



ExternalProject_Add(
${PACKAGE}
SOURCE_DIR ${Package_Source_Dir}
DOWNLOAD_COMMAND  --this is 
important

BUILD_DIR ..
   INSTALL_DIR 
CMAKE_COMMAND ${CMAKE_COMMAND}
CMAKE_ARGS
${Package_std_cmake_args}
${Package_additional_cmake_args}
BUILD_COMMAND 
INSTALL_COMMAND 
${Package_current_dependencies_effective_line} 
 add ${PACKAGE}-GetSource to your dependencies

STEP_TARGETS configure build

)

HTH
Luigi




HTH,
David


On Wed, Mar 16, 2011 at 11:40 AM, Johan Björkp...@spotify.com  wrote:

Hi everyone,


I'm using an SVN repository and a PATCH command. It seems to work
fine, but when I'm selecting a different build configuration, all
steps will be executed again (as expected), but it results in my patch
being applied twice.

Any ideas how to work around this?

My externalProject command for reference:

ExternalProject_Add(Breakpad
  SVN_REPOSITORY http://google-breakpad.googlecode.com/svn/trunk/
  UPDATE_COMMAND 
  CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=INSTALL_DIR
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=${CMAKE_OSX_DEPLOYMENT_TARGET}
-DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES}
  PATCH_COMMAND patch
${CMAKE_CURRENT_LIST_DIR}/other/patches/breakpad.patch
)

Thanks
/Johan
___
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




___
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


Re: [CMake] Help on ExternalProject_Add

2011-02-16 Thread Luigi Calori

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

[CMake] Help on ExternalProject_Add

2011-02-09 Thread Luigi Calori

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.
   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?


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? ...  and in case, 
is the   vartype needed?



Sorry for the length and thanks a lot in advance

Luigi



___
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


Re: [CMake] Bug fix requests for the *next* release of CMake...

2010-11-07 Thread Luigi Calori

On 07/11/2010 21.01, Philip Lowman wrote:
On Fri, Nov 5, 2010 at 12:08 PM, Luigi Calori l.cal...@cineca.it 
mailto:l.cal...@cineca.it wrote:


+1 for FindBoost support to CMakeified version of Boost at

http://gitorious.org/~denisarnaud/boost/denisarnauds-zeuners-boost-cmake/commits/1.44.0-denis

http://gitorious.org/%7Edenisarnaud/boost/denisarnauds-zeuners-boost-cmake/commits/1.44.0-denis:


Luigi,

Does the CMakeified version of Boost still not produce build outputs 
that match bjam by default?  I remember when I looked at it a year or 
two ago there appeared to be only minor issues with the library names. 
 I would have hoped that these issues would have been resolved by now.
I just tried the build with cmake 2.8.2  under MSVC9 using release build 
and static linking:
There seem to be a minor inconsistency: when building Boost with cmake 
the static libs do not have the prefix lib so boost the auto-linking 
fails.

I have resolved by

1) when building boos, configure with -DLIBPREFIX=lib,

2) configure the project that search for boost with 
-DBoost_USE_STATIC_LIBS=ON


During the installation step of cmakefied boost,  Boost.cmake config 
files get installed but not sure if FindBoost use it


I' m not sure if this can be solved in FindBoost, but was just raising 
attention on a (for me) much better build system for Boost


thanks
   Luigi



Could you elaborate in a bug report what does and doesn't work between 
FindBoost.cmake and the branch of Boost that you're referring to and I 
would be more than happy to look into the issue.  I've heard reports 
of people getting FindBoost and CMakeified boost to play nice together 
but it involved changing build settings in CMakeified Boost (not quite 
ideal).


--
Philip Lowman


___
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

Re: [CMake] Bug fix requests for the *next* release of CMake...

2010-11-05 Thread Luigi Calori

On 04/11/2010 21.48, Kalev Lember wrote:

Hi,

I would love to have support for CFBundle (.plugin) on Mac.

http://www.vtk.org/Bug/view.php?id=11295

Me too,  +1 for this bug

also, for using  the same project (FireBreath)

+1 for FindBoost support to CMakeified version of Boost at 
http://gitorious.org/~denisarnaud/boost/denisarnauds-zeuners-boost-cmake/commits/1.44.0-denis:


Thanks
Luigi


___
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


Re: [CMake] CMAKE_LIBRARY_PATH appears not to work properly for finding libtcl

2010-05-17 Thread Luigi Calori

Bill Hoffman wrote:
OK, your right, it does prefer names that show up first in the name 
list even if they are later in the total path.

I think I have got the same problem (bug) as had FindFreetype always
getting system lib even if I a custom version was present in a folder
lib under a path specified in
CMAKE_PREFIX_PATH as the system lib was called freetype while the custom
one was called freetype238 and the module was (erroneously??) setting

NAMES freetype libfreetype freetype219 freetype238

I solved switching to

NAMES freetype238 freetype219 freetype libfreetype

It would be good to have it fixed

Thanks



Here is what the code does:

The ivar this-SearchPaths is the super path in the this function:

std::string cmFindProgramCommand::FindProgram(std::vectorstd::string 
names)

{
  std::string program = ;

  if(this-SearchAppBundleFirst || this-SearchAppBundleOnly)
{
program = FindAppBundle(names);
}
// this is the main search, it passes in a list of names,
// and the super path
  if(program.empty()  !this-SearchAppBundleOnly)
{
program = cmSystemTools::FindProgram(names, this-SearchPaths, true);
}

  if(program.empty()  this-SearchAppBundleLast)
{
program = this-FindAppBundle(names);
}
  return program;
}


// FindProgram loops over the names and trys to each
// name in the total path
//
kwsys_stl::string SystemTools::FindProgram(
  const kwsys_stl::vectorkwsys_stl::string names,
  const kwsys_stl::vectorkwsys_stl::string path,
  bool noSystemPath)
{
  for(kwsys_stl::vectorkwsys_stl::string::const_iterator it = 
names.begin();

  it != names.end() ; ++it)
{
// Try to find the program.
kwsys_stl::string result = SystemTools::FindProgram(it-c_str(),
  path,
  noSystemPath);
if ( !result.empty() )
  {
  return result;
  }
}
  return ;


Not supper easy to fix...   FindProgram is actually a pretty 
complicated function.  But, if someone wants to test/send a patch... :)


Might break something, but I doubt it.  If you have two copies of 
something on a machine, you are bound to make someone unhappy some of 
the time by picking the wrong one...


-Bill
___
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


Re: [CMake] ExternalProjects: How do ExternalProject_add and ExternalProject_Add_Step interact?

2010-04-23 Thread Luigi Calori
There is some info at 
http://www.kitware.com/products/archive/kitware_quarterly1009.pdf


based on that I thought it was enouth do depend upon just the install in 
your case...


I am collecting external projects for several libs, It seem you are 
building at least VTK and Tcl and Tk that I lack...
Do you mind sharing? 

my stuff is (dis)organized as a series of packages and assemblies... far 
for being cross platform and complete though

If you like, have a look at
http://3d.cineca.it/storage/bazaar_repo/CmakeDeps/lib/wt/

Thanks in advance

Luigi



kent williams wrote:

Answering my own question -- I think.  This maybe is information that
could be added to the documentation for ExternalProjects.cmake!

ExternalProject_Add creates a project, e.g.

ExternalProject_Add(tcl
CVS_REPOSITORY :pserver:anonymous:@tcl.cvs.sourceforge.net:/cvsroot/tcl
CVS_TAG -r core-8-5-7
CVS_MODULE  tcl
CONFIGURE_COMMAND
${BRAINSTracer_BINARY_DIR}/tcl-prefix/src/tcl/unix/configure
--prefix=${CMAKE_BINARY_DIR}
INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}
UPDATE_COMMAND 
)

When the generated makefiles actually build the project, there's a
directory named

${CMAKE_CURRENT_BINARY_DIR}/tcl-prefix/src/tcl-stamp

In which a 0-length file is created after each step of the external
project build is successfully finished.  These files (and THIS is what
was undocumented, that I had to determine by poking around in the
build directories) are named

${proj}-mkdir ${proj}-download ${proj}-update ${proj}-patch
${proj}-configure ${proj}-build ${proj}-install ${proj}-done

Where 'proj' is the name you've given the ExternalProject.  So in
order to add a step you have to list the steps your new custom step
depends on, after the DEPENDEES keyword. For example:

if(APPLE)
set(SHARED_LIB_EXT .dylib)
else(APPLE)
set(SHARED_LIB_EXT .so)
endif(APPLE)

ExternalProject_Add_Step(${proj} after_install
COMMAND chmod u+w ${BRAINSTracer_BINARY_DIR}/lib/libtcl8.5${SHARED_LIB_EXT}
COMMENT --
${BRAINSTracer_BINARY_DIR}/lib/libtcl8.5.so installed read-only!
DEPENDEES mkdir update patch download configure build install
)

Now it appears that you have to list ALL the prerequisite steps, not
just the one after which your step should occur.
___
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


Re: [CMake] Problems with ExternalProject_Add and tar.gz files

2010-04-02 Thread Luigi Calori

I got exactly the same error in doing something similar:
it is the untar phase based on cmake that seem to fail on some kind of tar:
in the untar phase, externalProject uses cmake -E tar xvf tar file
and this is the part that fail.
if I issue the command:

cmake -E tar xzf boost-1.41.0.cmake0.tar.gz
or unpack and
cmake -E tar xf boost-1.41.0.cmake0.tar

got the same error
CMake Error: Problem with tar_extract_all(): Invalid argument

It seem somehow related to some kind of tar version or content:

for example it happened to me also getting the latest pycrypto 
http://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-2.1.0.tar.gz


Probably we should issue a bug

HTH

Ben Medina wrote:

I'm trying to get ExternalProject_Add to work, using a tar.gz file as
the source. My experiment thus far is with boost, and my code looks
like this:

include (ExternalProject)
set (boost_libs_to_build program_options)
ExternalProject_Add(
boost
URL 
http://sodium.resophonic.com/boost-cmake/1.41.0.cmake0/boost-1.41.0.cmake0.tar.gz
CMAKE_ARGS -DBUILD_PROJECT=${boost_libs_to_build}
)

This produces the boost target, as expected, but building the target
results in failure:

2Performing download step (download and extract) for 'boost'
2-- downloading...
2 
src='http://sodium.resophonic.com/boost-cmake/1.41.0.cmake0/boost-1.41.0.cmake0.tar.gz'
2 
dst='C:/tecdev/tecplot/360/trunk/_build/win64-vs2008/boost-prefix/src/boost-1.41.0.cmake0.tar.gz'
2 timeout='none'
2-- downloading... done
2-- extracting...
2 
src='C:/tecdev/tecplot/360/trunk/_build/win64-vs2008/boost-prefix/src/boost-1.41.0.cmake0.tar.gz'
2 
dst='C:/tecdev/tecplot/360/trunk/_build/win64-vs2008/boost-prefix/src/boost'
2-- extracting... [tar xfz]
2CMake Error: Problem with tar_extract_all(): Invalid argument
2CMake Error: Problem extracting tar:
C:/tecdev/tecplot/360/trunk/_build/win64-vs2008/boost-prefix/src/boost-1.41.0.cmake0.tar.gz
2-- extracting... [error clean up]
2CMake Error at boost-stamp/extract-boost.cmake:30 (message):
2  error: extract of
2  
'C:/tecdev/tecplot/360/trunk/_build/win64-vs2008/boost-prefix/src/boost-1.41.0.cmake0.tar.gz'
2  failed

Is there any way to know exactly what is going wrong with the extraction?

Thanks,
Ben
___
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


Re: [CMake] cmake -E tar using bzip2 compression

2010-03-18 Thread Luigi Calori

Hugh Sorby wrote:

I have been hanging out for 2.8.1 because I needed this feature to
provide seamless integration with our current build system.  On testing
yesterday no dice I couldn't decompress a bzip2 archive.  I even looked
through the source code but couldn't find it.
  
It would be nice to have native uncompressing in cmake, but if you can 
stand to use external bunzip2 exec,

try this
http://3d.cineca.it/storage/bazaar_repo/CmakeDeps/lib/wt/CMakeModules/ExternalProject.cmake
it should work for files like .tar.bz2 if you have bunzip2 executable

HTH

Luigi

I feel I have missed the boat on this one but I don't know why.  Any
further information on this would be great.

Hugh

On 13/11/09 05:27, Bill Hoffman wrote:
  

Kelly T. Kirk (CISD/CIV) wrote:


  Hugh Sorby wrote:
  Hi,
 
  I am using CMake 2.6 and I would like to be able to decompress bz2
  files.  Is it possible to add bz2 compression to the tar command (or
  even better is it already there?).  I was hoping to do something like
  cmake -E tar xjf my_really_cool_source_files.tar.bz2
 
  I have looked but didn't find it, which certainly doesn't rule out
the
  fact that it is already there.
 
 
  That is in CVS CMake, but not in a release yet. (Not even 2.8.0.)
 
  -Bill

How about tar.bz2 to work with ExternalProject_Add Module?

  

It will be in 2.8.1.

-Bill



___
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


Re: [CMake] How to build and link Externa Project with exported target

2010-03-17 Thread Luigi Calori

Hi Michael and Nicola,
I'm in a similar situation as I' m trying to build up a cmake based 
dependency builder for OpenSceneGraph based projects:

So I' m really interested in any best practice advice

Michael Wild wrote:

On 17. Mar, 2010, at 13:17 , Nicola Brisotto wrote:

  

Hi!
I'm building a project that require a 3rd party library libqxmpp. Both project uses cmake 
I want to build libqxmpp with ExternalProject_add, this the code I use:


ExternalProject_add(
libqxmpp
#no download, i'm using git submodule
DOWNLOAD_COMMAND 
CMAKE_ARGS 
-DQT_QMAKE_EXECUTABLE=/devel/BIN/v4.6.1-git-phonon-dbg-release/bin/qmake 
-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}
SOURCE_DIR ${CMAKE_SOURCE_DIR}/src/3rdparty/qxmpp-read-only-git/source
)


Means there is a way to instruct

ExternalProject_add

to download from GIT repos? I was not aware of and starting to hack it to 
add... let me know if one is available:
I have already added Bazaar download similarly to SVN ...  so if there is a way 
to share hacking on it



The problem arise when I try to import a target from libqxmpp adding this to my 
project CMakeLists.txt:
#Import libQXmppClient 
include(${CMAKE_BINARY_DIR}/include/QXmppClient/QXmppClient.cmake)


Cmake cannot find QXmppClient.cmake because it will be created when I'll build 
the project.
How can I solve this problem? Are there better solution to build and link an 
external project?

This is the libqxmpp snippet that export the target:

INSTALL(TARGETS QXmppClient EXPORT QXmppClient DESTINATION lib)
INSTALL(EXPORT QXmppClient DESTINATION include/QXmppClient )


Sorry my ignorance, this is part of the install step of  QXmppClient ?


Nicola Brisotto
vcard



There are two ways of getting around this:

1) create the IMPORTED targets yourself.

2) also build your main project wit a ExternalProject_Add and drive the whole thing from 
a master-CMakeLists.txt

The first one is probably easier to set up, but requires you to guess the 
installation names and paths correctly. The second option requires you to 
restructure your whole build system and adds considerable complexity due to the 
communication between your master-project and the external projects. For this 
communication I'd try the following:

- In the master project do all the feature-detection and setting of cache 
variables (such as options etc)
- Write a cache-initializer script to the binary tree
- Do all the ExternalProject_Add calls and specify the cache-initializer script 
with the -C option in CMAKE_ARGS
  
This suggestion is really interesting:the purpouse is to let any 
config  options in the master  projects to be passed to the slaves?

Have you any examples?


I came up with a schema like 2:
any project is built as external, dependencies are resolved by  
ExternalProject_Add and I have used CMAKE_ARGS to communicate settings:
As most of cmake projects were based on FindXXX stuff for finding deps, 
I have overridden the necessary modules in order to make the projects 
find the good components at configure time.


As I did not yet need a lot of interactive customization, I just passed 
common parameters using CMAKE_ARGS



Would not something similar work for you:
keep your project separate from  libqxmpp,  add to it a 
find_package(QXmppClient)

then build a master project where you do:

ExternalProject_add(
libqxmpp
#no download, i'm using git submodule
DOWNLOAD_COMMAND 
CMAKE_ARGS 
-DQT_QMAKE_EXECUTABLE=/devel/BIN/v4.6.1-git-phonon-dbg-release/bin/qmake 
-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}
SOURCE_DIR ${CMAKE_SOURCE_DIR}/src/3rdparty/qxmpp-read-only-git/source
)



ExternalProject_Add(your_project_name
   DEPENDS libqxmpp
   DOWNLOAD_COMMAND 
   SOURCE_DIR ${CMAKE_SOURCE_DIR}/your project subsource dir
   INSTALL_DIR ${CMAKE_INSTALL_PREFIX}


HTH
  Luigi




___
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


Re: [CMake] How to build and link Externa Project with exported target

2010-03-17 Thread Luigi Calori


[...]

He's not downloading with CMake, he just told git that in this directory is a 
submodule. The user has then to fetch it himself with one command:

http://git.wiki.kernel.org/index.php/GitSubmoduleTutorial
  
Sorry ... no git expert at all my point was just to hack  
ExternalProject_add to let specify different download ways, apart from 
URL, SVN_REPOSITORY and mine BZR_REPOSITORY  would like to have also 
GIT_REPOSITORY and HG_REPOSITORY 

[...]
  

2) also build your main project wit a ExternalProject_Add and drive the whole thing from 
a master-CMakeLists.txt

The first one is probably easier to set up, but requires you to guess the 
installation names and paths correctly. The second option requires you to 
restructure your whole build system and adds considerable complexity due to the 
communication between your master-project and the external projects. For this 
communication I'd try the following:

- In the master project do all the feature-detection and setting of cache 
variables (such as options etc)
- Write a cache-initializer script to the binary tree
- Do all the ExternalProject_Add calls and specify the cache-initializer script 
with the -C option in CMAKE_ARGS
 
  

This suggestion is really interesting:the purpouse is to let any config  options in the 
master  projects to be passed to the slaves?
Have you any examples?



You could pass every single cache variable using -D in CMAKE_ARGS, but that 
becomes pretty tedious very soon... Currently I don't have any example, sorry.
  

from http://www.cmake.org/cmake/help/cmake-2-8-docs.html#opt:-Cinitial-cache
seems that what  you are suggesting is not  passing the master cache to 
the slaves, but to build a selection of variables and build a script in 
a different format
Do you suggesto to pass the same script to ALL the subprojects? I' ll 
try to find some examples of that usage.seems useful
  

I came up with a schema like 2:
any project is built as external, dependencies are resolved by  
ExternalProject_Add and I have used CMAKE_ARGS to communicate settings:
As most of cmake projects were based on FindXXX stuff for finding deps, I have 
overridden the necessary modules in order to make the projects find the good 
components at configure time.



That's what you could do with the cache-initialization script, no need to 
override the FindXXX modules. If more than one of the external projects use the 
same FindXXX module, do it in the master and then communicate the results using 
the initializer script. This way the user can easily override the results 
during the configure-step and get consistent results in all the sub-projects. 
Only thing that has me worried is when the user aborts the build, changes the 
settings in the master cache and then restarts the build. You'd need to somehow 
set up correct dependencies...
  
If the  cache-initialization script is single, then would be good that 
all the slave projects file_depends on that but do not know how to 
set a file dependency on the configure step of ExternalProject_Add

If sub-project B does a FIND_PACKAGE(A REQUIRED) and A is built as another 
sub-project, then you can specify A_DIR to the B project containing the path to 
the directory containing its A-config.cmake.
  
Yes, that would be good unfortunately not so many cmake projects 
builds xxx-config.cmake in their build-install process It would be 
nice to have good examples of usages:

this could be a  standard way of building dependencies throug cmake .

Is this ExternalProject_Add feature really used/developed?   I find it 
really nice but a little scared of weather it will be really supported 
and improved.
I have done some patching on it but not know if there is a group of 
user/developer eventually interested to submit mods to


Thanks
 Luigi

___
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


Re: [CMake] How to integrate autoconf based library into my cmake build tree

2010-03-01 Thread Luigi Calori

Michael Wild wrote:

On 1. Mar, 2010, at 4:10 , Albert Z wrote:

  

I just found that unless I explicitly include ExternalProject.cmak in my
cmake build, cmake won't find command ExternalProject_Add, which is pretty
weird for me.
include(/usr/local/share/cmake-2.8/Modules/ExternalProject.cmake)



Again:

include(ExternalProject)

will do... But then, the man-pages would tell you that.
  

The

ExternalProject.cmake contains the function ExternalProject_Add ... so 
you have to explicitly include it to have the function defined.


  

And now the problem is that if I use the following cmake script to build apr

  ExternalProject_Add(${LIB_NAME}
PREFIX /home/xxx/prj/trunk/external/apr/1.3.9
SOURCE_DIR /home/xxx/prj/trunk/external/apr/1.3.9
CONFIGURE_COMMAND /home/xxx/prj/trunk/external/apr/1.3.9/configure
--enable-static --disable-shared --disable-ipv6
BINARY_DIR /home/xxx/prj/trunk/external/apr/1.3.9/.libs/
BUILD_COMMAND make all
  )




You most probably don't want to use hard-coded paths, but something relative to 
either CMAKE_SOURCE_DIR or CMAKE_BINARY_DIR.
  

Correct, otherwise you ' ll have to change your cmake code whan move the
stuff


  

CMake complains

 error: no download info for 'apr' -- please specify existing SOURCE_DIR or
 one of URL, CVS_REPOSITORY and CVS_MODULE, SVN_REPOSITORY or
 DOWNLOAD_COMMAND

I have already specified the SOURCE_DIR, and I do not want the library is
downloaded online. Is it a bug of CMake? Or I have done something wrong?



Does SOURCE_DIR exist and contain the apr sources?

If I was you, I'd prefer to specify a URL to a tar-ball on the local system 
(e.g. ${CMAKE_SOURCE_DIR}/external/apr-1.3.9.tgz), point SOURCE_DIR to 
${CMAKE_BINARY_DIR}/external/apr and then let CMake to the rest.
  

If your source is alredy complete, try setting up DOWNLOAD_COMMAND 
Anyway, I agree it would be probably better specifying a URL (either
local or remote) like
URL http://apache.fastbull.org/apr/apr-1.3.9.tar.gz and let him do: it
is cleaner and easier.

Then if you have mods, you can specify a PATCH_COMMAND to apply your patches
If apr configure must be run in-source, specify

BUILD_IN_SOURCE 1

But in that case, if you do not have a download step, your source will 
be cluttered, so another good reason

to specify a URL

I' ll probably would add some configure based libs to my deps, If you 
are interested, I' ll let you know.


Luigi



Also, I might be wrong, but are you building in-source? If so, please don't and 
read http://www.cmake.org/Wiki/CMake_FAQ#Out-of-source_build_trees.

Michael

  

On Sun, Feb 28, 2010 at 5:45 PM, Albert Z amzproj...@gmail.com wrote:



Thanks, Luigi. However, I read the CMake 2.8 doc and tried to use function
ExternalProject_Add. When I ran cmake in the root of my project, I got the
following error

Unknown CMake command ExternalProject_Add

I tried on both linux and mac and got the same error. And I am sure the
version of the cmake is 2.8

Best,
Meng


On Sun, Feb 28, 2010 at 4:50 AM, Luigi Calori l.cal...@cineca.it wrote:

  

Albert Z wrote:



Hello,
Our project now uses a bunch of 3rd party libraries such as apr,
protobuf, libcurl, etc. Almost all of these libraries use autoconf (
configure.in http://configure.in) based build system. Since we have
some modifications to most of the libraries, we have to integrate these
libraries to our cmake build tree. What is the easiest way to integrate such
a 3rd-party library to a cmake build with keeping the maximum portability?

  

Try to look at ExternalProject module
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#module:ExternalProject
and page 10 of
http://www.kitware.com/products/archive/kitware_quarterly1009.pdf

I have used it (with some mods): it allow to automate download
pactch,build and install)
Anyway, curl have recently included a CMakeLists in its distribution. I
have used it even if had to apply some patches.
I am trying to collect some cmake build recipes for some libraries I need.
If you are interested, grab the stuff at
bzr branch http://3d.cineca.it/storage/bazaar_repo/CmakeDeps/lib

HTH

Luigi




___
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

Re: [CMake] How to integrate autoconf based library into my cmake build tree

2010-03-01 Thread Luigi Calori

Hi David, I have done some experimental work on improving ExternalProject
I worked a bit on avoiding downloads, keeping a single source in 
Release/Debug under Visual Studio and adding

Bazaar repo and  zip unpacking.
Could this be on some interest?
In case, which is the preferred method of providing patches?
The code is
http://3d.cineca.it/storage/bazaar_repo/CmakeDeps/lib/wt/CMakeModules/ExternalProject.cmake
I think my version does not breaks usage, but not really sure, as I just 
used it in my project.


Thanks in advance

Luigi




David Cole wrote:

This recently submitted bug is probably related:
http://public.kitware.com/Bug/view.php?id=10346

I have not had a chance to investigate yet, but it sounds like you are 
not alone in experiencing the no download given error when 
specifying a SOURCE_DIR...


Keep an eye on that bug for future updates.


David



On Mon, Mar 1, 2010 at 3:35 AM, Luigi Calori l.cal...@cineca.it 
mailto:l.cal...@cineca.it wrote:


Michael Wild wrote:

On 1. Mar, 2010, at 4:10 , Albert Z wrote:

 


I just found that unless I explicitly include
ExternalProject.cmak in my
cmake build, cmake won't find command
ExternalProject_Add, which is pretty
weird for me.
include(/usr/local/share/cmake-2.8/Modules/ExternalProject.cmake)
   



Again:

include(ExternalProject)

will do... But then, the man-pages would tell you that.
 


The

ExternalProject.cmake contains the function ExternalProject_Add
... so you have to explicitly include it to have the function
defined.


 


And now the problem is that if I use the following cmake
script to build apr

 ExternalProject_Add(${LIB_NAME}
   PREFIX /home/xxx/prj/trunk/external/apr/1.3.9
   SOURCE_DIR /home/xxx/prj/trunk/external/apr/1.3.9
   CONFIGURE_COMMAND
/home/xxx/prj/trunk/external/apr/1.3.9/configure
--enable-static --disable-shared --disable-ipv6
   BINARY_DIR /home/xxx/prj/trunk/external/apr/1.3.9/.libs/
   BUILD_COMMAND make all
 )

   



You most probably don't want to use hard-coded paths, but
something relative to either CMAKE_SOURCE_DIR or CMAKE_BINARY_DIR.
 


Correct, otherwise you ' ll have to change your cmake code whan
move the
stuff


 


CMake complains

 error: no download info for 'apr' -- please specify
existing SOURCE_DIR or
 one of URL, CVS_REPOSITORY and CVS_MODULE, SVN_REPOSITORY or
 DOWNLOAD_COMMAND

I have already specified the SOURCE_DIR, and I do not want
the library is
downloaded online. Is it a bug of CMake? Or I have done
something wrong?
   



Does SOURCE_DIR exist and contain the apr sources?

If I was you, I'd prefer to specify a URL to a tar-ball on the
local system (e.g.
${CMAKE_SOURCE_DIR}/external/apr-1.3.9.tgz), point SOURCE_DIR
to ${CMAKE_BINARY_DIR}/external/apr and then let CMake to the
rest.
 


If your source is alredy complete, try setting up DOWNLOAD_COMMAND 
Anyway, I agree it would be probably better specifying a URL (either
local or remote) like
URL http://apache.fastbull.org/apr/apr-1.3.9.tar.gz and let him do: it
is cleaner and easier.

Then if you have mods, you can specify a PATCH_COMMAND to apply
your patches
If apr configure must be run in-source, specify

BUILD_IN_SOURCE 1

But in that case, if you do not have a download step, your source
will be cluttered, so another good reason
to specify a URL

I' ll probably would add some configure based libs to my deps, If
you are interested, I' ll let you know.

Luigi



Also, I might be wrong, but are you building in-source? If so,
please don't and read
http://www.cmake.org/Wiki/CMake_FAQ#Out-of-source_build_trees.

Michael

 


On Sun, Feb 28, 2010 at 5:45 PM, Albert Z
amzproj...@gmail.com mailto:amzproj...@gmail.com wrote:

   


Thanks, Luigi. However, I read the CMake 2.8 doc and
tried to use function
ExternalProject_Add. When I ran cmake in the root of
my project, I got the
following error

Unknown CMake command ExternalProject_Add

I tried on both linux and mac and got the same error.
And I am sure the
version of the cmake is 2.8

Best,
Meng


On Sun, Feb 28, 2010 at 4:50 AM, Luigi Calori
l.cal...@cineca.it mailto:l.cal...@cineca.it wrote

Re: [CMake] How to integrate autoconf based library into my cmake build tree

2010-02-28 Thread Luigi Calori

Albert Z wrote:

Hello,
  Our project now uses a bunch of 3rd party libraries such as apr, 
protobuf, libcurl, etc. Almost all of these libraries use autoconf 
(configure.in http://configure.in) based build system. Since we have 
some modifications to most of the libraries, we have to integrate 
these libraries to our cmake build tree. What is the easiest way to 
integrate such a 3rd-party library to a cmake build with keeping the 
maximum portability?

Try to look at ExternalProject module
http://www.cmake.org/cmake/help/cmake-2-8-docs.html#module:ExternalProject
and page 10 of 
http://www.kitware.com/products/archive/kitware_quarterly1009.pdf


I have used it (with some mods): it allow to automate download 
pactch,build and install)
Anyway, curl have recently included a CMakeLists in its distribution. I 
have used it even if had to apply some patches.

I am trying to collect some cmake build recipes for some libraries I need.
If you are interested, grab the stuff at
bzr branch http://3d.cineca.it/storage/bazaar_repo/CmakeDeps/lib

HTH

Luigi




___
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


Re: [CMake] overriding CMAKE_MODULE_PATH list

2010-02-21 Thread Luigi Calori

Alexander Neundorf wrote:

On Friday 19 February 2010, Luigi Calori wrote:
  

I would like to have some clarification about module and include
effective search order:

I am in the following situation:

I use (configure) a project that is overriding some CMake standard Find
modules by doing in his main CMakeLists.txt file:

SET(CMAKE_MODULE_PATH ProjectModuleFolder;${CMAKE_MODULE_PATH})

I would like to being able to override, at configure time the project
modules with mine.



Then the project may get some find-modules which behave differently than what 
it expects. Why do you want to do this ?
  
I am currently working on building a higher level project that combines, 
using ExternalProjectAdd, the project (OpenSceneGraph) and some of its 
dependencies.
As I am building deps, I would  like to change the way the projects find 
my deps, and so the need to instruct OSG to use my Find commands.
This would also allow more flexible build customization without need to 
patch OSG.
Currently OpenSceneGraph relies upon standard unix deps on Linux and 
probably OSX and use pre-built deps on Windows.
This needs different deps be built depending on compiler version 
(VC7,VC8,VC9,VC10,Mingw, 32/64) as on windows, even the most common dep 
libs (zlib,png,jpeg,freetype,curl) are not available.

I would also like to build static libs if possible


Doing:
cmake -DCMAKE_MODULE_PATH:PATH=myModuleFolder
does not work (my files are searched AFTER projects files)



Yes, because the other project appends its apth to the already existing one, 
so your ends up at the end.


  

Is it safe to just change project CMakeLists.txt to
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH};ProjectModuleFolder)

Or, on older CMake version this could result in getting standard CMake
modules found first?



Everything in CMAKE_MODULE_PATH will be searched before cmake's own module 
directory.
  
Thanks, so suggesting this change to the main project should not harm 
other builds, based on older CMake version?

It just allows a grater configurability.

Thanks
Luigi
___
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


[CMake] overriding CMAKE_MODULE_PATH list

2010-02-19 Thread Luigi Calori
I would like to have some clarification about module and include 
effective search order:


I am in the following situation:

I use (configure) a project that is overriding some CMake standard Find 
modules by doing in his main CMakeLists.txt file:


SET(CMAKE_MODULE_PATH ProjectModuleFolder;${CMAKE_MODULE_PATH})

I would like to being able to override, at configure time the project 
modules with mine.


Doing:
cmake -DCMAKE_MODULE_PATH:PATH=myModuleFolder
does not work (my files are searched AFTER projects files)

Is it safe to just change project CMakeLists.txt to
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH};ProjectModuleFolder)

Or, on older CMake version this could result in getting standard CMake 
modules found first?


Otherwise I have to propose a safer patch like:

set(USER_MODULE_PATH  CACHE PATH set this to define a folder for 
module override)

if(USER_MODULE_PATH)
   set(CMAKE_MODULE_PATH 
${USER_MODULE_PATH};ProjectModuleFolder;${CMAKE_MODULE_PATH})

else(USER_MODULE_PATH)
   set(CMAKE_MODULE_PATH ProjectModuleFolder;${CMAKE_MODULE_PATH})
endif(USER_MODULE_PATH)


Thanks in advance

Luigi


___
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


Re: [CMake] How to avoid continuous download while using ExternalProjects

2010-02-11 Thread Luigi Calori

Hi Philip

Philip Lowman wrote:

On Wed, Feb 10, 2010 at 11:37 AM, David Cole david.c...@kitware.com wrote:
  

If anybody has other ideas to share downloads between Release and Debug
configurations, or other ways to avoid unnecessary downloads better, or
other ideas for any ExternalProject improvement, I'm all ears. :-)



Caching for source tarballs would be a nice feature so that when you
clean the project you don't have to redownload them.  I pulled this
off with stamp files in CMakePorts I think with some suggestions from
you.  The problem of course is if you really want to remove the
downloads you need yet another target.
  

I'm trying to experiment with this...
What I do not really catch is why the file dependencies are set up using 
stamp files instead of real downloaded files.
Probably more insight on how CMake is treating dependendencies at file 
and target level seem really needed.

Also, for any that are interested, beta releases of zlib now have a
CMakeLists.txt in them.  It could use testing on Mac OSX and other
unix systems.
http://zlib.net/current/beta/
  
Did you tried that? I' did but seem to have a strange error on linking 
their examples:

I got
zlib.lib(gzlib.obj) : error LNK2019: unresolved external symbol 
_snprintf referenced in function _gzdopen


that seem to get away by adding
#  define snprintf _snprintf
to gzguts.h
Anyone has ever tested it under MSVC? It would be nice to have helpers 
to build patches, as in CMakePorts...


  


___
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


[CMake] How to avoid continuous download while using ExternalProjects

2010-02-10 Thread Luigi Calori
I' m trying to develop a project for building several lib dependencies 
using ExternalProjectAdd


Is there a way to avoid re-download of upstream tar.gz while developing 
config flags?


ANY examples of ExternalProjectAdd would REALLY welcome

Thanks in advance.

Luigi


___
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


Re: [CMake] How to avoid continuous download while using ExternalProjects

2010-02-10 Thread Luigi Calori


Hi Michael:

They are more or less something like:


ExternalProject_Add(
   ${PACKAGE}
   SOURCE_DIR ${BASE_SOURCE}/${PACKAGE}/src
   BINARY_DIR ${BASE_BUILD}/${PACKAGE}/build
   INSTALL_DIR ${CMAKE_INSTALL_PREFIX}
   URL http://www.zlib.net/zlib-1.2.3.tar.gz
   PATCH_COMMAND ${CMAKE_COMMAND} -E copy 
${Package_Dir}/Patch/CMakeLists.txt SOURCE_DIR/CMakeLists.txt

   CMAKE_COMMAND ${CMAKE_COMMAND}
   CMAKE_ARGS
   ${Package_std_cmake_args}
)


The problem is that I do not know how to easily issue a re-build without 
a re-download:
The steps are always done, even if there is something broken in the 
configure or build step, so if I just clean the whole project, the 
download happen again, even if the (patched)source dir is already there.


I am working in MSVC9, from the master project, a download is re-issued 
even whn I switch from debug to release (i think because stamp file are 
config dependent)


Thanks in advance.

Luigi


Michael Wild wrote:

On 10. Feb, 2010, at 14:57 , Luigi Calori wrote:

  

I' m trying to develop a project for building several lib dependencies using 
ExternalProjectAdd

Is there a way to avoid re-download of upstream tar.gz while developing config 
flags?

ANY examples of ExternalProjectAdd would REALLY welcome

Thanks in advance.

Luigi



That's strange, this doesn't happen in my projects...

Can you show an example of your ExternalProject_Add calls?

Michael

  


___
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


Re: [CMake] How to avoid continuous download while using ExternalProjects

2010-02-10 Thread Luigi Calori

David Cole wrote:
If you want to trigger a rebuild of any given step (and later steps) 
for an ExternalProject, simply open up the project folder in Visual 
Studio, so you can see the list of steps. Right click on the step you 
want to re-do and tell Visual Studio to compile the step.


With custom build steps, compiling is executing the custom command 
for the step. If you re-execute an earlier step in the chain, all the 
subsequent steps should also rebuild because of the dependencies among 
the stamp files.

I had already found that.. It is indeed working, the problem is that the
stamp files for config,build and install are set up even if there are
errors in the step, so rebuilding as a whole does not work and I need to
compile the individual steps


This is a finer-grained way to get the same effect you got from the 
clean without re-executing the download step.

I would really like to just have it working as other targets


If you want to avoid re-executing the download step, then you have to 
avoid using clean or you have to move the download step to something 
truly external.

Have you any example of that? I was also trying to separate the two
project in download+patch and configure+build+install  but did not
had uccess in building a good dependency chain (it has to be file-level)


One idea might be to add a chain of external projects that *only* do 
download steps, and make each of your configure/build/install external 
projects depend on *that* download-only external project.

Yes.. but how do I chain on FILES ... not on targets, I need a step that
produce something so when i clean from the main project the already
downloaded+patched sources stay there, and require explicit (manual) delete



If anybody has other ideas to share downloads between Release and 
Debug configurations, or other ways to avoid unnecessary downloads 
better, or other ideas for any ExternalProject improvement, I'm all 
ears. :-)

could the stamp files for the source (download+patch) be put in a
folder not dependent on Release and Debug ?

Anyway, tahnks a lot for providing the feature, any example available to
learn best practice usage really welcomed...

I had also to add a small patch to avoid bad downloads cases:  there
were some url that were downloadable with wget but not with cmake file
download..
that was apparently successful but the downloaded file was zero length...
I added a workaround: check the file legth and try with wget if too
short
Probably better to allow for different url and wget download option...
if multiple url are specified, repeat download step on failure?




HTH,
David


On Wed, Feb 10, 2010 at 10:40 AM, Michael Wild them...@gmail.com 
mailto:them...@gmail.com wrote:



On 10. Feb, 2010, at 15:37 , Luigi Calori wrote:


 Hi Michael:

 They are more or less something like:


 ExternalProject_Add(
   ${PACKAGE}
   SOURCE_DIR ${BASE_SOURCE}/${PACKAGE}/src
   BINARY_DIR ${BASE_BUILD}/${PACKAGE}/build
   INSTALL_DIR ${CMAKE_INSTALL_PREFIX}

I don't think this is correct! The INSTALL_DIR should be IMHO in
the build-tree. Otherwise the files will be installed into the
system while building (which, apart from being very bad practice,
might fail if the user doesn't have the rights to write in this
location).

   URL http://www.zlib.net/zlib-1.2.3.tar.gz
   PATCH_COMMAND ${CMAKE_COMMAND} -E copy
${Package_Dir}/Patch/CMakeLists.txt SOURCE_DIR/CMakeLists.txt
   CMAKE_COMMAND ${CMAKE_COMMAND}
   CMAKE_ARGS
   ${Package_std_cmake_args}
 )


 The problem is that I do not know how to easily issue a re-build
without a re-download:
 The steps are always done, even if there is something broken in
the configure or build step, so if I just clean the whole project,
the download happen again, even if the (patched)source dir is
already there.

Does it also happen if you just re-build without the clean step?
Probably the stamp files get removed by the clean... Usually it
should not be necessary to do a clean when developing.


 I am working in MSVC9, from the master project, a download is
re-issued even whn I switch from debug to release (i think because
stamp file are config dependent)

Hmm. Haven't tried using a multi-config IDE so far. Are the
stamp-files in a configuration-specific subdirectory? What's the
value of BASE_SOURCE?


 Thanks in advance.

 Luigi


 Michael Wild wrote:
 On 10. Feb, 2010, at 14:57 , Luigi Calori wrote:


 I' m trying to develop a project for building several lib
dependencies using ExternalProjectAdd

 Is there a way to avoid re-download of upstream tar.gz while
developing config flags?

 ANY examples of ExternalProjectAdd would REALLY welcome

 Thanks in advance.

 Luigi


 That's strange, this doesn't happen in my

[CMake] How to findXXX libraries with debug suffix

2010-02-09 Thread Luigi Calori
Is there a way to instruct FindXXX modules to produce variables that 
have different linking in debug and release?


I am producind a lib with suffix D (zlib) in an  ExternalProjetAdd, 
target.It gets installed correctly in debug (which is the default for VS 
cmake--build)
This zlibD.lib does not get found when other projects subsequently 
issues a find_package(ZLIB )


Are there Find modules that supports debug/release?

Any example of this usage pattern?

Thanks

Luigi
___
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


Re: [CMake] How to findXXX libraries with debug suffix

2010-02-09 Thread Luigi Calori
(EXPAT_XMLWF_PROG
NAMES ${EXPAT_XMLWF_PROG_NAME}
PATHS ${EXPAT_BIN_SEARCH_DIRS}
NO_DEFAULT_PATH
)
MARK_AS_ADVANCED(EXPAT_XMLWF_PROG)

IF (EXPAT_DEBUG)
MESSAGE(STATUS EXPAT_INCLUDE_DIR: ${EXPAT_INCLUDE_DIR})
MESSAGE(STATUS EXPAT_LIBRARY_DEBUG: ${EXPAT_LIBRARY_DEBUG})
MESSAGE(STATUS EXPAT_LIBRARY_RELEASE: ${EXPAT_LIBRARY_RELEASE})
MESSAGE(STATUS CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE})
endif(EXPAT_DEBUG)

ADJUST_LIB_VARS(EXPAT)

# MESSAGE( STATUS EXPAT_LIBRARY: ${EXPAT_LIBRARY})

# Copy the results to the output variables.
IF(EXPAT_INCLUDE_DIR AND EXPAT_LIBRARY)
  SET(EXPAT_FOUND 1)
  SET(EXPAT_LIBRARIES ${EXPAT_LIBRARY})
  SET(EXPAT_INCLUDE_DIRS ${EXPAT_INCLUDE_DIR})
  IF (EXPAT_LIBRARY_DEBUG)
GET_FILENAME_COMPONENT(EXPAT_LIBRARY_PATH ${EXPAT_LIBRARY_DEBUG} PATH)
SET(EXPAT_LIB_DIR  ${EXPAT_LIBRARY_PATH})
  ELSEIF(EXPAT_LIBRARY_RELEASE)
GET_FILENAME_COMPONENT(EXPAT_LIBRARY_PATH ${EXPAT_LIBRARY_RELEASE} PATH)
SET(EXPAT_LIB_DIR  ${EXPAT_LIBRARY_PATH})
  ENDIF(EXPAT_LIBRARY_DEBUG)

  IF (EXPAT_XMLWF_PROG)
GET_FILENAME_COMPONENT(EXPAT_BIN_PATH ${EXPAT_XMLWF_PROG} PATH)
SET(EXPAT_BIN_DIR  ${EXPAT_BIN_PATH})
  ENDIF (EXPAT_XMLWF_PROG)

ELSE(EXPAT_INCLUDE_DIR AND EXPAT_LIBRARY)
  SET(EXPAT_FOUND 0)
  SET(EXPAT_LIBRARIES)
  SET(EXPAT_INCLUDE_DIRS)
ENDIF(EXPAT_INCLUDE_DIR AND EXPAT_LIBRARY)

# Report the results.
IF(NOT EXPAT_FOUND)
  SET(EXPAT_DIR_MESSAGE
EXPAT was not found. Make sure EXPAT_LIBRARY and
EXPAT_INCLUDE_DIR are set or set the EXPAT_INSTALL environment
variable.)
  IF(NOT EXPAT_FIND_QUIETLY)
MESSAGE(STATUS ${EXPAT_DIR_MESSAGE})
  ELSE(NOT EXPAT_FIND_QUIETLY)
IF(EXPAT_FIND_REQUIRED)
  # MESSAGE(FATAL_ERROR ${EXPAT_DIR_MESSAGE})
  MESSAGE(FATAL_ERROR Expat was NOT found and is Required by this project)
ENDIF(EXPAT_FIND_REQUIRED)
  ENDIF(NOT EXPAT_FIND_QUIETLY)
ENDIF(NOT EXPAT_FOUND)


IF (EXPAT_FOUND)
  INCLUDE(CheckSymbolExists)
  #
  # Find out if EXPAT was build using dll's
  #
  # Save required variable
  SET(CMAKE_REQUIRED_INCLUDES_SAVE ${CMAKE_REQUIRED_INCLUDES})
  SET(CMAKE_REQUIRED_FLAGS_SAVE${CMAKE_REQUIRED_FLAGS})
  # Add EXPAT_INCLUDE_DIR to CMAKE_REQUIRED_INCLUDES
  SET(CMAKE_REQUIRED_INCLUDES
${CMAKE_REQUIRED_INCLUDES};${EXPAT_INCLUDE_DIRS})

  CHECK_SYMBOL_EXISTS(EXPAT_BUILT_AS_DYNAMIC_LIB expat_config.h
HAVE_EXPAT_DLL)

IF (HAVE_EXPAT_DLL STREQUAL TRUE)
SET (HAVE_EXPAT_DLL 1)
ENDIF (HAVE_EXPAT_DLL STREQUAL TRUE)

  # Restore CMAKE_REQUIRED_INCLUDES and CMAKE_REQUIRED_FLAGS variables
  SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES_SAVE})
  SET(CMAKE_REQUIRED_FLAGS${CMAKE_REQUIRED_FLAGS_SAVE})
  #
  #

ENDIF (EXPAT_FOUND)

--8


_
Mike Jackson  mike.jack...@bluequartz.net
BlueQuartz Softwarewww.bluequartz.net
Principal Software Engineer  Dayton, Ohio



On Tue, Feb 9, 2010 at 7:10 AM, Luigi Calori l.cal...@cineca.it wrote:
  

Is there a way to instruct FindXXX modules to produce variables that have
different linking in debug and release?

I am producind a lib with suffix D (zlib) in an  ExternalProjetAdd,
target.It gets installed correctly in debug (which is the default for VS
cmake--build)
This zlibD.lib does not get found when other projects subsequently issues a
find_package(ZLIB )

Are there Find modules that supports debug/release?

Any example of this usage pattern?

Thanks

Luigi
___
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


[CMake] Hint on usage of ExternalProject_Add

2010-02-05 Thread Luigi Calori

Hi everybody, first sorry for the long intro,

SKIP

I' m trying to build up a project that assembles different components, 
all open source and portable.
The main component is OpenSceneGraph that heavily relies on FindXXX to 
do configure time inspection and conditionally build plug ins.
I am trying to build up an application (browser plug in) that bundles my 
code,  OSG, and other plugins and their deps.
I have to pack it as a package that has as few external deps as 
possible, so i would like either to build static or to provide most of 
the dll/so I would also provide a transparent and easy way to build the 
package from original upstream sources of components: sou would like to 
restrict at minimum inclusion of externally build binary components.
For these reasons I have started to look at recently added  
ExternalProject_Add macro
As the deps are quite few and change in versions, way of building, etc 
etc, I was thinking to organize them in separate folders, specific for 
dep and version, placing each ExternalProject_Add into an individual 
CMakeLists.txt, alongside with Patch files and so on.
All the installation step of ExternalProject_Add should put stuff in a 
common place that should be searched first by FindXXX or configure
Any comment or hint for the whole task really welcome, I' ve also used 
and borrowed code  from cmakeports project on google code, that seem on 
hold now and somehow superseded by ExternalProject approach

Now some specific questions

SKIP

some examples of ExternalProject_Add usage

Hints on deal with download-unpack-patch to separate the source 
assembling phase to the build phase,
(currently, visual studio projects issues re-download,unpack and patch 
when switching from Release to Debug)


How to force FindXXX commands to search FIRST in my install place and 
AFTER on system places:

i have added
-DCMAKE_INSTALL_PREFIX:PATH=INSTALL_DIR
-DCMAKE_PREFIX_PATH:PATH=INSTALL_DIR
to CMAKE_ARGS, it is working on windows but on Linux, for example, 
find_package(ZLIB )

get include from INSTALL_DIR and ZLIB_LIBRARY from /usr/lib64

Thanks a lot in advance

Luigi


___
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


Re: [CMake] CMake 2.8.0 RC 1 ready for testing!

2009-09-28 Thread Luigi Calori

Bill Hoffman wrote:

I am happy to announce that CMake 2.8.0 has entered the beta stage! You
can find the source and binaries here: http://www.cmake.org/files/v2.8/.


-

- New External Project Module.  The 'ExternalProject_Add' function
  creates a custom target to drive download, update/patch, configure,
  build, install and test steps of an external project.

Really interested in trying this new feature: Any example project available?
Is it intended to be used for CMake based project only or even project
based on other tools?

Thanks in advance

Luigi



___
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


Re: [CMake] Set output path without additional Debug/Release at the end

2009-04-24 Thread Luigi Calori

I use a hack like this:

  SET_TARGET_PROPERTIES(target  PROPERTIES RUNTIME_OUTPUT_DIRECTORY 
your_exe_dir )
  SET_TARGET_PROPERTIES(target PROPERTIES LIBRARY_OUTPUT_DIRECTORY 
your_lib_dir )


  IF(MSVC_IDE)
  SET_TARGET_PROPERTIES(target  PROPERTIES PREFIX ../)

  or if you prefer

   SET_TARGET_PROPERTIES(target PROPERTIES RELEASE_OUTPUT_NAME 
../${TARGET_NAME})
   SET_TARGET_PROPERTIES(target PROPERTIES DEBUG_OUTPUT_NAME 
../${TARGET_NAME}D)



  ENDIF(MSVC_IDE)

Not sure if you can use ${CMAKE_CFG_INTDIR} in SET commands though

Hope it helps


Andreas ha scritto:

Dear CMake users,
 
I would like to set the output path of my library to

C:/name1/Debug/name2/  (debug configuration) and
C:/name1/Release/name2/  (release configuration).
 
If I use

SET(LIBRARY_OUTPUT_PATH  D:/name1/${CMAKE_CFG_INTDIR}/name2/)
an additional Debug / Release is added at the end of the path (-- 
C:/name1/Debug/name2/Debug).
 
Is there any way *not to add an additional* Debug / Release at the end?
 
Thanks,

Andreas


___
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


Re: [CMake] open source project for CMake ports?

2009-02-17 Thread Luigi Calori

Bill Hoffman ha scritto:

Philip Lowman wrote:



For the first cut I think starting out with keeping the CMakified 
sources in the project would be fine.  Many people are never going to 
want anything more complicated than this and we know that this will 
at least work for now.


CMake can already untar with -E mode.  Adding download support 
wouldn't be too bad.  Not sure how you would handle patching though.  
A nicer solution than above would be storing the original tarball + 
patch in the CM of your project and then having CMake untar + apply 
it at configure time.  Then you could optionally add download support 
on top of that for anyone that wants the ability of their project to 
properly to build to depend on some server out there in the cloud 
(not me).



I agree depending on external server at build time sounds unreliable,
but this sis exactly what any distribution tools like portage, apt, rpm do.
I really do not like to have copies of modified sources around: I would
just have a common way of specifying build recipes, including download,
versioning and patches.
In CVS CMake the file command can download files already (file 
DOWNLOAD).  We are working on some projects that will need to do 
things like this at Kitware.  There is also a bug here:


http://public.kitware.com/Bug/view.php?id=8471

It somewhat relates to this issue.

InterestingI 've also seen in CVS some support for including
external projects (module AddExternalProject.cmake) is it something related?
The windows port of gentoo portage ebuild command used in kde windows is
something has similar characteristic, it is based on Python though and
uses CMake for just few
of the builds.
Also Google is moving in build system fields, see:
http://code.google.com/p/swtoolkit/
unfortunately it seems to support just scons

Let me know  i would be glad to contribute

Luigi







___
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


Re: [CMake] open source project for CMake ports?

2009-02-16 Thread Luigi Calori

Alexander Neundorf ha scritto:

On Monday 16 February 2009, Philip Lowman wrote:
  

Hi,

Luigi suggested a kind of CMake ports system in a recent thread here on the
CMake mailing list.  This would presumably be a system whereby popular 3rd
party dependencies which have not yet CMakeified their source trees could
be CM'd and baselined in one place and ultimately downloaded for easy
incorporation into CMake projects (especially with a goal towards
MSVC/MinGW portability).  VTK seems to be doing this internally for several
of it's dependencies and the OSG project seems interested in doing the same
for similar reasons but would prefer not to duplicate a bunch of work. 



I think also the KDE-on-Windows developer cmakeified a few projects.
  
I' ve checked out the project, it is really inetresting, I' ve tried 
their emerge utility (a kind of a port of the Gentoo portage tools on 
windows)
It seems it is able to keep a list of packeges and their dependencies 
and can handle different compiler platforms like mingw, msvc8, msvc9
Regarding CMake, it use it for some libs but not all (libcurl,libjasper 
is built with cmake, tiff, and jpeg seems not).


  

Since many of the dependencies overlap, is there general interest in this
kind of a thing from the VTK perspective or from others?

The goal would be to create an open-source project (hosted probably at a
neutral site like SF.net or Google Code) where the ports could be stored,
baselined, etc. and then released so that anyone could download whichever
are needed and incorporate them into their own projects?  Export/Install



You suggest to keep a whole copy of these projects there, not only the build 
files, right ?
  


KDE-on-Windows keeps the cmake separated, in the package definition, that keep 
the url to where get thezipped source.
The process is then to get, uncompress, patch ,configure, build and install.
These step are described and implemented in python scripts. It seems that the 
CMakeList are added in the expanded package.

In my attempt to provide basic dependencies for OpenSceneGraph, I used a 
similar approach.
I kept the cmake in a completely separated place, developed  cmake code for 
download and expansion.

 this current, i.e. they will more or less quickly 
become out-of-date (happened to me with python).
  
I do not see value in keeping sources (as VTK does) apart from avoid the 
download-expand step.
If the cmake scripts use glob rex expr to get source files, it should be 
quite resilient to project change and should be easier to mantain.
I think that having cmake  support for download,unpack and patch would 
really help.


Thanks
  Luigi

Alex
___
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


Re: [CMake] MSVC7.1 static link question

2009-02-13 Thread Luigi Calori

Philip Lowman ha scritto:
On Thu, Feb 12, 2009 at 11:43 AM, Luigi Calori l.cal...@cineca.it 
mailto:l.cal...@cineca.it wrote:


Philip Lowman ha scritto:

   add_library(baz STATIC IMPORTED)
   set_target_properties(baz PROPERTIES
  IMPORTED_LOCATION_RELEASE
${CMAKE_CURRENT_SOURCE_DIR}/libbaz.a
  IMPORTED_LOCATION_DEBUG  
${CMAKE_CURRENT_SOURCE_DIR}/libbazd.a)


   add_library(bar STATIC IMPORTED)
   set_target_properties(bar PROPERTIES
  IMPORTED_LOCATION_RELEASE
${CMAKE_CURRENT_SOURCE_DIR}/libbar.a
  IMPORTED_LOCATION_DEBUG  
${CMAKE_CURRENT_SOURCE_DIR}/libbard.a

  IMPORTED_LINK_INTERFACE_LIBRARIES baz) # -- dependency
is here

I' ma bit confused, just to make clear: the proposed import method
 are used in the  final projects that USES the libraries.
by install(EXPORT) the needed code is hidden in a
config--baz--cmake file that is evaluated inby the final project
tha so does not have to rely on FindBAZ script.
But effectively this is just a way to hide the fact that  the
final project  links to both libbaz and libbar

The specification of dependency lib as a STATIC_LIBRARY_FLAGS
produce a bigger library tha has both baz and bar, and can be used
straight, at least under VS7.1

I appreciate the IMPORT and EXPORT stuff and will try to use that
(could we use that also for the whole OpenSceneGraph itself ? what
do you think Philip?)
Nevertheless the STATIC_LIBRARY_FLAGS seems much simpler


Not to take things too off-topic, but I actually like the idea of 
building libjpeg, libtiff, libpng, and even libfreetype within the OSG 
itself just like VTK does, but building them only on Windows platforms 
(especially since Kitware has already CMakeified them).  If Robert 
has concerns about tarball size these could always be located in a 
separate tarball for releases that Windows users would have to 
download separately.  For Linux, though, I think it would be a mistake 
to build these libraries since 99% of distributions have them anyways 
and they are well maintained with bugfixes and security patches.

As I work on vs7.1 I had to cmakify tha basic libs and build from sources.
I currently have a cmake project for building statically:

tiff-3.7.4
zlib-1.2.3
libpng-1.2.24
jpeg-6b
freetype-2.3.5
curl-7.18.1

Looking at CVS vtk site seems that theyr tiff is more recent (3.8.2)
regarding the other, is quite difficult to see the versions.
I' ve tried to keep the lib themself separated from the CMake, so I get 
the zip, uncompress in a separate folder and then build.
I also think it would be be better to provide a separate project for 
deps, probably using EXPORT/IMPORT stuff

I do not know if VTK utils can be built alone without building VTK.
It would be really nice to have a standard way to package source 
through CMake, like a cross platform portage.


This would get you what you want on WIN32 anyways which is being able 
to use the libraries statically while at the same time it would reduce 
the burden on maintaining the 3rdPartyDeps solution for OSG for every 
possible way of compiling with Visual Studio 7.1, 8.0, or 9.0 (and by 
the way, would you like /MT or /MD with that?).


In regards to your question though,

IMPORT/EXPORT looks very interesting for CMake projects, but I really 
haven't used it in this context yet or for importing external 
dependencies (other than bar and baz) to have an opinion on the 
matter.  :)   I think Bill has some good points about portability.  I 
didn't completely understand what you needed STATIC_LIBRARY_FLAGS 
for.  In fact part of me still doesn't as I've never needed to clump 
static libraries together for convenience in any of the projects I 
work on.
The question I've posed comes from the fact that I would like to compile 
myself the dependencies in a way that mimick OSG Mike prebuilt libs.

As I do have to pack everyting in a firefox plugin I prefer static linking.
The problem is that without using  STATIC_LIBRARY_FLAGS hack I obtain a 
tiff lib that need jpeg and zlib specified on the link line, and so the 
linkage is not consistent to

everyone else.

Regards
 Luigi
___
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


Re: [CMake] MSVC7.1 static link question

2009-02-12 Thread Luigi Calori

Philip Lowman ha scritto:
On Wed, Feb 11, 2009 at 8:54 AM, Brad King brad.k...@kitware.com 
mailto:brad.k...@kitware.com wrote:


Philip Lowman wrote:

On Tue, Feb 10, 2009 at 1:01 PM, Brad King
brad.k...@kitware.com mailto:brad.k...@kitware.comCMake
2.6 makes it easy to export targets from one project (either its

   build tree or install tree) for use by another project.

Is this the easiest way to register dependencies of IMPORTED
static libraries against each other?  I'm just curious if
there are plans to make target_link_libraries() work for this
or is there a technical problem allowing it?


I do not plan to allow target_link_libraries for this.  One must use
IMPORTED_LINK_INTERFACE_LIBRARIES.  However, it is easier than your
example makes it because the property can name other imported
targets:


add_library(baz STATIC IMPORTED)
set_target_properties(baz PROPERTIES
   IMPORTED_LOCATION_RELEASE ${CMAKE_CURRENT_SOURCE_DIR}/libbaz.a
   IMPORTED_LOCATION_DEBUG   ${CMAKE_CURRENT_SOURCE_DIR}/libbazd.a)

add_library(bar STATIC IMPORTED)
set_target_properties(bar PROPERTIES
   IMPORTED_LOCATION_RELEASE ${CMAKE_CURRENT_SOURCE_DIR}/libbar.a
   IMPORTED_LOCATION_DEBUG   ${CMAKE_CURRENT_SOURCE_DIR}/libbard.a
   IMPORTED_LINK_INTERFACE_LIBRARIES baz) # -- dependency is here

I' ma bit confused, just to make clear: the proposed import method  are 
used in the  final projects that USES the libraries.
by install(EXPORT) the needed code is hidden in a config--baz--cmake 
file that is evaluated inby the final project tha so does not have to 
rely on FindBAZ script.
But effectively this is just a way to hide the fact that  the final 
project  links to both libbaz and libbar


The specification of dependency lib as a STATIC_LIBRARY_FLAGS produce a 
bigger library tha has both baz and bar, and can be used straight, at 
least under VS7.1


I appreciate the IMPORT and EXPORT stuff and will try to use that (could 
we use that also for the whole OpenSceneGraph itself ? what do you think 
Philip?)

Nevertheless the STATIC_LIBRARY_FLAGS seems much simpler

Thanks


Yes, thanks for pointing that out, that is much simpler.

Note if the outside project is also created by CMake, the
install(EXPORT)
feature can generate the proper import code for it.

 
Yes, I hope to play with that feature soon.  Thanks.


--
Philip Lowman



___
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


Re: [CMake] MSVC7.1 static link question

2009-02-12 Thread Luigi Calori

Bill Hoffman ha scritto:

Luigi Calori wrote:

I' ma bit confused, just to make clear: the proposed import method  
are used in the  final projects that USES the libraries.
by install(EXPORT) the needed code is hidden in a config--baz--cmake 
file that is evaluated inby the final project tha so does not have to 
rely on FindBAZ script.
But effectively this is just a way to hide the fact that  the final 
project  links to both libbaz and libbar


The specification of dependency lib as a STATIC_LIBRARY_FLAGS produce 
a bigger library tha has both baz and bar, and can be used straight, 
at least under VS7.1


I appreciate the IMPORT and EXPORT stuff and will try to use that 
(could we use that also for the whole OpenSceneGraph itself ? what do 
you think Philip?)

Nevertheless the STATIC_LIBRARY_FLAGS seems much simpler


But not as portable.  The IMPORT/EXPORT will work cross platform and 
with many different compilers.


-Bill


Ok, understood, thanks a lot to everyone: I' ll try to look at 
IMPORT/EXPORT.

Are there project examples available:
It would really be nice to have CMake projects for libraries.
I' m trying to build cmake projects for jpeg,tiff and png libs, as I' m 
working in VS7.1 and not finding projects for this platform.
Are any plans for providing CMake based source packages? People that are 
working on kde on windows how do they build their deps?

Thanks again
Luigi
___
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


Re: [CMake] MSVC7.1 static link question

2009-02-10 Thread Luigi Calori

Bill Hoffman ha scritto:

Philip Lowman wrote:
On Mon, Feb 9, 2009 at 12:39 PM, Luigi Calori l.cal...@cineca.it 
mailto:l.cal...@cineca.it wrote:


I' m quite a newbie in static linking, I would like to combine 
two lib

into one:
say libtiff needs libjpeg and zlib
If you generate them separately, then when you build an 
executable that
needs libtiff, you have to link also libjpeg and zlib otherwise 
unref

happens
It is possible, under VisualStudio interface, to specify 
libjpeg.lib and

zlib.lib as Additional Dependencies
This way (even if the linker show warnings as duplicate symbols) I
obtain a libtiff that can be used alone.
My question is: can I obtain the same result with cmake?
I' ve tried to use TARGET_LINK_LIBRARIES, that is perfecly 
working for

exe and SHARED linkage but no success: the
vs project has always the Additional Dependencies field empty.

Am I completely missing something?

CMake does not work that way since it is not achievable cross 
platform.  If you project is CMake based CMake will chain the 
libraries.  If you use other build tools then you will have to 
explicitly list libjpeg and zlib with the libtiff.  To do this in 
CMake you have two options:


1. have a library that uses libtiff
add_library(mylib ...)
target_link_libraries(mylib libtiff libjepg zlib)
add_executable(myexe ...)
target_link_libraries(myexe mylib)  # will link in tiff jpeg and zlib

2. create an imported target for libtiff
add_library(libtiff IMPORTED)
set_target_properties(libtiff PROPERTIES IMPORTED_LOCATION 
/path/to/libtiff.lib)

target_link_libraries(libtiff libjpeg zlib)
add_executable(myexe ...)
target_link_libraries(myexe libtiff) # will link jpeg and zlib


-Bill




Hi Philip and Bill:

I tried Philip suggestion and it seem working: it adds the flags as 
Additiona Optins in the commandline form and it seems to produce a

libtiff.lib that links ok.
The problem is that STATIC_LIBRARY_FLAGS property is not differentiated 
between Debug / Release.


Bill, is your method equivalent?

Is your suggestion applicable if the  exe and the lib stay in two 
completely different projects?


What I mean is that I ' m willing to have a CMake project that BUILDS 
and install libtiff.lib (static)


Then I have another project that build a .dll (or .exe, I think it 
behave the same) that Find and use my libtiff.lib.


Both your suggested method  seem to assume that myexe and libtiff are 
built at the same time.
This is not my case, I would like build libtiff static on win32 in such 
a way that allow other projects (built with cmake) to link it without 
adding explicitly the other dependent libraries.
so to not require changes in the dependent project (it is actually 
OpenSceneGraph, Philip)
So either modifying VS project or adding STATIC_LIBRARY_FLAGS I  am able 
to do.


I tried to use IMPORTED bud it did not worked

Thanks again
 Luigi
___
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


[CMake] MSVC7.1 static link question

2009-02-09 Thread Luigi Calori

I' m quite a newbie in static linking, I would like to combine two lib
into one:
say libtiff needs libjpeg and zlib
If you generate them separately, then when you build an executable that
needs libtiff, you have to link also libjpeg and zlib otherwise unref
happens
It is possible, under VisualStudio interface, to specify libjpeg.lib and
zlib.lib as Additional Dependencies
This way (even if the linker show warnings as duplicate symbols) I
obtain a libtiff that can be used alone.
My question is: can I obtain the same result with cmake?
I' ve tried to use TARGET_LINK_LIBRARIES, that is perfecly working for
exe and SHARED linkage but no success: the
vs project has always the Additional Dependencies field empty.

Am I completely missing something?

Thanks in advance
  Luigi Calori

___
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


Re: [CMake] OpenSceneGraph Find Modules

2008-01-04 Thread Luigi Calori

Hi Eric and Miguel,
It would be good to have the OSG-related modules inside CMake,
both modules for finding OSG dependencies as well as finding OSG itself
when needed by other projects.
I agree with all the suggestion of Miguel, expecially the idea of using
OpenSceneGraph_DIR  and OpenSceneGraphConfig.cmake:
OSG current build system is CMake, so
I think that using OpenSceneGraphConfig.cmake and adding some useful
macros to the base OSG install would help in building simple projects
that rely
mainly on OSG (like new plugins or new examples)
I would also prefer to have one single FindOpenSceneGraph that finds and
configure the different libraries that comprise OSG.
It also seems to me that having so many Findosg..   modules distributed
with CMake pose some scalability issue if many  projects adopt CMake

Just my two cents

Luigi


E. Wing wrote:


On 12/12/07, Miguel A. Figueroa-Villanueva [EMAIL PROTECTED] wrote:
 


On Dec 10, 2007 9:40 AM, E. Wing wrote:
snip
   


That's all I can remember on Mac issues for the moment. But on a
general CMake issue, I just submitted a whole bunch of Find*.cmake
modules for inclusion.
http://www.cmake.org/Bug/view.php?id=6139

Some of them are updates to existing modules that I have contributed.
Others are brand new modules that I've been promising but needed to do
significant clean up before submitting. (So that's where my weekend
went.)

FindFreeType.cmake
FindGDAL.cmake
FindGIFLIB.cmake
FindLua50.cmake
FindLua51.cmake
FindOpenAL.cmake
FindOpenSceneGraph.cmake
FindOpenThreads.cmake
FindPhysFS.cmake
FindProducer.cmake
FindQuickTime.cmake
FindSDL.cmake
FindSDL_image.cmake
FindSDL_mixer.cmake
FindSDL_net.cmake
FindSDL_sound.cmake
FindSDL_ttf.cmake
Findosg.cmake
FindosgDB.cmake
FindosgFX.cmake
FindosgGA.cmake
FindosgIntrospection.cmake
FindosgManipulator.cmake
FindosgParticle.cmake
FindosgProducer.cmake
FindosgShadow.cmake
FindosgSim.cmake
FindosgTerrain.cmake
FindosgText.cmake
FindosgUtil.cmake
FindosgViewer.cmake
 


Hello Eric,

I think these modules are a great addition to CMake. Thanks!

However, I took a look at them and I'm concerned with uniformity with
other modules. Now, I may be coming at it from a totally ignorant
point of view, since I don't know any history behind them (e.g., I'll
definitely not be aware of things that can't be changed do to
backwards compatibility, etc.), so please take these suggestions with
a grain of salt.

I think that for packages that are external components of OSG, such as
OpenGL, Producer, Quicktime, Lua, giflib, etc., there should be a
separate module. However, all OSG components should be found in the
same module (e.g., FindOpenSceneGraph.cmake). By having them separate
it increases the maintainence burden, and people are more likely to
get confused. If there are optional components, which you might or
might not want to link in, you can use the COMPONENTS/REQUIRED
interface of FIND_PACKAGE. For instance, the user would do something
like:

FIND_PACKAGE(OpenSceneGraph COMPONENTS DB FX GA Introspection)

to use those particular modules only. That's the way I do it in the
FindwxWidgets module. I suppose, you could also use the FindQt4
approach of having to set variables before calling the module (e.g.,
OSG_USE_DB, OSG_USE_FX, OSG_USE_GA, OSG_USE_INTROSPECTION).

Furthermore, if you already build OSG using CMake (great choice btw ;)
), then you might prefer to request the CMake cache variable
OpenSceneGraph_DIR to be set to the path of a file
OpenSceneGraphConfig.cmake (take a look at:  cmake --help-command
find_package), where all the configuration options that where used for
that particular OSG build can be found and so it is much user friendly
to use the module. The user would do:

FIND_PACKAGE(OpenSceneGraph) and by changing the location of the
OpenSceneGraph_DIR variable all the correct (as defined by the OSG
developers) options are set for that build.

I'm interested in standardizing the cmake find modules and I would
like to start using OpenSceneGraph some time soon for a course, so I'm
willing to volunteer some testing and development time into these
suggestions if you think they are reasonable and appropriate. Of
course, making the changes before releasing them with CMake helps
avoid backwards compatibility issues.

Hope this helps,
--Miguel
   



Hi Miguel,

So yes, there is a historical artifact involved in these modules. I
actually wrote the core of these modules several years ago, and this
is not my first submission attempt to CMake. (I think we paused on
them because of significant changes in OSG, but the reality is that
OSG continues to do that and I don't see an end in sight.) I know
copies of my modules have floated around to people too, so there is at
least a minor historical artifact involved.

As for the bigger issue of a single FindOpenSceneGraph module vs
sub-components, I have to disagree with you here. OSG was broken down
into separate libraries by design to allow people to pick the
components they want. The 

[CMake] How to place .dll and .lib in different places?

2007-08-27 Thread Luigi Calori
I have the problem of placing, at build time .lib in one folder (lib) 
and .dll in another (bin)

One solution is to add POST_BUILD copy commands, but i would prefer not.
I have also been suggested to use
SET_TARGET_PROPERTIES ...  PROPERTIES PREFIX
being lib and bin sibling, this hack seem to work:

SET(LIBRARY_OUTPUT_PATH lib)
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX ../../bin/)


Is it supported or works by chances?

I ask, because, I have also tried
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX ../../bin/lib)

to being able to have
lib_name.lib in lib/Release
lib_named.lib in lib/Debug

and

liblib_name.dll and liblib_named.dll both in bin

Unfortunately this is working in debug but not in release mode.

Thanks in advance

Luigi



___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Is .. supported as PROPERTIES PREFIX ? Was: Re: [CMake] How to get rid of Debug / Release VisualStudio folders?

2007-08-27 Thread Luigi Calori
Following Joshua Jensen suggestion, in order to configure stuff, by 
setting prefix to ../ one seem to being able to direct placement of .dll 
without copying or installing.


I got some inconsistent behaviour between release and Debug build though 
when specifying:


SET_TARGET_PROPERTIES(${TargetName} PROPERTIES PREFIX ../../bin/lib)

Is this a not supported hack or is something one can count on?

Thanks in advance

Luigi


Luigi Calori wrote:


Probably dumb question, but was not able to found hints on docs:
Visual Studio projects generated do append Debug / Release to the 
EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH paths.
Is there a way to avoid this and force them to generate straight 
inside EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH paths ?


I use the following:

   IF (CMAKE_GENERATOR MATCHES Visual Studio)
   SET_TARGET_PROPERTIES(${TargetName} PROPERTIES PREFIX ../)
   SET_TARGET_PROPERTIES(${TargetName} PROPERTIES DEBUG_POSTFIX 
.debug)

   ENDIF(CMAKE_GENERATOR MATCHES Visual Studio)

It's not perfect, but it backs the executable out a directory.

Josh




___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to place .dll and .lib in different places?

2007-08-27 Thread Luigi Calori

Alexander Neundorf wrote:


On Monday 27 August 2007 09:00, Luigi Calori wrote:
 


Alexander Neundorf wrote:
   


On Monday 27 August 2007 06:08, Luigi Calori wrote:
 


I have the problem of placing, at build time .lib in one folder (lib)
and .dll in another (bin)
One solution is to add POST_BUILD copy commands, but i would prefer not.
I have also been suggested to use
SET_TARGET_PROPERTIES ...  PROPERTIES PREFIX
being lib and bin sibling, this hack seem to work:

SET(LIBRARY_OUTPUT_PATH lib)
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX ../../bin/)


Is it supported or works by chances?

I ask, because, I have also tried
SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES PREFIX ../../bin/lib)

to being able to have
lib_name.lib in lib/Release
lib_named.lib in lib/Debug

and

liblib_name.dll and liblib_named.dll both in bin

Unfortunately this is working in debug but not in release mode.
   


Do you really need this in the build tree or only in the install tree ?
Then you should use something like this:
 


We already have it in the install tree, and is working properly.
I was trying to have the same structure on the build tree without
installing, and possibly without adding POST_BUILD custom commands
   



This is not supported.
Do you really need this ?
 

I' ve been asked by the main developer to assemble a build layout that 
was resembling the install layout, so to being able to let users to test 
and play without installing.
I found on the docs that there is a TARGET property called IMPORT_PREFIX 
that can direct the placement of .lib files.
I have found that is possible to use the ../ to specify placement 
outside Debug and Release
The problem comes when I want  to use the library created with something 
like
   TARGET_LINK_LIBRARIES(${TRGTNAME} optimized ${LINKLIB} debug 
${LINKLIB}${CMAKE_DEBUG_POSTFIX})
It seems that in debug mode, the names are expanded based on the target 
name while in release they are taken fron the .dll stuff (PREFIX)


Is it possible that this is related to me using .. in PREFIX?

Thanks
  Luigi


Alex


 



___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] How to get rid of Debug / Release VisualStudio folders?

2007-08-22 Thread Luigi Calori

Probably dumb question, but was not able to found hints on docs:
Visual Studio projects generated do append Debug / Release to the 
EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH paths.
Is there a way to avoid this and force them to generate straight inside 
EXECUTABLE_OUTPUT_PATH and LIBRARY_OUTPUT_PATH paths ?


Thanks in advance
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] getting values from subdirs

2007-03-15 Thread Luigi Calori
I would like to being able to collect a list of values from a macro that 
get called from several subdirs
The obvious solutions to init it into the main CMakeLists and update 
whithin the macro does not work as (probably) the init inside the main 
CmakeLists get executed

anyway for each subdir
If declare it CACH INTERNAL and I do no init, it get updated but retain 
values on different CMake runs any thougt?

A possible solution is to write a filebut it does not seem much elegant

Thanks anyway for the help
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] getting values from subdirs

2007-03-15 Thread Luigi Calori

Ken Martin wrote:


I believe the following will work. In the top CMakeLists file...

set(myvar initial-value CACHE INTERNAL stored subdir values)
add_subdirectory(subdir)
message(${myvar})

Then in subdir

set(myvar ${myvar} ${other-values-from-this-subdir} CACHE INTERNAL stored
subdir values)

Ken

 


I' v etried... but this don' t work:

i have


set(myvar initial-value CACHE INTERNAL stored subdir values)
add_subdirectory(subdir1)
add_subdirectory(subdir2)
add_subdirectory(subdir3)
message(${myvar})

and seem that the init code in the main get galled before each subdir (this is 
a known issue)
I was searching for a workaround...


Ken Martin PhD 
Kitware Inc.

28 Corporate Drive
Clifton Park NY 12065
518 371 3971 


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Luigi
Calori
Sent: Thursday, March 15, 2007 12:06 PM
To: cmake@cmake.org
Subject: [CMake] getting values from subdirs

I would like to being able to collect a list of values from a macro that 
get called from several subdirs
The obvious solutions to init it into the main CMakeLists and update 
whithin the macro does not work as (probably) the init inside the main 
CmakeLists get executed

anyway for each subdir
If declare it CACH INTERNAL and I do no init, it get updated but retain 
values on different CMake runs any thougt?

A possible solution is to write a filebut it does not seem much elegant

Thanks anyway for the help
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake



 



___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] How to detect 32/64 architecture

2007-03-09 Thread Luigi Calori
Is there a macro or variable to detect 32/64 architecture under Linux 
(possibly also under windows)
In order to mimic pre-existent builds we have been asked to install on 
lib64 if on a 64 architecture and lib or luib32 if appropriate


Thanks a lot
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] How to detect 32/64 architecture

2007-03-09 Thread Luigi Calori

Thanks a lot, it worked.
Just for knowing... what is

ow_check_cxx_compiler_flag

is it a command or one of your macro?
does it test the existance of one compiler flag?

Thanks again

Luigi

Andreas Schneider wrote:


Luigi Calori wrote:
 


Is there a macro or variable to detect 32/64 architecture under Linux
(possibly also under windows)
In order to mimic pre-existent builds we have been asked to install on
lib64 if on a 64 architecture and lib or luib32 if appropriate

   



Hi Luigi,

I check the void pointer size.

if (UNIX AND NOT WIN32)
 if (CMAKE_SIZEOF_VOID_P MATCHES 8)
   ow_check_cxx_compiler_flag(-fPIC WITH_FPIC)
 if (WITH_FPIC)
   add_definitions(-fPIC)
   endif (WITH_FPIC)
 endif (CMAKE_SIZEOF_VOID_P MATCHES 8)
endif (UNIX AND NOT WIN32)


 


Thanks a lot
   



:)

-- andreas

 


___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake
   



 



___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: RIF: [CMake] kdevelop problems

2006-11-02 Thread Luigi Calori

Bill Hoffman wrote:


Luigi Calori wrote:


I' ve used CVS CMake but it seems not to solve the problem.
In order to check, I' ve modified the layout project so to put c++ 
and header files in a directory under the folder where the main 
CMakeLists.txt resides.
doing that, the Kdevelop projects files get built properly (as much 
as I can tell, being ignorant of Kdevelop)


So is it possible there is a problem of having sources outside 
CMAKE_SOURCE_DIR



No, there should not be a problem.  I suspect the problem is not the 
version of CMake, but rather the version of Kdevelop.


-Bill


Which version of kdevelop is supported?
It seemed to me that the kdevelop.filelist generated from CMake is 
lacking files, so I blamed CMake for not being able to generate the 
correct list when source files are outside

CMAKE_SOURCE_DIR

I' ll try to investigate further

Thanks
   Luigi

___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


Re: RIF: [CMake] kdevelop problems

2006-10-31 Thread Luigi Calori

Thanks, Frederic

My sistuation is I have aready an hand written CMakefile (I ususally 
work on MS visual studio) for several generators (Unix Makefiles, mingw, 
MS VS 7...)
I currently build under Linux thru Makefiles, I would like to test 
Kdevelop as an IDE platform for Linux.
So I installed Kdevelop (under Fedora Core 5) and set up the generator 
as KDevelop3

I currently keep
CMAKE_SOURCE_DIR != CMAKE_BUILD_DIR and, worse, my c++ sources reside on 
an external dir from CMAKE_SOURCE_DIR


The problem is that if I open the kdevelop project that has been 
generated by CMake, it does not contains any c++ source nor any include file


I' ve tied with a simpler project thar has c++ files inside 
CMAKE_SOURCE_DIR and the files are showed.


Is it a known limitation?
Do I have to use special hacks inside CMakefiles to tell Kdevelop to add 
the files to the project?


Thanks in advance
 Luigi

Frederic Heem wrote:


Ciao,
The problem is in kdevelop, not in cmake itself. When kdevelop create a cmake 
project, CMAKE_SOURCE_DIR = CMAKE_BUILD_DIR, which is a bad idea. The preferred 
way is that CMAKE_SOURCE_DIR != CMAKE_BUILD_DIR. Then cleaning a project is 
just a matter of deleting CMAKE_BUILD_DIR. The other advantage is to ability to 
have different build configuration, example a debug and non debug build.
Please report a bug report to kdevelop about this issue.
By the way, it's still possible to use kdevelop and cmake, that's what I'm using to 
develop. Just create hand written CMakeList.txt, import the project in kdevelop using 
custom makefile, then configure kdevelop to use the build directory to 
compile, and sett other paramaters such as where is the executable.
Frederic Heem

-Messaggio originale-
Da: [EMAIL PROTECTED] per conto di Luigi Calori
Inviato:lun 30/10/2006 18.09
A:  CMake Mailing List
Cc: 
Oggetto:[CMake] kdevelop problems

I' m new to kdevelop and starting to use CMake for it.
I' ve a project that builds correctly with make but has source files 
that resides on  external directory

(outside from CMAKE_SOURCE_DIR)
The generated kdevelop projects seems empty from  source files (it shows 
only CMakelists.txt inside CMAKE_SOURCE_DIR)

Nevertheless the project builds.
Did I do something wrong or the placing of source files outside from 
CMAKE_SOURCE_DIR prevent listing inside kdevelop?


Thanks in advance
Luigi
___
 



___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] kdevelop problems

2006-10-30 Thread Luigi Calori

I' m new to kdevelop and starting to use CMake for it.
I' ve a project that builds correctly with make but has source files 
that resides on  external directory

(outside from CMAKE_SOURCE_DIR)
The generated kdevelop projects seems empty from  source files (it shows 
only CMakelists.txt inside CMAKE_SOURCE_DIR)

Nevertheless the project builds.
Did I do something wrong or the placing of source files outside from 
CMAKE_SOURCE_DIR prevent listing inside kdevelop?


Thanks in advance
Luigi
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] example of ctest --build-and-test

2006-10-16 Thread Luigi Calori

I have the following problem:
a master cmake project that wants to configure and build a series of 
slave cmake projects

I' ve tried several hacking but not found an elegant solution.
I' ve read from the list that the

ctest --build-and-test


could be used for that but did not found any example: any suggestion?
The main reason for such a request is that I would like to have targets 
that download from CVS,configure and build projects, so to
use the master build phase as a kind of interface to all the tedious 
step of grabbibg things from the net, configuring and building.

Are there any examples ?

Thanks in advance
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] CUSTOM COMMANDS with no depends under VS 2003

2006-09-01 Thread Luigi Calori
After several test and trials, I ve the suspect that if one use 
ADD_CUSTOM_COMMANDS without DEPENDS, then  the generator -Visual Studio 
7 .NET 2003-, is not

running the command at build but requires a rebuild.
Am I completely wrong or is a known issue?
I' m trying to write macros to checkout project using cvs, so there is 
no dependency on command.

I' ve worked around inserting a fake depends on the cvs executable.
I' ve seen now there is a macro repository, but I' ve found no chechout 
or download macros, if someone is interested, let me know


Thanks in advance
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake


[CMake] VisualStudio debug command

2006-03-28 Thread Luigi Calori

Probably newby question:

Under Visual Studio, at least from VS 7, a project can have debugging 
command and command arguments.

Is it possible to set them in a CMakeFile ?

Thanks a lot
  Luigi
___
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake