[CMake] Use CMake to create C# project

2010-04-23 Thread Andreas Roth

Hello to all,

i try to find out how i could integrate my C# projects into my CMake 
project files. As far as i know CMake does not natively support C# 
projects. Is it planned to add this functionality? If yes, when will be 
be ready?


Thanks,
Andreas Roth
___
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] Some questions about dependencies

2010-04-23 Thread Magnus Therning
Does INSTALL( FILES ... ) have the same limitations regarding the location of
the commands that generate the files in question as ADD_CUSTOM_COMMAND( ...
DEPENDS ... ) has?

That is, proper dependencies for the files given to INSTALL will only be
generated when the files are the output of a custom command in the same
directory.

/M

-- 
Magnus Therning(OpenPGP: 0xAB4DFBA4)
magnus@therning.org  Jabber: magnus@therning.org
http://therning.org/magnus identi.ca|twitter: magthe
___
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] A target for 'install'?

2010-04-23 Thread Magnus Therning
Is there a target for 'install' that I can add dependencies to by
using add_dependencies()?

/M

-- 
Magnus Therning(OpenPGP: 0xAB4DFBA4)
magnus@therning.org  Jabber: magnus@therning.org
http://therning.org/magnus identi.ca|twitter: magthe
___
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] Looking for a way to do 'make install' to a destination

2010-04-23 Thread Eric Noulard
2010/4/19 Michael Wild :
>
> On 19. Apr, 2010, at 16:22 , Magnus Therning wrote:
>
>> On Mon, Apr 19, 2010 at 11:36, Remy Chibois  wrote:
>>>
>>> On Apr 19, 2010, at 12:16 PM, Magnus Therning wrote:
>>>
 It's some times useful to do an install rooted not at '/' but at some
 arbitrary location.  Is there some way of doing this with the GNU
 makefiles generated by cmake?

 Something like auto*'s 'make install DESTDIR=/where/I/want/it'?
>>>
>>> Once a project has been configured, "cmake_install.cmake" contains support 
>>> for it.
>>>
>>> I use the following command line to use it:
>>>
>>> make -f Makefile DESTDIR=/foo/bar/whatever install
>>
>> Thanks, that's what I was looking for.
>>
>> Are there other "make-time variables" (as opposed to "configure-time
>> variables") that are worth knowing about?  Is there a reference for
>> them anywhere?
>>
>> /M
>
> make VERBOSE=1
>
> turns on verbose output for "Unix Makefiles" based generators. That's the 
> only ones I know of...

COLOR may be used to forcibly turn off "colorized output"

see the difference between

make COLOR=NO
and
make COLOR=YES

I think cmake (which is doing the colorized output) detect if the
terminal is able to
display colorized output.


-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
___
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] A target for 'install'?

2010-04-23 Thread Eric Noulard
2010/4/23 Magnus Therning :
> Is there a target for 'install' that I can add dependencies to by
> using add_dependencies()?

This is currently unsupported.

There is a feature request for that:
http://public.kitware.com/Bug/view.php?id=8438


-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
___
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] Looking for a way to do 'make install' to a destination

2010-04-23 Thread Michael Hertling
On 04/19/2010 04:22 PM, Magnus Therning wrote:
> On Mon, Apr 19, 2010 at 11:36, Remy Chibois  wrote:
>>
>> On Apr 19, 2010, at 12:16 PM, Magnus Therning wrote:
>>
>>> It's some times useful to do an install rooted not at '/' but at some
>>> arbitrary location. ?Is there some way of doing this with the GNU
>>> makefiles generated by cmake?
>>>
>>> Something like auto*'s 'make install DESTDIR=/where/I/want/it'?
>>
>> Once a project has been configured, "cmake_install.cmake" contains support 
>> for it.
>>
>> I use the following command line to use it:
>>
>> make -f Makefile DESTDIR=/foo/bar/whatever install
> 
> Thanks, that's what I was looking for.
> 
> Are there other "make-time variables" (as opposed to "configure-time
> variables") that are worth knowing about?  Is there a reference for
> them anywhere?

CMAKE_INSTALL_ALWAYS



Regards,

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] A target for 'install'?

