Re: [CMake] Acces macro/functions to subfolders

2009-12-16 Thread Michael Wild

On 16. Dec, 2009, at 18:28 , Tyler Roscoe wrote:

> On Wed, Dec 16, 2009 at 05:55:54PM +0100, Olivier Pierard wrote:
>> In order to be able to use a macro/function from several sub-folders, I
>> would like to define it only once in the main CMakeLists.txt.  However,
>> after some basic tests, It seems impossible to call this macro/function
>> from subfolders.  Is is possible to do it ?
> 
> It works for me.

You have to make sure that the definition is BEFORE the add_subdirectory call.

> 
>> By the way, what's the basic difference between macro/function in cmake
>> ?  Related to preprocessing like in C/C++ ?  What's the advantage of
>> distinguish them here ?
> 
> The details are in the docs, though you have to read carefully to
> notice. I think the biggest difference is that the contents of a macro
> are dropped in, as though with #define. Functions are an actual function
> call and functions have their own scope.
> 
> tyler

Two of the important differences:

- All variables are in the caller-scope (i.e. if you set/define a new variable, 
the change will be visible from the caller). In functions variables are local 
to the function and you need to use set(... PARENT_SCOPE) to propagate the 
value to the caller-scope.

- Macro arguments do NOT behave like normal variables. You have to always 
reference them with ${arg-name}, i.e. if(arg-name) or similar does not work. In 
functions the arguments are just regular variables.

Usually what you want is functions (unless you have to support an old CMake 
version that does not have them). Only in special cases where you want the 
automatic propagation of variable values to the caller-space should you use 
macros.

HTH

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] qt .qrc file modifications require two builds

2009-12-16 Thread Clinton Stimpson

On Dec 16, 2009, at 5:36 PM, David Cole wrote:

> On Wed, Dec 16, 2009 at 6:16 PM, Clinton Stimpson  
> wrote:
> On Wednesday 16 December 2009 04:05:22 pm Brad King wrote:
> > Clinton Stimpson wrote:
> > > It looks like a bug in the Xcode generator.
> > > Here's an even simpler example:
> > >
> > > project(test_xcode)
> > >
> > > add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/test.h
> > > COMMAND cp ${CMAKE_SOURCE_DIR}/test.h.in ${CMAKE_BINARY_DIR}/test.h
> > > DEPENDS ${CMAKE_SOURCE_DIR}/test.h.in
> > > )
> > >
> > > include_directories(${CMAKE_BINARY_DIR})
> > >
> > > add_executable(test_xcode
> > > ${CMAKE_BINARY_DIR}/test.h
> > > ${CMAKE_SOURCE_DIR}/test.h.in
> > > main.cpp)
> > >
> > > I have to hit build twice if test.h.in is modified.
> >
> > This is a known limitation, and it is very hard to fix because
> > Xcode does not provide real custom command support.  It only
> > provides "shell script" build phases which we use to drive a
> > Makefile system that has the real custom commands.  Currently
> > the projects that CMake generates do not convince Xcode to
> > run the shell script build phase at the right time in all cases.
> >
> > See CMake's BuildDepends test:
> >
> >
> > http://www.cmake.org/cgi-bin/viewcvs.cgi/Tests/BuildDepends/CMakeLists.txt?
> >revision=1.14&root=CMake&view=markup
> >
> > Note the "HELP_XCODE" blocks.
> >
> > -Brad
> 
> What about adding a custom build phase and insert it before the "Compile
> Sources" build phase?
> 
>  Build_Phases/bs_build_phases.html>
> 
> 
> Generated Xcode projects do use "Run Script" build phases... Perhaps there's 
> a way we could specify input and output files for those build phases. Those 
> bits of the UI seem to be empty when I inspect an Xcode project built from 
> your "test.h.in" example here.


If I specify the input (path to test.h.in) & output (path to generated test.h) 
for the "CMake Rules" build phase, the problem goes away.
Maybe we can put all inputs and all outputs in there for generated files in 
that project?  The script (makefile) it calls already has the smarts for which 
ones really need updating.
Or is there a reason we can't just add a build phase for each 
add_custom_command() ?  Possibly too much clutter?

Clint

___
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] using cmake to install dlls into windows/system32

2009-12-16 Thread James Zipperer
They're device driver dlls for use system-wide.

-James


From: David Cole [mailto:david.c...@kitware.com]
Sent: Wednesday, December 16, 2009 4:34 PM
To: James Zipperer
Cc: CMake mailing list
Subject: Re: [CMake] using cmake to install dlls into windows/system32

What's the reason they need to be there?

On Wed, Dec 16, 2009 at 7:18 PM, James Zipperer 
mailto:james.zippe...@modsystems.com>> wrote:
Yes, unfortunately they need to be there.

-James


From: David Cole [mailto:david.c...@kitware.com]
Sent: Wednesday, December 16, 2009 4:15 PM
To: James Zipperer
Cc: CMake mailing list
Subject: Re: [CMake] using cmake to install dlls into windows/system32

You should avoid this if at all possible.
Install dlls next to your program, not in the system32 directory.

Do you have a reason you need to install a dll there?


On Wed, Dec 16, 2009 at 6:42 PM, James Zipperer 
mailto:james.zippe...@modsystems.com>> wrote:
Does anyone have an example of how to install dlls into %WINDIR%/system32 using 
cmake/ cpack/nsis?  Thanks!

-James



This message contains information which is confidential and privileged. Unless 
you are the addressee (or authorized to receive for the addressee), you may not 
use, copy or disclose to anyone the message or any information contained in the 
message. If you have received the message in error, please advise the sender by 
reply e-mail and delete the message.

