[CMake] Visual Studio 2005 ADD_CUSTOM_TARGET

2007-10-04 Thread Neal Meyer
Here is what I have in my cmake file ADD_CUSTOM_TARGET( my_target ALL COMMAND build.bat DEPENDS ${SOURCES} ) In Visual Studio I'm expecting to get a Utility Project, the the build command set to build.bat, but the proje

Re: [CMake] Dealing with circular linker dependencies

2007-10-04 Thread Alexandru Ciobanu
Hi! I was able to build three circularly dependent libs with CMake. Still I strongly recommend listening to the advices of refactoring your code. If there is no other way around it here is what I have used. The procedure to follow ( on Linux ) where libfoo and libbar are the libraries you have.

Re: [CMake] ctest command

2007-10-04 Thread Juan Sanchez
Understood, but the terse nature of the man page makes the book a worthy second source. Regardless, not providing the proper options causes ctest look like it is running the tests, and that the tests are passing. If the online resources were up to snuff with regard to ctest, I would thoroughly ag

Re: [CMake] ctest command

2007-10-04 Thread Alan W. Irwin
On 2007-10-04 14:14-0500 Juan Sanchez wrote: I am trying to follow an example that is in the cmake book. It is in section 8.5 "Using CTest to Drive Complex Tests" on page 109. While my example differs in that it doesn't use all the arguments being used in the book's example, it is very importa

unsolved! Re: solved! Re: [CMake] ctest command

2007-10-04 Thread Juan Sanchez
I'll just have to go back to the wrapper script. I can't figure out why running make test can no trigger a rebuild. Also, "--build-noclean" does not help. Is there any natural way to get verbose output to the screen from an executable being run by ctest? Aside from a wrapper script, is there a

RE: [CMake] Version embedding - how to cause a command when make is run?

2007-10-04 Thread Alan W. Irwin
On 2007-10-04 18:20+0100 Atwood, Robert C wrote: From: Alan W. Irwin [...]I've tried the following in CMakeLists, placing the output of 'svnversion' and similar commands into an included source file and it works [...] Can some form of dependency be set so that if any source file is chan

solved! Re: [CMake] ctest command