2010-04-23 Thread Magnus Therning
On Fri, Apr 23, 2010 at 14:31, Eric Noulard  wrote:
> 2010/4/23 Magnus Therning :
>> Is there a target for 'install' that I can add dependencies to by
>> using add_dependencies()?
>
> This is currently unsupported.
>
> There is a feature request for that:
> http://public.kitware.com/Bug/view.php?id=8438

Ah, and it's been around for a while too.  My use-case is slightly
different, I have a project where I'd like the ALL target build
everything, but where there's only a small portion which is actually
installed, so I'd like to do something like

set( CMAKE_SKIP_INSTALL_ALL_DEPENDENCY "TRUE" )
add_dependency( INSTALL TheStuffToInstall )

/M

-- 
Magnus Therning(OpenPGP: 0xAB4DFBA4)
magnus@therning.org  Jabber: magnus@therning.org
http://therning.org/magnus identi.ca|twitter: magthe
___
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] A target for 'install'?

2010-04-23 Thread Eric Noulard
2010/4/23 Magnus Therning :
> On Fri, Apr 23, 2010 at 14:31, Eric Noulard  wrote:
>> 2010/4/23 Magnus Therning :
>>> Is there a target for 'install' that I can add dependencies to by
>>> using add_dependencies()?
>>
>> This is currently unsupported.
>>
>> There is a feature request for that:
>> http://public.kitware.com/Bug/view.php?id=8438
>
> Ah, and it's been around for a while too.  My use-case is slightly
> different, I have a project where I'd like the ALL target build
> everything, but where there's only a small portion which is actually
> installed, so I'd like to do something like
>
>    set( CMAKE_SKIP_INSTALL_ALL_DEPENDENCY "TRUE" )
>    add_dependency( INSTALL TheStuffToInstall )

You browse/search the ML archive
http://www.cmake.org/Wiki/CMake_FAQ#Where_can_I_find_searchable_CMake_Mailing_Archives.3F

you'll find several "similar" needs with possible solutions.


-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
___
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 is this custom command run twice?

2010-04-23 Thread Aaron_Wright
Is there no interest in this differing behavior between Linux and Windows? 
I'm a little worried that CMake doesn't produce the same results in both 
situations. Aren't those kind of things bugs?

If no one knows the answer off the top of their head, are there some 
debugging tips or avenues of investigation anyone could share?

-
Aaron Wright




From:
aaron_wri...@selinc.com
To:
Michael Wild 
Cc:
CMake List 
Date:
04/22/2010 01:38 PM
Subject:
Re: [CMake] Why is this custom command run twice?
Sent by:
cmake-boun...@cmake.org



Well, Michael is right, it does work right in Linux. I guess the nature of 
the question changes slightly then to become, what I'm I not doing right 
for Visual Studio 9 2008, but that works in Linux? 

-
Aaron Wright 



From: 
Michael Wild  
To: 
aaron_wri...@selinc.com 
Cc: 
CMake List  
Date: 
04/22/2010 01:29 PM 
Subject: 
Re: [CMake] Why is this custom command run twice?




Works fine for me, sorry to say ;-)

Michael

On 22. Apr, 2010, at 17:49 , aaron_wri...@selinc.com wrote:

> Interesting. I had a little typo in the first example, here's another 
one. 
> You only need a file called "generated.txt.in" next to the 
CMakeLists.txt 
> file.
> 
> 
> CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
> 
> PROJECT(quick_test)
> 
> ADD_CUSTOM_COMMAND(
>  OUTPUT "${PROJECT_BINARY_DIR}/generated.txt"
>  COMMAND ${CMAKE_COMMAND} -E copy 
> "${PROJECT_SOURCE_DIR}/generated.txt.in" 
> "${PROJECT_BINARY_DIR}/generated.txt"
>  DEPENDS "${PROJECT_SOURCE_DIR}/generated.txt.in")
> 
> ADD_CUSTOM_COMMAND(
>  OUTPUT "${PROJECT_BINARY_DIR}/generated_used.stamp"
>  COMMAND ${CMAKE_COMMAND} -E touch 
> "${PROJECT_BINARY_DIR}/generated_used.stamp"
>  DEPENDS "${PROJECT_BINARY_DIR}/generated.txt"
>  COMMENT "Using generated.txt")
> 
> ADD_CUSTOM_TARGET(
>  ${PROJECT_NAME}
>  DEPENDS "${PROJECT_BINARY_DIR}/generated_used.stamp")
> 
> 
> This builds ok the first time, but then change the "generated.txt.in" 
and 
> run the build twice and the second time you'll see "Using generated.txt" 

> again, which I don't want to see. I've tried VS 2008 and NMake, using 
> CMake 2.8 and 2.8.1.
> -
> Aaron Wright
> 
> 
> 
> 
> From:
> Michael Wild 
> To:
> aaron_wri...@selinc.com
> Cc:
> cmake@cmake.org
> Date:
> 04/21/2010 11:41 PM
> Subject:
> Re: [CMake] Why is this custom command run twice?
> Sent by:
> cmake-boun...@cmake.org
> 
> 
> 
> 
> On 22. Apr, 2010, at 5:12 , aaron_wri...@selinc.com wrote:
> 
>> I'm trying to do something a little weird, and I'm almost there but not 

>> quite. I'm trying to generate a file and then run a command based on 
> that 
>> file. I only want the command to run when the file changes and thus the 

>> generated file changes. Instead the first build I get both custom 
> commands 
>> run, and then on a second build, the second custom command runs again, 
>> which is not what I want. 
>> 
>> This is what I got (just an example):
>> 
>> 
>> ADD_CUSTOM_COMMAND(
>> OUTPUT "${PROJECT_BINARY_DIR}/generated.txt"
>> COMMAND ${CMAKE_COMMAND} -E touch 
> "${PROJECT_BINARY_DIR}/generated.txt"
>> DEPENDS "${PROJECT_SOURCE_DIR}/generated.txt")
>> 
>> ADD_CUSTOM_COMMAND(
>> OUTPUT "${PROJECT_BINARY_DIR}/generated_used.stamp"
>> COMMAND ${CMAKE_COMMAND} -E touch 
>> "${PROJECT_BINARY_DIR}/generated_used.stamp"
>> DEPENDS "${PROJECT_BINARY_DIR}/generated.txt"
>> COMMENT "Using generated.txt")
>> 
>> ADD_CUSTOM_TARGET(
>> ${PROJECT_NAME}
>> DEPENDS "${PROJECT_BINARY_DIR}/generated_used.stamp")
>> 
>> 
>> What I'm I missing? Thanks
> 
> Your example works fine for me (using CMake 2.8.1 and Unix Makefiles 
> generator on Mac OS X 10.6.2).
> 
> 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
> 

___
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] Unit tests, but not CTest

2010-04-23 Thread Magnus Therning
A project that I'm currently trying to convert over to CMake has
several unit tests written as standalone executables.  Are there any
examples around for integrating the running of such tests as part of
the build in CMake?

/M

-- 
Magnus Therning(OpenPGP: 0xAB4DFBA4)
magnus@therning.org  Jabber: magnus@therning.org
http://therning.org/magnus identi.ca|twitter: magthe
___
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] Unit tests, but not CTest

2010-04-23 Thread Tyler Roscoe
On Fri, Apr 23, 2010 at 04:24:06PM +0100, Magnus Therning wrote:
> A project that I'm currently trying to convert over to CMake has
> several unit tests written as standalone executables.  Are there any
> examples around for integrating the running of such tests as part of
> the build in CMake?