___
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



This message contains information which is confidential and privileged. Unless 
you are the addressee (or authorized to receive for the addressee), you may not 
use, copy or disclose to anyone the message or any information contained in the 
message. If you have received the message in error, please advise the sender by 
reply e-mail and delete the message.



This message contains information which is confidential and privileged. Unless 
you are the addressee (or authorized to receive for the addressee), you may not 
use, copy or disclose to anyone the message or any information contained in the 
message. If you have received the message in error, please advise the sender by 
reply e-mail and delete the message.
___
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] qt .qrc file modifications require two builds

2009-12-16 Thread David Cole
On Wed, Dec 16, 2009 at 6:16 PM, Clinton Stimpson wrote:

> On Wednesday 16 December 2009 04:05:22 pm Brad King wrote:
> > Clinton Stimpson wrote:
> > > It looks like a bug in the Xcode generator.
> > > Here's an even simpler example:
> > >
> > > project(test_xcode)
> > >
> > > add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/test.h
> > > COMMAND cp ${CMAKE_SOURCE_DIR}/test.h.in${CMAKE_BINARY_DIR}/test.h
> > > DEPENDS ${CMAKE_SOURCE_DIR}/test.h.in
> > > )
> > >
> > > include_directories(${CMAKE_BINARY_DIR})
> > >
> > > add_executable(test_xcode
> > > ${CMAKE_BINARY_DIR}/test.h
> > > ${CMAKE_SOURCE_DIR}/test.h.in
> > > main.cpp)
> > >
> > > I have to hit build twice if test.h.in is modified.
> >
> > This is a known limitation, and it is very hard to fix because
> > Xcode does not provide real custom command support.  It only
> > provides "shell script" build phases which we use to drive a
> > Makefile system that has the real custom commands.  Currently
> > the projects that CMake generates do not convince Xcode to
> > run the shell script build phase at the right time in all cases.
> >
> > See CMake's BuildDepends test:
> >
> >
> >
> http://www.cmake.org/cgi-bin/viewcvs.cgi/Tests/BuildDepends/CMakeLists.txt
> ?
> >revision=1.14&root=CMake&view=markup
> >
> > Note the "HELP_XCODE" blocks.
> >
> > -Brad
>
> What about adding a custom build phase and insert it before the "Compile
> Sources" build phase?
>
> <
> http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/XcodeBuildSystem/200-
> Build_Phases/bs_build_phases.html>
>
>
Generated Xcode projects do use "Run Script" build phases... Perhaps there's
a way we could specify input and output files for those build phases. Those
bits of the UI seem to be empty when I inspect an Xcode project built from
your "test.h.in" example here.

This issue appears to be reporting the same thing...

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

(So there's already a bug tracker entry about 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] using cmake to install dlls into windows/system32

2009-12-16 Thread David Cole
What's the reason they need to be there?


On Wed, Dec 16, 2009 at 7:18 PM, James Zipperer <
james.zippe...@modsystems.com> wrote:

>  Yes, unfortunately they need to be there.
>
>
>
> -James
>
>
>
>
>
> *From:* David Cole [mailto:david.c...@kitware.com]
> *Sent:* Wednesday, December 16, 2009 4:15 PM
> *To:* James Zipperer
> *Cc:* CMake mailing list
> *Subject:* Re: [CMake] using cmake to install dlls into windows/system32
>
>
>
> You should avoid this if at all possible.
>
> Install dlls next to your program, not in the system32 directory.
>
>
>
> Do you have a reason you need to install a dll there?
>
>
>
>
>
> On Wed, Dec 16, 2009 at 6:42 PM, James Zipperer <
> james.zippe...@modsystems.com> wrote:
>
> Does anyone have an example of how to install dlls into %WINDIR%/system32
> using cmake/ cpack/nsis?  Thanks!
>
>
>
> -James
>
>
>
>
>  --
>
> This message contains information which is confidential and privileged.
> Unless you are the addressee (or authorized to receive for the addressee),
> you may not use, copy or disclose to anyone the message or any information
> contained in the message. If you have received the message in error, please
> advise the sender by reply e-mail and delete the message.
>
>
> ___
> 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
>
>
>
> --
> This message contains information which is confidential and privileged.
> Unless you are the addressee (or authorized to receive for the addressee),
> you may not use, copy or disclose to anyone the message or any information
> contained in the message. If you have received the message in error, please
> advise the sender by reply e-mail and delete the message.
>
___
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] using cmake to install dlls into windows/system32

2009-12-16 Thread James Zipperer
Yes, unfortunately they need to be there.

-James


From: David Cole [mailto:david.c...@kitware.com]
Sent: Wednesday, December 16, 2009 4:15 PM
To: James Zipperer
Cc: CMake mailing list
Subject: Re: [CMake] using cmake to install dlls into windows/system32

You should avoid this if at all possible.
Install dlls next to your program, not in the system32 directory.

Do you have a reason you need to install a dll there?


On Wed, Dec 16, 2009 at 6:42 PM, James Zipperer 
mailto:james.zippe...@modsystems.com>> wrote:
Does anyone have an example of how to install dlls into %WINDIR%/system32 using 
cmake/ cpack/nsis?  Thanks!

-James



This message contains information which is confidential and privileged. Unless 
you are the addressee (or authorized to receive for the addressee), you may not 
use, copy or disclose to anyone the message or any information contained in the 
message. If you have received the message in error, please advise the sender by 
reply e-mail and delete the message.

___
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