2007-10-04 Thread Juan Sanchez
To solve my issue, I only need to specify the following. Otherwise, no error is printed, the test will always past, and ctest --debug prints pages and pages of debug info. ENABLE_TESTING() ADD_TEST("foo" ${CMAKE_CTEST_COMMAND} --build-and-test ${PROJECT_SOURCE_DIR} ${PROJECT_BINARY_DIR} --build-

Re: [CMake] ctest command

2007-10-04 Thread Juan Sanchez
I am trying to follow an example that is in the cmake book. It is in section 8.5 "Using CTest to Drive Complex Tests" on page 109. While my example differs in that it doesn't use all the arguments being used in the book's example, it is very important that I understand how to do this. My primary

Re: [CMake] ctest command

2007-10-04 Thread Alan W. Irwin
On 2007-10-04 13:03-0500 Juan Sanchez wrote: Hi, I'm trying to run the following test: ADD_TEST("foo" ${CMAKE_TEST_COMMAND} --build-run-dir ${PROJECT_SOURCE_DIR} -VV --test-command "ls -ltar /tmp") But it doesn't seem to be running correctly. It needs to be run from ${PROJECT_SOURCE_DIR}, and

Re: [CMake] Dealing with circular linker dependencies

2007-10-04 Thread David Cole
It's also *nearly/totally?* impossible for Windows dll builds, so if you ever intend to build them as dlls on Windows, rearchitect your project. Circular library dependencies are best avoided if at all possible. On 10/4/07, Juan Sanchez <[EMAIL PROTECTED]> wrote: > Aside from rearchitecting your

Re: [CMake] Version embedding - how to cause a command when make is run?

2007-10-04 Thread Omar Souka
On 10/4/07, Atwood, Robert C <[EMAIL PROTECTED]> wrote: > > Hi: > I have applied Cmake to a pre-existing project that used to use plain > make-files that I crafted with great amounts of hair-tearing, and so far > cmake was relatively easy and I am now a convert :=> Maybe my hair will > even grow ba

Re: [CMake] Dealing with circular linker dependencies

2007-10-04 Thread Juan Sanchez
Aside from rearchitecting your project. You need to place one library on both sides of the other library in the arguments to the linker. -l A -l B -l A This assures that the linker can resolve all the needed symbols. Juan Tal Blum wrote: > I have two c++ libraries each depending on the other w

[CMake] Dealing with circular linker dependencies

2007-10-04 Thread Tal Blum
I have two c++ libraries each depending on the other which creates a circular linker dependency problem. Does anyone know how to solve this problem? If this is not possible to solve at the command-line level can someone tell me how I can write a ADD_CUSTOM_COMMAND or ADD_CUSTOM_TARGET that will col

[CMake] ctest command

2007-10-04 Thread Juan Sanchez
Hi, I'm trying to run the following test: ADD_TEST("foo" ${CMAKE_TEST_COMMAND} --build-run-dir ${PROJECT_SOURCE_DIR} -VV --test-command "ls -ltar /tmp") But it doesn't seem to be running correctly. It needs to be run from ${PROJECT_SOURCE_DIR}, and the test command needs to be able to take the a

[CMake] Removing CMakeLists from Visual Studio project files or excluding from the build

2007-10-04 Thread Neal Meyer
Is there a way that the CMakeLists.txt files can be excluded from building in Visual Studio, or removed from the generated projects? -Neal ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake

RE: [CMake] Version embedding - how to cause a command when make is run?

2007-10-04 Thread Atwood, Robert C
> From: Alan W. Irwin > > [...]I've tried the following in CMakeLists, placing the output of > > 'svnversion' and similar commands into an included source > file and it > > works [...] > > > Can some form of dependency be set so that if any source file is > > changed [...] > > > Or, should I

Re: [CMake] Version embedding - how to cause a command when make is run?

2007-10-04 Thread Alan W. Irwin
On 2007-10-04 15:34+0100 Atwood, Robert C wrote: [...]I've tried the following in CMakeLists, placing the output of 'svnversion' and similar commands into an included source file and it works [...] Can some form of dependency be set so that if any source file is changed [...] Or, should I

Re: [Bulk] Re: [CMake] custom_command

2007-10-04 Thread Eric Noulard
2007/10/4, Dizzy <[EMAIL PROTECTED]>: > On Thursday 04 October 2007 17:20:54 Javier Gonzalez wrote: > > Hi again, > > > > Thanks Eric for the reply. I think what you propose doesn't work for me > > and please correct me if I'm wrong. I would like to keep the dependency > > and it seems to me that

Re: [CMake] Multiple makefile builds in a single in-source tree.

2007-10-04 Thread KSpam
Joe, Although I cannot help you with your specific question, I can tell you how I have accomplished multiple builds in a single out-of-source tree. This same process should translate to an in-source tree as well. I create a build directory in the top-level of my project. To build, I use the

[CMake] install before test

2007-10-04 Thread Juan Sanchez
How can you ensure that an install has done before you attempt to run the tests? Thanks, Juan -- Juan Sanchez [EMAIL PROTECTED] 800-538-8450 Ext. 54395 512-602-4395 ___ CMake mailing list CMake@cmake.org http://www.cmake.org/mailman/listinfo/cmake

Re: [Bulk] Re: [CMake] custom_command

2007-10-04 Thread Dizzy
On Thursday 04 October 2007 17:20:54 Javier Gonzalez wrote: > Hi again, > > Thanks Eric for the reply. I think what you propose doesn't work for me > and please correct me if I'm wrong. I would like to keep the dependency > and it seems to me that when I use CONFIGURE_FILE the file is not > genera

[CMake] Version embedding - how to cause a command when make is run?

2007-10-04 Thread Atwood, Robert C
Hi: I have applied Cmake to a pre-existing project that used to use plain make-files that I crafted with great amounts of hair-tearing, and so far cmake was relatively easy and I am now a convert :=> Maybe my hair will even grow back... However, there's a little thing I have not quite figured out

Re: [Bulk] Re: [CMake] custom_command

2007-10-04 Thread Javier Gonzalez
Hi again, Thanks Eric for the reply. I think what you propose doesn't work for me and please correct me if I'm wrong. I would like to keep the dependency and it seems to me that when I use CONFIGURE_FILE the file is not generated again (if I remove it, for example). I will do what you say and us

Re: [CMake] Headers listing in Visual Studio

2007-10-04 Thread Félix C. Morency
Thank you all, it does work perfectly. Félix C. Morency 2007/10/3, Ben Ratzlaff <[EMAIL PROTECTED]>: > > Here is how I do it: > > SET (MY_CPP > > ) > > SET (MY_H > > ) > > SOURCE_GROUP (name_of_group > FILES > ${MY_CPP} > ) > > SOURCE_GROUP (name_of_group\\headers > FILES > ${MY

RE: [CMake] Compiling without linking

2007-10-04 Thread Torsten Martinsen
Baptiste Derongs <> wrote: > Actually I have a file that contains a lot of functions, call this > file global.c. > Next I have multiple files, call them f1.c, f2.c, ... > > And each f*.c has to be compiled with global.c. Make a static library containing global.c, then link each application to it.

Re: [CMake] Compiling without linking

2007-10-04 Thread Baptiste Derongs
On 10/4/07, Torsten Martinsen <[EMAIL PROTECTED]> wrote: > Baptiste Derongs <> wrote: > > > The point is that I want a MakeFile that creates only the .o file, > > doesnt try to get binary. Next that same Makefile (and other ones) > > need the .o file to make other binaries. > > Instead of focussing

RE: [CMake] Compiling without linking

2007-10-04 Thread Torsten Martinsen
Baptiste Derongs <> wrote: > The point is that I want a MakeFile that creates only the .o file, > doesnt try to get binary. Next that same Makefile (and other ones) > need the .o file to make other binaries. Instead of focussing on how to do this small step, you should probably explain what it is

Re: [CMake] Compiling without linking

2007-10-04 Thread Baptiste Derongs
> On Wednesday 03 October 2007 16:27:14 Baptiste Derongs wrote: > > Hello all, > > > > I just begin in using Cmake (but I'm going faster than I never went > > with any configure.in), and I am wondering how to get a '.o' file (how > > to call gcc -c in fact). > > > > I tried to set CMAKE_C_FLAGS to

[CMake] make uninstall for project consisting of large number of sub-projects

2007-10-04 Thread Crni Gorac
We have a dozen sub-projects (libraries and executables), each of them with its individual CMakeLists.txt file, as well as "top-level" CMakeLists.txt file for the whole project that makes it possible (trough using ADD_SUBDIRECTORY()) to build all sub-projects at once. Now, we'd like to have "make u