add_test just takes a command line. You can put whatever you want in
there and ctest will run it for you.

http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:add_test

tyler
___
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] ExternalProjects: How do ExternalProject_add and ExternalProject_Add_Step interact?

2010-04-23 Thread kent williams
So... I have been working on my 'Holy Grail' CMakeLists.txt that
builds all prerequisites to my application as ExternalProjects, and
then builds my application (also as an External Project).

In getting it to work on OS X and Linux I ran into an issue:

If you build Tcl, and install it, it installs the shared libraries for
Tcl read-only.  So, if I try and use fixup_bundle (from
BundleUtilities) to make a standalone build with all shared libraries
it fails:

-- 82/204: copying '/scratch/kent/newbuild/BT-build/lib/libtk8.5.so'
CMake Error at 
/opt/cmake-2.9.20100421/share/cmake-2.9/Modules/BundleUtilities.cmake:431
(file):
  file RPATH_REMOVE could not remove RPATH from file:

/scratch/kent/newbuild/BT-build/bin/libtk8.5.so

  Error opening file for update.
Call Stack (most recent call first):
  /opt/cmake-2.9.20100421/share/cmake-2.9/Modules/BundleUtilities.cmake:531
(copy_resolved_item_into_bundle)
  cmake_install.cmake:54 (fixup_bundle)

So my thought was 'brilliant! I'll add a step to the ExternalProject!'
-- but it isn't clear to me if ExternalProject_Add_Step is actually
set up to modify an External Project, or if you're supposed to use
ExternalProject_Add_Step commands to swizzle up your own custom
External Project.

More specifically If I have

ExternalProjectAdd(xyz
...
)

ExternalProject_Add_Step(xyz fix_permissions
...
)

I don't know what to put for DEPENDEES to get fix_permissions to run
AFTER the install.

Any ideas?
___
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] Unit tests, but not CTest

2010-04-23 Thread Magnus Therning
On Fri, Apr 23, 2010 at 16:35, Tyler Roscoe  wrote:
> On Fri, Apr 23, 2010 at 04:24:06PM +0100, Magnus Therning wrote:
>> A project that I'm currently trying to convert over to CMake has
>> several unit tests written as standalone executables.  Are there any
>> examples around for integrating the running of such tests as part of
>> the build in CMake?
>
> add_test just takes a command line. You can put whatever you want in
> there and ctest will run it for you.
>
> http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:add_test

Ah, yes, that comes closer to what I want.  Thanks.  Now I only want
the test's stdout to be connected to the stdout so I can see the
results immediately

/M.

-- 
Magnus Therning(OpenPGP: 0xAB4DFBA4)
magnus@therning.org  Jabber: magnus@therning.org
http://therning.org/magnus identi.ca|twitter: magthe
___
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] Unit tests, but not CTest

2010-04-23 Thread Adolfo Rodríguez Tsouroukdissian
On Fri, Apr 23, 2010 at 5:56 PM, Magnus Therning wrote:

> On Fri, Apr 23, 2010 at 16:35, Tyler Roscoe  wrote:
> > On Fri, Apr 23, 2010 at 04:24:06PM +0100, Magnus Therning wrote:
> >> A project that I'm currently trying to convert over to CMake has
> >> several unit tests written as standalone executables.  Are there any
> >> examples around for integrating the running of such tests as part of
> >> the build in CMake?
> >
> > add_test just takes a command line. You can put whatever you want in
> > there and ctest will run it for you.
> >
> > http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:add_test
>
> Ah, yes, that comes closer to what I want.  Thanks.  Now I only want
> the test's stdout to be connected to the stdout so I can see the
> results immediately
>

Run ctest with the -V or -VV option


>
> /M.
>
> --
> Magnus Therning(OpenPGP: 0xAB4DFBA4)
> magnus@therning.org  Jabber: magnus@therning.org
> http://therning.org/magnus identi.ca|twitter: magthe
> ___
> 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