This message contains information which is confidential and privileged. Unless 
you are the addressee (or authorized to receive for the addressee), you may not 
use, copy or disclose to anyone the message or any information contained in the 
message. If you have received the message in error, please advise the sender by 
reply e-mail and delete the message.
___
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] using cmake to install dlls into windows/system32

2009-12-16 Thread David Cole
You should avoid this if at all possible.

Install dlls next to your program, not in the system32 directory.

Do you have a reason you need to install a dll there?


On Wed, Dec 16, 2009 at 6:42 PM, James Zipperer <
james.zippe...@modsystems.com> wrote:

>  Does anyone have an example of how to install dlls into %WINDIR%/system32
> using cmake/ cpack/nsis?  Thanks!
>
>
>
> -James
>
>
>
> --
> This message contains information which is confidential and privileged.
> Unless you are the addressee (or authorized to receive for the addressee),
> you may not use, copy or disclose to anyone the message or any information
> contained in the message. If you have received the message in error, please
> advise the sender by reply e-mail and delete the message.
>
> ___
> 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] using cmake to install dlls into windows/system32

2009-12-16 Thread James Zipperer
Does anyone have an example of how to install dlls into %WINDIR%/system32 using 
cmake/ cpack/nsis?  Thanks!

-James



This message contains information which is confidential and privileged. Unless 
you are the addressee (or authorized to receive for the addressee), you may not 
use, copy or disclose to anyone the message or any information contained in the 
message. If you have received the message in error, please advise the sender by 
reply e-mail and delete the message.
___
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] qt .qrc file modifications require two builds

2009-12-16 Thread Clinton Stimpson
On Wednesday 16 December 2009 04:05:22 pm Brad King wrote:
> Clinton Stimpson wrote:
> > It looks like a bug in the Xcode generator.
> > Here's an even simpler example:
> >
> > project(test_xcode)
> >
> > add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/test.h
> > COMMAND cp ${CMAKE_SOURCE_DIR}/test.h.in ${CMAKE_BINARY_DIR}/test.h
> > DEPENDS ${CMAKE_SOURCE_DIR}/test.h.in
> > )
> >
> > include_directories(${CMAKE_BINARY_DIR})
> >
> > add_executable(test_xcode
> > ${CMAKE_BINARY_DIR}/test.h
> > ${CMAKE_SOURCE_DIR}/test.h.in
> > main.cpp)
> >
> > I have to hit build twice if test.h.in is modified.
>
> This is a known limitation, and it is very hard to fix because
> Xcode does not provide real custom command support.  It only
> provides "shell script" build phases which we use to drive a
> Makefile system that has the real custom commands.  Currently
> the projects that CMake generates do not convince Xcode to
> run the shell script build phase at the right time in all cases.
>
> See CMake's BuildDepends test:
>
>  
> http://www.cmake.org/cgi-bin/viewcvs.cgi/Tests/BuildDepends/CMakeLists.txt?
>revision=1.14&root=CMake&view=markup
>
> Note the "HELP_XCODE" blocks.
>
> -Brad

What about adding a custom build phase and insert it before the "Compile 
Sources" build phase?



Clint

___
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] qt .qrc file modifications require two builds

2009-12-16 Thread Brad King
Clinton Stimpson wrote:
> It looks like a bug in the Xcode generator.
> Here's an even simpler example:
> 
> project(test_xcode)
> 
> add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/test.h
> COMMAND cp ${CMAKE_SOURCE_DIR}/test.h.in ${CMAKE_BINARY_DIR}/test.h
> DEPENDS ${CMAKE_SOURCE_DIR}/test.h.in
> )
> 
> include_directories(${CMAKE_BINARY_DIR})
> 
> add_executable(test_xcode
> ${CMAKE_BINARY_DIR}/test.h
> ${CMAKE_SOURCE_DIR}/test.h.in
> main.cpp)
> 
> I have to hit build twice if test.h.in is modified.

This is a known limitation, and it is very hard to fix because
Xcode does not provide real custom command support.  It only
provides "shell script" build phases which we use to drive a
Makefile system that has the real custom commands.  Currently
the projects that CMake generates do not convince Xcode to
run the shell script build phase at the right time in all cases.

See CMake's BuildDepends test:

  
http://www.cmake.org/cgi-bin/viewcvs.cgi/Tests/BuildDepends/CMakeLists.txt?revision=1.14&root=CMake&view=markup

Note the "HELP_XCODE" blocks.

-Brad
___
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] Submitting build and test results to dashboard separately

2009-12-16 Thread Alexander Neundorf
On Wednesday 16 December 2009, Moreland, Kenneth wrote:
> I am setting up a ParaView dashboard for a cluster in which I have to
> compile on one computer and then submit a job to run parallel tests on
> another computer. This means I have to run one dashboard script to update
> and build the code.  At the end of this script I submit a parallel job to
> run the tests.  The problem I am having is that I cannot seem to submit the
> results to the dashboard in such a way that I get both the build and test
> information on the same entry.
>
> My current configuration is as follows.  To update, configure, and build
> the latest version I have a CTest script like the following:
>
> -Setup CMake variables-
...
> I am sure that the CMake variables are setup the same in both the build and
> test scripts; I am actually using the same script to setup both.
>
> Now here is the problem: each of the CTEST_SUBMIT()  create their own entry
> in the dashboard.  The first one creates one that reports on the build but
> is missing the test information.  The second one has the results of the
> test but has bogus information for the build.  Does anyone know how to get
> the the second submit to simply add the test information to the existing
> build information?  I tried simply removing the CTEST_START command from
> the test script, but in that case the submission fails outright.  I get
> output like the following:
>
> Test project /home/kmorel/dashboard/builds/ParaView3Experimental
> Cannot create directory /Testing/Temporary
> Cannot create log file: LastTest.log
> Start 1: QVTK-TestQtInitialization
> 1/1 Test #1: QVTK-TestQtInitialization    Passed9.38 sec
>
> 100% tests passed, 0 tests failed out of 1
>
> Total Test time (real) =  11.53 sec
> Cannot create directory /Testing
> Cannot open notes file
>Use HTTP Proxy: wwwproxy.sandia.gov:80
> Cannot create directory /Testing/Temporary
> Cannot create log file: LastSubmit.log
> Submit files (using http)
>Using HTTP submit method
>Drop site:http://
>Submission successful
> Error in read script:
> /home/kmorel/dashboard/scripts/ParaView3Experimental.cmake
>
> Any ideas?
>

