[CMake] Question about dependencies and paths

2009-12-29 Thread Talin
I've got a problem that has been vexing me for several months: It seems that when I create a custom rule using add_custom_command, the DEPENDS clause sometimes works and sometimes doesn't, and I can't figure out why. Here's what my custom rule looks like: # Link with stdlib string(REGEX REPLA

[CMake] Dependency scanning for non-supported languages?

2009-12-29 Thread Talin
What's the recommended way in CMake to do automated dependency generation for languages that aren't directly supported by CMake? Suppose my compiler generates an output file which contains a list of all the source files that were used to make it, and I have some tool that can extract this informati

Re: [CMake] compiling single source with different flags

2009-12-29 Thread Bart
Thanks for those suggestions, I was on that path, but I can not get it to work properly: foo$ cmake . -- Configuring done -- Generating done -- Build files have been written to: /home/bart/foo foo$ make Scanning dependencies of target foo make[2]: *** No rule to make target ` /home/bart/foo/foo_i

[CMake] example how to find a library with PKG_CHECK_MODULES and FIND_PACKAGE_HANDLE_STANDARD_ARGS

2009-12-29 Thread Claus Klein
according to Notes to authors of FindXXX.cmake files We would like all FindXXX.cmake files to produce consistent variable names. Please use the following consistent variable names for general use. XXX_FOUND : Set to false, or undefined, if we haven't found, or don't want to use XXX. XXX_

Re: [CMake] cmake file in build directory

2009-12-29 Thread John Drescher
On Tue, Dec 29, 2009 at 6:01 PM, Hicham Mouline wrote: > Hello, > > I am writing software that uses boost and Qt and other 3rd party libraries > for win/mingw, win/msvc2008 and linux/gcc. > The location of the 3rd party header files is different on each of the boxes > I compile on. > > Is there

[CMake] cmake file in build directory

2009-12-29 Thread Hicham Mouline
Hello, I am writing software that uses boost and Qt and other 3rd party libraries for win/mingw, win/msvc2008 and linux/gcc. The location of the 3rd party header files is different on each of the boxes I compile on. Is there a file to put in the build directory? Is such a file automatically re

[CMake] Policy Scope Question

2009-12-29 Thread Richard Wackerbarth
I have a question about policy CMP0011. I have: $ cat Call_process_dashboard.cmake # Call process_dashboard # These files are maintained by Richard Wackerbarth set(maintainer_email_account "Richard") set(maintainer_email_domain "NFSNet.org") IF(COMMAND CMAKE_POLICY) CMAKE_POLICY(SET CMP0011

[CMake] compiling single source with different flags

2009-12-29 Thread Bart
Hi, I'm trying to find a way to build a library with two different instances of the same source file. for example I would like to compile foo.c with -DDINT into foo_int.o and with -DDLONG into foo_long.o and have both objects added to the same library libfoo.a I have experimented with custom co

Re: [CMake] compiling single source with different flags

2009-12-29 Thread Michael Wild
On 29. Dec, 2009, at 21:44 , Eric Noulard wrote: > 2009/12/29 Richard Wackerbarth : >> Not as a "real" solution, but more as a "workaround", you could create a >> "derived source file" which is just a copy of the source file and then you >> would have two separate files to be compiled with the

Re: [CMake] compiling single source with different flags

2009-12-29 Thread Eric Noulard
2009/12/29 Richard Wackerbarth : > Not as a "real" solution, but more as a "workaround", you could create a > "derived source file" which is just a copy of the source file and then you > would have two separate files to be compiled with the appropriate flags. That's one solution, see below for m

Re: [CMake] compiling single source with different flags

2009-12-29 Thread Richard Wackerbarth
Not as a "real" solution, but more as a "workaround", you could create a "derived source file" which is just a copy of the source file and then you would have two separate files to be compiled with the appropriate flags. On Dec 29, 2009, at 2:22 PM, Bart wrote: > Hi, > > I'm trying to find a

[CMake] compiling single source with different flags

2009-12-29 Thread Bart
Hi, I'm trying to find a way to build a library with two different instances of the same source file. for example I would like to compile foo.c with -DDINT into foo_int.o and with -DDLONG into foo_long.o and have both objects added to the same library libfoo.a I have experimented with custom co

Re: [CMake] getting undefined error to my own libs.

2009-12-29 Thread Aaron_Wright
Just put the implementation of the template class in the declaration. Get that to work, then try to get fancy if you want to. - Aaron Wright "e...@cs.bgu.ac.il" Sent by: cmake-boun...@cmake.org 12/29/2009 08:54 AM To Eric Noulard cc cm

Re: [CMake] getting undefined error to my own libs.

2009-12-29 Thread e...@cs.bgu.ac.il
how much can this bloat my executable? On Tue 29 Dec 19:16 2009 aaron_wri...@selinc.com wrote: > With templates it's easiest to declare > and implement in one file. The compiler likes this. Anything else you try > requires extra work. Unless you're working in an embedded environment I > don't see h

Re: [CMake] getting undefined error to my own libs.

2009-12-29 Thread Aaron_Wright
With templates it's easiest to declare and implement in one file. The compiler likes this. Anything else you try requires extra work. Unless you're working in an embedded environment I don't see how executable size should even be a concern. ---

Re: [CMake] getting undefined error to my own libs.

2009-12-29 Thread e...@cs.bgu.ac.il
I'm trying to refrain from using that because it can bloat up the executable size... unless you can tell me otherwise. in general the program will be compiled using g++ for now, maybe I'll add support for windows compiler later. also, I'm trying to keep the definitions to the header files and the

Re: [CMake] Overriding read-only project's CMakeLists.txt

2009-12-29 Thread Kenneth Porter
--On Tuesday, December 29, 2009 5:55 PM +0100 Michael Wild wrote: Have a look at the -C option which allows you to set cache variables before anything else runs. You can use that in a batch script to set up things automatically. My initial attempt at that used John's example of if(MSVC) but

Re: [CMake] Overriding read-only project's CMakeLists.txt

2009-12-29 Thread Michael Wild
On 29. Dec, 2009, at 17:26 , Kenneth Porter wrote: > Where can I put build instructions that are build-host-wide, not project-wide? > > I'm relatively new to cmake. I want to "inject" some code before the > project's own script, and I'd prefer not to modify the project (since then > I'd have t

Re: [CMake] getting undefined error to my own libs.

2009-12-29 Thread e...@cs.bgu.ac.il
ok, I've read the links, let say I'm not use the export option, when I look at the how to avoid link errors here: http://www.parashift.com/c++-faq-lite/templates.html#faq-35.13 I see that what I've did is the same, isn't it? I'm not sure where to follow from here... if I've did what they say an

Re: [CMake] Overriding read-only project's CMakeLists.txt

2009-12-29 Thread John Drescher
> Where can I put build instructions that are build-host-wide, not > project-wide? > > I'm relatively new to cmake. I want to "inject" some code before the > project's own script, and I'd prefer not to modify the project (since then > I'd have to maintain the patch). > > I want to set the CMAKE__PR

[CMake] Overriding read-only project's CMakeLists.txt

2009-12-29 Thread Kenneth Porter
Where can I put build instructions that are build-host-wide, not project-wide? I'm relatively new to cmake. I want to "inject" some code before the project's own script, and I'd prefer not to modify the project (since then I'd have to maintain the patch). I want to set the CMAKE__PREFIX vari

Re: [CMake] [vtkusers] Coexistence of different Win32 libraries

2009-12-29 Thread John Drescher
On Tue, Dec 29, 2009 at 10:39 AM, Kenneth Porter wrote: > --On Monday, December 28, 2009 10:45 AM -0500 John Drescher > wrote: > >> Here is what I do. > >> [script] > > Thanks. Must I put that in the project's CMakeLists.txt or can I capture > that to a file I can inject each time I run cmake? I'

Re: [CMake] getting undefined error to my own libs.

2009-12-29 Thread e...@cs.bgu.ac.il
On Tue 29 Dec 17:16 2009 Eric Noulard wrote: > 2009/12/29 e...@cs.bgu.ac.il : > > hello Eric, thanks for the response. > > I'd like to solve the Array issue first, then the boost because I have a > > feeling it is a different one because when I disable the relevant code it > > doesn't generates

Re: [CMake] getting undefined error to my own libs.

2009-12-29 Thread Eric Noulard
2009/12/29 e...@cs.bgu.ac.il : > hello Eric, thanks for the response. > I'd like to solve the Array issue first, then the boost because I have a > feeling it is a different one because when I disable the relevant code it > doesn't generates the error even when other parts of the program (such as

Re: [CMake] getting undefined error to my own libs.

2009-12-29 Thread e...@cs.bgu.ac.il
hello Eric, thanks for the response. I'd like to solve the Array issue first, then the boost because I have a feeling it is a different one because when I disable the relevant code it doesn't generates the error even when other parts of the program (such as the threadpool). here are the array fi

Re: [CMake] getting undefined error to my own libs.

2009-12-29 Thread Eric Noulard
2009/12/29 e...@cs.bgu.ac.il : > hello. > I'm writing a c++ program that uses three shared libs that I wrote, for some > reason, when it gets to the main cpp file, it fails with undefined error. > here is the error report: Concerning the link error [apparently] related to boost usage I let Boost

[CMake] getting undefined error to my own libs.

2009-12-29 Thread e...@cs.bgu.ac.il
hello. I'm writing a c++ program that uses three shared libs that I wrote, for some reason, when it gets to the main cpp file, it fails with undefined error. here is the error report: Linking CXX executable ../build/ossm cd /home/da