-- 
Adolfo Rodríguez Tsouroukdissian, Ph. D.

Robotics engineer
PAL ROBOTICS S.L
http://www.pal-robotics.com
Tel. +34.93.414.53.47
Fax.+34.93.209.11.09
AVISO DE CONFIDENCIALIDAD: Este mensaje y sus documentos adjuntos, pueden
contener información privilegiada y/o confidencial que está dirigida
exclusivamente a su destinatario. Si usted recibe este mensaje y no es el
destinatario indicado, o el empleado encargado de su entrega a dicha
persona, por favor, notifíquelo inmediatamente y remita el mensaje original
a la dirección de correo electrónico indicada. Cualquier copia, uso o
distribución no autorizados de esta comunicación queda estrictamente
prohibida.

CONFIDENTIALITY NOTICE: This e-mail and the accompanying document(s) may
contain confidential information which is privileged and intended only for
the individual or entity to whom they are addressed.  If you are not the
intended recipient, you are hereby notified that any disclosure, copying,
distribution or use of this e-mail and/or accompanying document(s) is
strictly prohibited.  If you have received this e-mail in error, please
immediately notify the sender at the above e-mail address.
___
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] Unit tests, but not CTest

2010-04-23 Thread Magnus Therning
2010/4/23 Adolfo Rodríguez Tsouroukdissian :
>
>
> On Fri, Apr 23, 2010 at 5:56 PM, Magnus Therning 
> wrote:
>>
>> On Fri, Apr 23, 2010 at 16:35, Tyler Roscoe  wrote:
>> > On Fri, Apr 23, 2010 at 04:24:06PM +0100, Magnus Therning wrote:
>> >> A project that I'm currently trying to convert over to CMake has
>> >> several unit tests written as standalone executables.  Are there any
>> >> examples around for integrating the running of such tests as part of
>> >> the build in CMake?
>> >
>> > add_test just takes a command line. You can put whatever you want in
>> > there and ctest will run it for you.
>> >
>> > http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:add_test
>>
>> Ah, yes, that comes closer to what I want.  Thanks.  Now I only want
>> the test's stdout to be connected to the stdout so I can see the
>> results immediately
>
> Run ctest with the -V or -VV option

Hmm, how do I get that passed to ctest when I run 'make test'?

/M

-- 
Magnus Therning(OpenPGP: 0xAB4DFBA4)
magnus@therning.org  Jabber: magnus@therning.org
http://therning.org/magnus identi.ca|twitter: magthe
___
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 kent williams
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


Re: [CMake] can't remove RPATH from libtcl8.5.so (Linux) CMake Git version

2010-04-23 Thread kent williams
Answering my own question again -- this is a logged bug here:

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

David Cole is of the opinion this error is useful in the context of
fixup_bundle.

Maybe so, but it's a right PITA.  If you're building the library
that's getting copied as part of fixup_bundle, and the permissions
don't allow RPATH_REMOVE to work, you're dead in the water until you
figure out how to add an install step to move the file and change the
permissions.

I'm dealing with it by adding a custom ExternalProject step to adjust
perms after the install.  Just getting that right was a whole other
story...
___
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


[CMake] Ralph Barth/AEH/DBS/GDB ist außer Haus .

2010-04-23 Thread Ralph . Barth

Ralph Barth will be out of the office starting  23.04.2010 and will be
returning on 24.04.2010.

Ich werde Ihre Nachrichten nach meiner Rückkehr beantworten.



Deutsche Börse Systems AG
Chairman of the Supervisory Board/
Vorsitzender des Aufsichtsrats:
Reto Francioni
Executive Board/Vorstand:
Michael Kuhn (Chief Executive Officer/Vorsitzender),
Yves Baguet (Deputy Chief Executive Officer/
stellv. Vorsitzender), Gerhard Leßmann.
Aktiengesellschaft with registered seat in/mit Sitz in
Frankfurt am Main.
Commercial register/Handelsregister:
Local court/Amtsgericht Frankfurt am Main HRB 42413.