Does CTEST_SUBMIT(PARTS ... ) what you want ?
It's here under "CDash Subprojects" : 
http://www.kitware.com/products/archive/kitware_quarterly0709.pdf

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


Re: [CMake] Build only what you need in third party libs

2009-12-16 Thread Alexander Neundorf
On Wednesday 16 December 2009, Brian Davis wrote:
> Sorry for the late reply... it's finals week (school).
>
> See below
>
> 2009/12/9 Alexander Neundorf 
>
> > On Saturday 05 December 2009, Brian Davis wrote:
> > > I have used boost jam before and there was a mechanism to build only
> > > what you need by specifying dependencies within the boost libraries. 
> > > bjam would
> > > then run off calculate deps and build only what I needed. In CMake is
> > > there
> > > such a feature to specify a third party library and specify only the
> > > targets you need to build as dependencies of my build target?
> > > i.e. can I use
> > >
> > > add_subdirectory( lib/3rdParty/Win32/boost-cmake-1_41_0 ./boost )
> > >
> > > then create a target that only uses say boost_filesystem and only have
> > > that built? Or do I need to build the world to get a handful of needed
> > > dll's that are actually used in my project?
> >
> > Maybe I'm missing the point, but let's say you have library A, B, C and D
> > (where B depends on A), and an executable foo, which links against B and
> > D. If you then just build the target "foo", the targets A, B and D will
> > be built
> > automatically (and not C, since foo does not depend on C).
> >
> > Is this what you mean ?
> >
> > Alex
>
> Yes this is it exactly.  The problem I have is how to specify these
> libraries in third party packages.  With boost there is BUILD_PROJECTS
> which is boost specific and seems kinda clunky.  i.e. I would like to set
> BUILD_PROJECTS=NONE and do as you suggest above.  Problem comes how do I

So you want to build just a part of boost, right ?

> specify this (or is it possible) in cmake.  I also made refrence to a
> namespace issue above which no one has answered.  If I make an uber project
> of multiple 3rd party libs then is'nt there a chance that (perhaps a bad
> example) that the third party lib will use the variable BUILD_PROJECTS as
> well.  If so what happens in cmake?  Each time I specify a new dependency
> then I have to run cmake again to build the MS VS project so I can compile.

You could add an add_custom_target(foo) and then use add_dependencies(foo lib1 
lib2), and then building foo will just build the libs it depends on.
But maybe this is what BUILD_PROJECTS does ?

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


Re: [CMake] Builds slow as they go

2009-12-16 Thread Alexander Neundorf
On Wednesday 16 December 2009, Phil Smith wrote:
> As Hawkeye said in the Second City version of Last of the Mohicans, "Me
> lie, big deal". Turns out I'd munged the path and have been using 2.6 all
> this time. Upgrading to 2.8 *did* make a *huge* difference, like 60% or so.
> Cow-orker had lied when he said he'd upgraded :-(
>
> Thanks!

Cool, so it works ok now for you ?

Alex


> ...phsiii
> -Original Message-
> From: Alexander Neundorf [mailto:a.neundorf-w...@gmx.net]
> Sent: Thursday, November 19, 2009 3:28 PM
> To: cmake@cmake.org
> Cc: Phil Smith
> Subject: Re: [CMake] Builds slow as they go
>
> On Thursday 19 November 2009, Phil Smith wrote:
> > Our build is on the order of 400 modules. It starts off very briskly and
>
> You mean like 400 targets, where the later ones depend on the earlier ones
> ? Maybe there's a lot of dependency scanning going on.
> Did you try cmake 2.8.0 ? This got faster there.
> Another option would of course be to try to reduce the dependencies.
>
> 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


Re: [CMake] qt .qrc file modifications require two builds

2009-12-16 Thread Clinton Stimpson

It looks like a bug in the Xcode generator.
Here's an even simpler example:

project(test_xcode)

add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/test.h
COMMAND cp ${CMAKE_SOURCE_DIR}/test.h.in ${CMAKE_BINARY_DIR}/test.h
DEPENDS ${CMAKE_SOURCE_DIR}/test.h.in
)

include_directories(${CMAKE_BINARY_DIR})

add_executable(test_xcode
${CMAKE_BINARY_DIR}/test.h
${CMAKE_SOURCE_DIR}/test.h.in
main.cpp)

I have to hit build twice if test.h.in is modified.

Clint


On Dec 16, 2009, at 2:00 PM, Glenn Hughes wrote:


Here's a very short example that demonstrates the problem.
This is a CMake file for the "states" qt 4.6 example
(Developer/Examples/Qt/animation/states)

#---
PROJECT(states) # the name of your project

CMAKE_MINIMUM_REQUIRED(VERSION 2.4.0)

FIND_PACKAGE(Qt4 REQUIRED) # find and setup Qt4 for this project

INCLUDE(${QT_USE_FILE})

SET ( states_SRCS main.cpp )
SET ( states_HEADERS main.h )
SET ( states_RESOURCES states.qrc )

QT4_WRAP_CPP( states_MOC_files ${states_HEADERS})
QT4_ADD_RESOURCES( states_RESOURCES_SOURCES ${states_RESOURCES} )

INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR} )

ADD_EXECUTABLE( states MACOSX_BUNDLE ${states_SRCS}
${states_MOC_files} ${states_RESOURCES_SOURCES} )
TARGET_LINK_LIBRARIES(states ${QT_LIBRARIES})

#---
Put this in the states directory, run CMake ./ -G Xcode
Open the Xcode project and build. Builds fine.
Next, open states.qrc, make any sort of modification, even just typing
a space. Save the file.
Build. You will notice the "run custom script" phase executes, but
that's all. (qrc_states.cxx is generated)
Press Build again. You will notice that qrc_states.cxx compiles and
the project is relinked. That should have been done the first time.

G
___
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] Updates to support Dignus cross-compiler on z/OS

2009-12-16 Thread Alexander Neundorf
On Wednesday 16 December 2009, Phil Smith wrote:
> These aren't all someone would need to use Dignus, as it's a two-step
> compiler: the C/C++ compilers generate assembler, and then there's an
> assemble step. But getting these files into CMake would be a step in the
> right direction.

Hmm, I think before adding them to cmake cvs they must be somewhat complete.

> The attached file is a ZIP file, renamed to (hopefully) avoid filtering. It
> contains 4 files, with path info included.
>
> Questions/etc. are welcome, of course!

Can you please create a bug report at http://public.kitware.com/Bug and attach 
the files there ?

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


Re: [CMake] qt .qrc file modifications require two builds

2009-12-16 Thread Glenn Hughes
Here's a very short example that demonstrates the problem.
This is a CMake file for the "states" qt 4.6 example
(Developer/Examples/Qt/animation/states)

#---
PROJECT(states) # the name of your project

CMAKE_MINIMUM_REQUIRED(VERSION 2.4.0)

FIND_PACKAGE(Qt4 REQUIRED) # find and setup Qt4 for this project

INCLUDE(${QT_USE_FILE})

SET ( states_SRCS main.cpp )
SET ( states_HEADERS main.h )
SET ( states_RESOURCES states.qrc )

QT4_WRAP_CPP( states_MOC_files ${states_HEADERS})
QT4_ADD_RESOURCES( states_RESOURCES_SOURCES ${states_RESOURCES} )

INCLUDE_DIRECTORIES( ${CMAKE_BINARY_DIR} )

ADD_EXECUTABLE( states MACOSX_BUNDLE ${states_SRCS}
${states_MOC_files} ${states_RESOURCES_SOURCES} )
TARGET_LINK_LIBRARIES(states ${QT_LIBRARIES})

#---
Put this in the states directory, run CMake ./ -G Xcode
Open the Xcode project and build. Builds fine.
Next, open states.qrc, make any sort of modification, even just typing
a space. Save the file.
Build. You will notice the "run custom script" phase executes, but
that's all. (qrc_states.cxx is generated)
Press Build again. You will notice that qrc_states.cxx compiles and
the project is relinked. That should have been done the first time.

G
___
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] qt .qrc file modifications require two builds

2009-12-16 Thread John Drescher
On Wed, Dec 16, 2009 at 3:27 PM, Glenn Hughes  wrote:
> Removed the globbing, same exact behavior.
> Any other ideas?
>
> Does this normally work for people? Any examples?
>

Works fine for me. Although I rarely update the .qrc files.

John
___
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] qt .qrc file modifications require two builds

2009-12-16 Thread Clinton Stimpson

Do you have a minimal example to demonstrate it?
I wonder if its related to how dependencies for qrc files are handled.

Clint

On Wednesday 16 December 2009 01:27:55 pm Glenn Hughes wrote:
> Removed the globbing, same exact behavior.
> Any other ideas?
>
> Does this normally work for people? Any examples?
>
> G
> ___
> 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] qt .qrc file modifications require two builds

2009-12-16 Thread Glenn Hughes
Removed the globbing, same exact behavior.
Any other ideas?

Does this normally work for people? Any examples?

G
___
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] Updates to support Dignus cross-compiler on z/OS

2009-12-16 Thread Phil Smith
These aren't all someone would need to use Dignus, as it's a two-step compiler: 
the C/C++ compilers generate assembler, and then there's an assemble step. But 
getting these files into CMake would be a step in the right direction.

The attached file is a ZIP file, renamed to (hopefully) avoid filtering. It 
contains 4 files, with path info included.

Questions/etc. are welcome, of course!
-- 
...phsiii

Phil Smith III
p...@voltage.com
Voltage Security, Inc.
www.voltage.com
(703) 476-4511 (home office)
(703) 568-6662 (cell)




dignusZOS.zzz
Description: dignusZOS.zzz
___
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] ExternalProject() Question

2009-12-16 Thread Michael Jackson
I am intrigued by the "ExternalProject" feature of CMake 2.8. One  
question that I have after reading through the Oct 09 "Kitware Source"  
is this. If I do a "make clean" or "rebuild" are all the  
"ExternalProjects" also cleaned/rebuilt? I could make an argument both  
ways but I was curious what the default was?


  One of my projects depends on HDF5, Tiff, Expat and Boost (And Qt  
Eventually). Writing directions to get everything downloaded and built  
is getting to be a pain. Would be simpler to have all that done for  
the user.


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