-
Diese E-Mail enthaelt vertrauliche oder rechtlich geschuetzte Informationen.
Wenn Sie nicht der beabsichtigte Empfaenger sind, informieren Sie bitte
sofort den Absender und loeschen Sie diese E-Mail. Das unbefugte Kopieren
dieser E-Mail oder die unbefugte Weitergabe der enthaltenen Informationen
ist nicht gestattet.

The information contained in this message is confidential or protected by
law. If you are not the intended recipient, please contact the sender and
delete this message. Any unauthorised copying of this message or
unauthorised distribution of the information contained herein is prohibited.

Legally required information for business correspondence/
Gesetzliche Pflichtangaben fuer Geschaeftskorrespondenz:
http://deutsche-boerse.com/letterhead

___
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 is this custom command run twice?

2010-04-23 Thread Eric Noulard
2010/4/23 
>
> Is there no interest in this differing behavior between Linux and Windows?

I'm pretty sure there should be :-)
But may be not as urgent as you wish.

> I'm a little worried that CMake doesn't produce the same results in both 
> situations. Aren't those kind of things bugs?

Looks like a bug. However something is puzzling me.

What does this intend to do:

ADD_CUSTOM_TARGET(
 ${PROJECT_NAME}
  DEPENDS "${PROJECT_BINARY_DIR}/generated_used.stamp")

Do you really intend to name the target with the name of the project ?
If you do,  why ?
I think you should not do that (I'm not sure it's forbidden though)

I think you should pick up a different name say ${PROJECT_NAME}_genme
and if you want this particular target to be generated every time you build
the project then use the ALL argument. cf ADD_CUSTOM_TARGET documentation.

Then this particular target will ALWAYS be run but its dependency target won't
unless it is out of date.

Note that if your generated_used file is to be used for the build of
another target
(lib or executable) then may be you should use the following signature:

add_custom_command(TARGET target
PRE_BUILD | PRE_LINK | POST_BUILD
COMMAND command1 [ARGS] [args1...]
[COMMAND command2 [ARGS] [args2...] ...]
[WORKING_DIRECTORY dir]
[COMMENT comment] [VERBATIM])

Since PRE_BUILD seems to be only supported on Visual 7 and up I would not
rely on it for a Unix build.

>
> If no one knows the answer off the top of their head, are there some 
> debugging tips or avenues of investigation anyone could share?

May be diving into the generated file for Visual Studio and trying to find
some duplicate name for this particular target? Just a guess I'm
really not a MSVC guy.


--
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
___
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 is this custom command run twice?

2010-04-23 Thread Brad King
aaron_wri...@selinc.com wrote:
> This builds ok the first time, but then change the "generated.txt.in"
> and run the build twice and the second time you'll see "Using
> generated.txt" again, which I don't want to see. I've tried VS 2008 and
> NMake, using CMake 2.8 and 2.8.1.

I was able to reproduce this.  There is nothing wrong with the project
that CMake generates in VS.  The problem seems to be with the windows
filesystem timestamp granularity.  The code below changes the touch
into a copy, and the problem goes away.

The code can actually be simpler, too.  CMake 2.8 (and 2.6 I think)
automatically handles relative output files with respect to the
build tree.

-Brad


CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(quick_test)

ADD_CUSTOM_COMMAND(
  OUTPUT generated.txt
  COMMAND ${CMAKE_COMMAND} -E copy
   ${PROJECT_SOURCE_DIR}/generated.txt.in
   ${PROJECT_BINARY_DIR}/generated.txt
  DEPENDS generated.txt.in
  )

ADD_CUSTOM_COMMAND(
  OUTPUT generated_used.stamp
  COMMAND ${CMAKE_COMMAND} -E copy
   ${PROJECT_BINARY_DIR}/generated.txt
   ${PROJECT_BINARY_DIR}/generated_used.stamp
  DEPENDS generated.txt
  COMMENT "Using generated.txt"
  )