___
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] Acces macro/functions to subfolders

2009-12-16 Thread Tyler Roscoe
On Wed, Dec 16, 2009 at 05:55:54PM +0100, Olivier Pierard wrote:
> In order to be able to use a macro/function from several sub-folders, I
> would like to define it only once in the main CMakeLists.txt.  However,
> after some basic tests, It seems impossible to call this macro/function
> from subfolders.  Is is possible to do it ?

It works for me.

> By the way, what's the basic difference between macro/function in cmake
> ?  Related to preprocessing like in C/C++ ?  What's the advantage of
> distinguish them here ?

The details are in the docs, though you have to read carefully to
notice. I think the biggest difference is that the contents of a macro
are dropped in, as though with #define. Functions are an actual function
call and functions have their own scope.

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] install for subdirectories with 'ExludeFromAll'

2009-12-16 Thread Olivier Pierard
Dear all,

What's up with the install procedure of a target included in a
subdirectory with the option 'ExcludeFromAll'.  CMake says the behavior
is undefined.  I would expect a command like 'make install
target_with_exclude_from_all'.  How is it possible to manage that ?

I'm also wondering why cmake is parsing the subdirectory which is
defined as 'ExcludeFromAll' if the build of the target in that folder is
not explicitly stated (of course another target is not dependent of this
one) ?

Thank you very much,

Olivier

-- 
Olivier Pierard

CENAERO, Virtual Manufacturing Group

Bâtiment EOLE, 1er étage
Rue des Frères Wright, 29
B-6041 Gosselies
BELGIUM 

Tel: +32.(0)71.919374
Fax: +32.(0)71.919370

http://www.cenaero.be/

+-+-+- Disclaimer +-+-+-

http://www.cenaero.be/disclaimer

___
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] (no subject)

2009-12-16 Thread Johan Knutzen
Hi John,

Thank you! This looks very nice, and uses a bit different approach than the one 
used in PCHSupport. 

Will use this!

Johan

--- Den tis 2009-12-15 skrev John Drescher :

Från: John Drescher 
Ämne: Re: [CMake] (no subject)
Till: "Johan Knutzen" 
Kopia: cmake@cmake.org
Datum: tisdag 15 december 2009 15.08

On Tue, Dec 15, 2009 at 4:13 AM, Johan Knutzen  wrote:
>
> Hi!
>
> What is the status of scripts enabling precompiled headers for gcc/visual 
> studio? I've tried out PCHSupport_26 from 
> http://www.cmake.org/Bug/view.php?id=1260 but I couldn't get it to work. Does 
> anyone have any up to date script that works with 2.8?
>

I have not bothered in linux since I can use ccache to speed up
builds. In windows I use the following macro:

#

macro( SM_PCH_SUPPORT ProjectName )
if (MSVC)
    if (USE_MSVC_PCH)
    
        set_source_files_properties(${ProjectName}PCH.cxx
            PROPERTIES
            COMPILE_FLAGS "/Yc${ProjectName}PCH.h"
            )
        foreach( src_file ${${ProjectName}_SRCS} )
            set_source_files_properties(
                ${src_file}
                PROPERTIES
                COMPILE_FLAGS "/Yu${ProjectName}PCH.h"
                )
        endforeach( src_file ${${ProjectName}_SRCS} )
        
        list(APPEND ${ProjectName}_SRCS ${ProjectName}PCH.cxx)
        list(APPEND ${ProjectName}_EXT_HDRS ${ProjectName}PCH.h)

    endif(USE_MSVC_PCH)
endif (MSVC)
endmacro (SM_PCH_SUPPORT)

#


And this requires me to have my source variable named ${ProjectName}_SRCS

And my header variable to be named ${ProjectName}_EXT_HDRS

and the following files to exist in the same folder as the CMakeLists.txt

${ProjectName}PCH.cxx ${ProjectName}PCH.h

I generally put this macro in the main project before my first
add_subdirectory so that all subprojects can use the macro as well.

Then to activate this in a project. I place the macro call after I
define the list variables.

SET( smDataManagement_SRCS
    ./src/smData.cxx
    ./src/smDataOperation.cxx
    ./src/smCounterBalanceOperation.cxx
)

SET( smDataManagement_EXT_HDRS
    ./Include/smData.h
    ./Include/smDataOperation.h
    ./Include/smCounterBalanceOperation.h
)

SET( smDataManagement_MOC_HDRS
    
)

# some .ui files
SET( smDataManagement_UIS
)

# and finally an resource file
SET( smDataManagement_RCS
)

SET( smDataManagement_INT_HDRS

)

#Add precompiled header support
SM_PCH_SUPPORT(smDataManagement)

This works in cmake-2.6 and above.
John



  __
Låna pengar utan säkerhet. Jämför vilkor online hos Kelkoo.
http://www.kelkoo.se/c-100390123-lan-utan-sakerhet.html?partnerId=96915014___
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] Acces macro/functions to subfolders

2009-12-16 Thread Olivier Pierard
Dear all,

In order to be able to use a macro/function from several sub-folders, I
would like to define it only once in the main CMakeLists.txt.  However,
after some basic tests, It seems impossible to call this macro/function
from subfolders.  Is is possible to do it ?

By the way, what's the basic difference between macro/function in cmake
?  Related to preprocessing like in C/C++ ?  What's the advantage of
distinguish them here ?

Thanks for your help,

Olivier