ADD_CUSTOM_TARGET(${PROJECT_NAME} DEPENDS generated_used.stamp)
___
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] Can't double-click to launch Mac app bundle

2010-04-23 Thread Ben Medina
Hello all,

I have a Qt-based Mac app that I build with CMake. I run fixup_bundle
on it to copy all pre-requisites over during the install step.
However, when I double-click on the .app, the application does not
launch. It's icon bounces a few times in the dock, then goes away with
no errors. If I run the executable from the shell (i.e. execute the
binary in .app/Contents/MacOS), the application launches as expected.

Does anyone know what magic is required for double-click launching to work?

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


Re: [CMake] Apply FIND_PACKAGE_HANDLE_STANDARD_ARGS() on COMPONENTS

2010-04-23 Thread Michael Hertling
On 04/22/2010 01:50 PM, S Roderick wrote:
> On Apr 22, 2010, at 06:21 , Michael Hertling wrote:
> 
>> On 04/21/2010 09:29 PM, S Roderick wrote:
>>> On Apr 21, 2010, at 15:13 , Alexander Neundorf wrote:
>>>
 On Tuesday 20 April 2010, Michael Hertling wrote:
> Dear CMake community, dear CMake developers,
>
 ...
> There's another aspect related to this I'd like to comment on: During
> the abovementioned considerations on the bug tracker and the mailing
> list, the question has arisen if it's reasonable to set XXX_FOUND to
> FALSE if any of the requested components aren't found. As for myself,
> I'd say: No, it isn't. Let's have a look at the following scenario:
>
> Package XXX normally provides components YY1 and YY2, but for some
> reason, only YY1 is installed. Moreover, XXX provides a config file
> XXXConfig.cmake. Now, a project's CMake script requests both YY1/2 by
> FIND_PACKAGE(XXX COMPONENTS YY1 YY2). As Brad King has pointed out in
> , finding a
> config file results in XXX_FOUND to be set to TRUE automatically. Thus,
> the absence of YY2 does not mean the absence of XXX as a whole in any
> case, and, notwithstanding, the requesting CMake script should have a
> chance to proceed even if YY2 isn't available, i.e. the following seems
> reasonable: XXX_YY1_FOUND=TRUE, XXX_YY2_FOUND=FALSE *but* XXX_FOUND=TRUE.

 I think I don't agree here.
 If I say
 find_package(XXX COMPONENTS YY1 YY2 REQUIRED)
 I think it makes a lot of sense to interpret this as "search package XXX, 
 and 
 I need YY1 and YY2 from it".
 What other reason would I have to give YY1 and YY2 there otherwise ?
 If it still succeeds if they are not found, why should I list them then ?
>>>
>>>
>>> +1
>>>
>>> find_package(XXX COMPONENTS YY1 YY2 REQUIRED)
>>>
>>> means to me, I _require_ both YY1 and YY2 from XXX. Any other YYx I don't 
>>> care about.
>>
>> Yes, of course, the REQUIRED option is definitive; it's
>> COMPONENTS without REQUIRED which raises the questions.
>>
>>> The first version above translates to me to be
>>>
>>> find_package(XXX COMPONENTS YY1 REQUIRED)
>>>
>>> I only _require_ YY1.
>>
>> As I have replied recently to AN, I sometimes dislike FIND_PACKAGE() to
>> look for unrequested components, so I need to request them even if they
>> are optional, but this is just my personal preference and, also, not my
>> concern here.
>>
>> My concern is that FIND_PACKAGE(XXX COMPONENTS YY) will always return
>> XXX_FOUND=TRUE if it's driven by XXXConfig.cmake, regardless if YY is
>> found or not, while the same command could return XXX_FOUND=FALSE if
>> driven by FindXXX.cmake since the latter has XXX_FOUND in its hands.
>> Thus, IMHO, it should be reconsidered how XXX_FOUND is interpreted
>> w.r.t. components because I would expect both variants - XXXConfig
>> and FindXXX - to behave the same.
> 
> That seems to make sense. YY isn't listed as required, therefore it is 
> optional. [...]

Sometimes, this decision between required and optional isn't that easy.
Imagine some of a package's components are required and some are
optional. How would you do the FIND_PACKAGE()?

1) Call it with REQUIRED? This means a missing optional component is
   capable to terminate the whole configuration process: Bad.
2) Call it without REQUIRED? This means you must handle the absence of
   a required component by yourself, as well as you have to handle the
   presence of an optional component: My personal favourite - flexible,
   clean and quite safe.
3) Call it with REQUIRED and mention the required components only? This
   means to rely on the find module to search the unmentioned optional
   components without being requested to do so. Is this guaranteed or,
   at least, recommended behaviour? E.g., FindQt4 behaves differently:
   If you want SQL or the like you have to say it.
4) Call it twice, with and without REQUIRED and with a different set of
   components each time? Which impact would this have on the affected
   variables in the current scope, the cache, efficiency etc.?

For method 2 to be bullet-proof, it's necessary that XXX_FOUND isn't set
to false just because any requested components aren't detected. If this
would be the case you even simply could not request optional components
with FIND_PACKAGE() in a secure manner: XXX_FOUND=FALSE possibly means
that XXX actually hasn't been found at all; therefore, you may not rely
on any XXX_YY_FOUND having a defined value. Consequently, the right way
to check for YY is IF(XXX_FOUND AND XXX_YY_FOUND)...ENDIF(), and this
wouldn't work if XXX_YY_FOUND=TRUE while XXX_FOUND=FALSE due to some
other XXX_ZZ_FOUND=FALSE.

> [...] Having XXX_FOUND=TRUE seems reasonable if CMake found some portion of 
> XXX, regardless of whether it did, or did not, find YY. [...]

Yes, that's exactly the way I think XXX_FOUND should be interpreted.

> [

Re: [CMake] Can't double-click to launch Mac app bundle

2010-04-23 Thread Mike Jackson
What error message is given?  Did you copy the qtmenu.nib into the
proper place in the case of a cocoa application.

-
Mike Jackson  www.bluequartz.net
Principal Software Engineer   mike.jack...@bluequartz.net
BlueQuartz Software   Dayton, Ohio


On Apr 23, 2010, at 17:28, Ben Medina  wrote:

> Hello all,
>
> I have a Qt-based Mac app that I build with CMake. I run fixup_bundle
> on it to copy all pre-requisites over during the install step.
> However, when I double-click on the .app, the application does not
> launch. It's icon bounces a few times in the dock, then goes away with
> no errors. If I run the executable from the shell (i.e. execute the
> binary in .app/Contents/MacOS), the application launches as expected.
>
> Does anyone know what magic is required for double-click launching
> to work?
>
> 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] Can't double-click to launch Mac app bundle

2010-04-23 Thread Timothy Shead

On 4/23/10 3:28 PM, Ben Medina wrote:

Hello all,

I have a Qt-based Mac app that I build with CMake. I run fixup_bundle
on it to copy all pre-requisites over during the install step.
However, when I double-click on the .app, the application does not
launch. It's icon bounces a few times in the dock, then goes away with
no errors. If I run the executable from the shell (i.e. execute the
binary in .app/Contents/MacOS), the application launches as expected.

Does anyone know what magic is required for double-click launching to work?


Lots of things can go wrong ... run the Console application (typically 
/Applications/Utilities/Console.app) to see any error output produced 
when you launch an app from the shell.  Typically you'll get a message 
indicating that there's a missing library dependency.  If it's deeper 
than that and your application gets to the point where it runs before 
crashing, you can print information to stderr and see it in the Console.


Cheers,
Tim


--
Timothy M. Shead
Sandia National Laboratories
1424, Data Analysis and Visualization

___
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