-- 
Olivier Pierard

CENAERO, Virtual Manufacturing Group

Bâtiment EOLE, 1er étage
Rue des Frères Wright, 29
B-6041 Gosselies
BELGIUM 

Tel: +32.(0)71.919374
Fax: +32.(0)71.919370

http://www.cenaero.be/

+-+-+- Disclaimer +-+-+-

http://www.cenaero.be/disclaimer

___
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 ParaView parallel testing on windows

2009-12-16 Thread Biddiscombe, John A.
Clint,

Nice. This works perfectly (or at least as far as I can tell so far). 

Thanks a lot

JB

> -Original Message-
> From: Clinton Stimpson [mailto:clin...@elemtech.com]
> Sent: 15 December 2009 15:51
> To: Biddiscombe, John A.
> Cc: paraview-develop...@paraview.org; cmake@cmake.org
> Subject: Re: [CMake] CMake ParaView parallel testing on windows
> 
> 
> How about something like this:
> "${EXECUTABLE_OUTPUT_PATH}/\${CTEST_CONFIGURATION_TYPE}/
> MyTestExecutable"
> 
> Then CTEST_CONFIGURATION_TYPE is expanded at ctest time and the -C
> flag to ctest determines which configuration to use.
> 
> Clint
> 
> 
> On Dec 15, 2009, at 4:29 AM, Biddiscombe, John A. wrote:
> 
> > Erratum : I pasted the wrong version in to my earlier message, the
> > offending CMake line is
> > (the existing code) ${CXX_TEST_PATH}/ParallelIsoTest
> > and
> > ${CXX_TEST_PATH}/${CMAKE_INTDIR}/ParallelIsoTest
> > is what I tried but is replaced with $(OutDir)
> >
> >> -Original Message-
> >> From: paraview-developers-boun...@paraview.org [mailto:paraview-
> >> developers-
> >> boun...@paraview.org] On Behalf Of Biddiscombe, John A.
> >> Sent: 15 December 2009 11:31
> >> To: paraview-develop...@paraview.org
> >> Cc: cmake@cmake.org
> >> Subject: [Paraview-developers] CMake ParaView parallel testing on
> >> windows
> >>
> >> Whilst setting up a dashboard for ParaView using windows + MPI, I
> >> noticed
> >> that a number of tests always fail because the executable is not
> >> found. I
> >> find that CMake code such as this
> >>
> >> ADD_TEST(ParallelIso-image
> >>   ${VTK_MPIRUN_EXE} ${VTK_MPI_PRENUMPROC_FLAGS} $
> >> {VTK_MPI_NUMPROC_FLAG} 2
> >> ${VTK_MPI_PREFLAGS}
> >>   ${CXX_TEST_PATH}/${RelWithDebInfo}/ParallelIsoTest
> >>   -D ${VTK_DATA_ROOT}
> >>   -T ${VTK_BINARY_DIR}/Testing/Temporary
> >>   -V Baseline/Parallel/ParallelIso.cxx.png
> >>   ${VTK_MPI_POSTFLAGS}
> >> )
> >>
> >> does not get the executable path for the actual test set correctly to
> >> build/bin/RelWithDebInfo/ParallelIsoTest but only to
> >> build/bin/ParallelIsoTest
> >>
> >> I tried adding ${CMAKE_CFG_INTDIR}
> >>   ${CXX_TEST_PATH}/${CMAKE_CFG_INTDIR}/ParallelIsoTest
> >>
> >> and then running
> >> ctest -C RelWithDebInfo -V -R ParallelIso
> >>
> >> but the output is
> >> 270: Test command: "C:\Program Files\MPICH2\bin\mpiexec.exe" -np 2 -
> >> localonly -channel mt D:/cmakebuild/pv-shared/bin/$(OutDir)/
> >> ParallelIsoT
> >> est -D H:/VTKData -T D:/cmakebuild/pv-shared/VTK/Testing/Temporary -V
> >> Baseline/Parallel/ParallelIso.cxx.png
> >>
> >> where we have $(OutDir) rather than RelWithDebInfo.
> >>
> >> Is there a correct way to do this? I had a look at previous
> >> dashboards and
> >> see that there is no regular windows + Mpi + Parallel testing done
> >> for
> >> paraview (and now I know why!)
> >>
> >> Thanks for any pointers (My guess is that the ADD_TEST() command is
> >> internally substituting the bin dir for the first executable, but
> >> this is
> >> not applicable for the mpirun version)
> >>
> >> JB
> >>
> >> --
> >> John Biddiscombe,email:biddisco @ cscs.ch
> >> http://www.cscs.ch/
> >> CSCS, Swiss National Supercomputing Centre  | Tel:  +41 (91)
> >> 610.82.07
> >> Via Cantonale, 6928 Manno, Switzerland  | Fax:  +41 (91)
> >> 610.82.82
> >>
> >>
> >> ___
> >> Paraview-developers mailing list
> >> paraview-develop...@paraview.org
> >> http://public.kitware.com/mailman/listinfo/paraview-developers
> > ___
> > 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] Submitting build and test results to dashboard separately

2009-12-16 Thread Moreland, Kenneth
I am setting up a ParaView dashboard for a cluster in which I have to compile 
on one computer and then submit a job to run parallel tests on another 
computer. This means I have to run one dashboard script to update and build the 
code.  At the end of this script I submit a parallel job to run the tests.  The 
problem I am having is that I cannot seem to submit the results to the 
dashboard in such a way that I get both the build and test information on the 
same entry.

My current configuration is as follows.  To update, configure, and build the 
latest version I have a CTest script like the following:

-Setup CMake variables-

# Clear out binary directory and set defaults.
CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
FILE(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" "${CTEST_INITIAL_CACHE}")
FILE(MAKE_DIRECTORY "${CTEST_BINARY_DIRECTORY}/Testing/Notes")

CTEST_START(${CTEST_BUILD_MODE})
FOREACH(update_dir ${CTEST_EXTRA_UPDATE_DIRECTORIES} ${CTEST_SOURCE_DIRECTORY})
  CTEST_UPDATE(SOURCE ${update_dir})
ENDFOREACH(update_dir)
CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}")
CTEST_READ_CUSTOM_FILES("${CTEST_BINARY_DIRECTORY}") # Reads CTestCustom.ctest 
files
CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}")
CTEST_SUBMIT()

-Submit parallel test job-

When the parallel test job runs, it executes this script.

-Setup CMake variables-

CTEST_START(${CTEST_BUILD_MODE})
CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}")
CTEST_SUBMIT()

I am sure that the CMake variables are setup the same in both the build and 
test scripts; I am actually using the same script to setup both.

Now here is the problem: each of the CTEST_SUBMIT()  create their own entry in 
the dashboard.  The first one creates one that reports on the build but is 
missing the test information.  The second one has the results of the test but 
has bogus information for the build.  Does anyone know how to get the the 
second submit to simply add the test information to the existing build 
information?  I tried simply removing the CTEST_START command from the test 
script, but in that case the submission fails outright.  I get output like the 
following:

Test project /home/kmorel/dashboard/builds/ParaView3Experimental
Cannot create directory /Testing/Temporary
Cannot create log file: LastTest.log
Start 1: QVTK-TestQtInitialization
1/1 Test #1: QVTK-TestQtInitialization    Passed9.38 sec

100% tests passed, 0 tests failed out of 1

Total Test time (real) =  11.53 sec
Cannot create directory /Testing
Cannot open notes file
   Use HTTP Proxy: wwwproxy.sandia.gov:80
Cannot create directory /Testing/Temporary
Cannot create log file: LastSubmit.log
Submit files (using http)
   Using HTTP submit method
   Drop site:http://
   Submission successful
Error in read script: /home/kmorel/dashboard/scripts/ParaView3Experimental.cmake

Any ideas?

-Ken

     Kenneth Moreland
***  Sandia National Laboratories
***
*** *** ***  email: kmo...@sandia.gov
**  ***  **  phone: (505) 844-8919
***  web:   http://www.cs.unm.edu/~kmorel

___
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] qt .qrc file modifications require two builds

2009-12-16 Thread Michael Jackson



On Dec 15, 2009, at 7:24 PM, Glenn Hughes wrote:


Really? How could it? Suppose I only have 1 qrc file, named foo.qrc:
wouldn't these two lines be equivalent?

FILE (GLOB my_RESOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "res/ 
*.qrc"  )

SET( my_RESOURCES "res/foo.qrc")

???
TIA
G

On Tue, Dec 15, 2009 at 7:15 PM, John Drescher  
 wrote:

The CMake script in question looks more or less like:

FILE (GLOB my_RESOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "res/ 
*.qrc"  )

QT4_ADD_RESOURCES( my_RESOURCES_SOURCES ${my_RESOURCES} )

...


It's always best to not do any file globbing and add each file by
hand. I believe this is causing the problem.

John



I wont debate the merits of FILE(GLOB.. ) but looking back through the  
mail list archives FILE (GLOB ..) leads to more problems for more  
people than it probably solves. I would stay away from it unless you  
have some pretty special circumstances.


_
Mike Jackson  mike.jack...@bluequartz.net
BlueQuartz Softwarewww.bluequartz.net
Principal Software Engineer  Dayton, Ohio
___
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] SDL troubles on Mac OS X

2009-12-16 Thread David Cole
On Wed, Dec 16, 2009 at 1:48 AM, Michael Wild  wrote:

>
> On 15. Dec, 2009, at 23:46 , Glenn Hughes wrote:
>
> >> I think the SDL developers are just being a bit "too" slick. They are
> setting up SDL for Xcode development where typically you would link to the
> SDL and then have a "Copy Files Phase" where you copy the framework into the
> Application Bundle that resides in the build directory.
> >
> > Its a cultural difference also. Mac developers think of creating the
> > complete application as part of the build process. A Mac app generally
> > contains everything it needs so you can just drag it to another
> > machine and run it. I would never want a half-baked app that is wired
> > into my machine. Copying the libraries into the app isn't part of
> > "installation", its part of "building"... Copying the app somewhere
> > else is "installation" i.e. a no-op as far as my build process is
> > concerned.
> >
> > G
>
> In the case of OS X bundles, don't think of it like "installation". It's
> more like "finishing up".
>
> How about adding some logic to target_link_libraries that writes a file,
> similar to depend.internal, mapping the install-name of the linked libraries
> to their location (if a full path has been used for linking). This file
> could then be used by BundleUtilities.cmake. Probably one would need to
> black-list certain directories (such as /System/Library/Frameworks), or is
> this already done?
>
>
BundleUtilities avoids copying "system" files -- they are expected to be
installed everywhere by virtue of the fact that they "belong" to the OS.
Files in /System do not get copied in by default with the BundleUtilitles
fixup routines.

Most of our examples of using BundleUtilities occur at "make install" time
via cmake scripts, but you could just as easily use them as part of a
post-build custom command step on your bundle, as long as all of the
dependent pieces are ready to be assembled.

HTH,
David
___
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