Re: [CMake] building tests

2010-07-07 Thread Paul Harris
On 8 July 2010 12:56, Michael Wild wrote: > > On 8. Jul, 2010, at 4:40 , Paul Harris wrote: > > > On 7 July 2010 23:05, Michael Wild wrote: > > > >> > >> On 7. Jul, 2010, at 16:01 , Paul Harris wrote: > >> > >>> Hi all, > >>> > >>> I have looked and can't find the answer, so I turn to the list.

Re: [CMake] building tests

2010-07-07 Thread Michael Wild
On 8. Jul, 2010, at 4:40 , Paul Harris wrote: > On 7 July 2010 23:05, Michael Wild wrote: > >> >> On 7. Jul, 2010, at 16:01 , Paul Harris wrote: >> >>> Hi all, >>> >>> I have looked and can't find the answer, so I turn to the list. >>> >>> I have a CMakeLists.txt and a subdirectory called u

Re: [CMake] Building a Version Header

2010-07-07 Thread Clark Gaebel
Oh my god you're a genius. Thank you so much, kind sir! It works now! On 07/08/10 00:00, John Drescher wrote: > On Wed, Jul 7, 2010 at 11:58 PM, John Drescher wrote: > >>> Nice. that works. I'm so sorry to be such a bother, but here's my output >>> now... >>> >>> #define PROJECT_VERSION "v0.1

Re: [CMake] Building a Version Header

2010-07-07 Thread John Drescher
On Wed, Jul 7, 2010 at 11:58 PM, John Drescher wrote: >> Nice. that works. I'm so sorry to be such a bother, but here's my output >> now... >> >> #define PROJECT_VERSION "v0.1-345-ga77ede8-dirty >> " >> >> Needless to say, that's bad :( >> >> How would I go about removing that trailing newline? >>

Re: [CMake] Building a Version Header

2010-07-07 Thread John Drescher
> Nice. that works. I'm so sorry to be such a bother, but here's my output > now... > > #define PROJECT_VERSION "v0.1-345-ga77ede8-dirty > " > > Needless to say, that's bad :( > > How would I go about removing that trailing newline? > STRING(REGEX REPLACE on the PROJECT_VERSION in your CMakeLists

Re: [CMake] Building a Version Header

2010-07-07 Thread Clark Gaebel
Nice. that works. I'm so sorry to be such a bother, but here's my output now... #define PROJECT_VERSION "v0.1-345-ga77ede8-dirty " Needless to say, that's bad :( How would I go about removing that trailing newline? On 07/07/10 23:49, John Drescher wrote: > On Wed, Jul 7, 2010 at 11:43 PM, Clark

Re: [CMake] Building a Version Header

2010-07-07 Thread John Drescher
On Wed, Jul 7, 2010 at 11:43 PM, Clark Gaebel wrote: > Okay, I've almost got it. How do I make configure_file generate > something like... > > source: > #cmakedefine VERSION > Some thing like Version.h.in #define VERSION "@PROJECT_VERSION@" Try to look at my first example for usage. John

Re: [CMake] Building a Version Header

2010-07-07 Thread Clark Gaebel
Okay, I've almost got it. How do I make configure_file generate something like... source: #cmakedefine VERSION result: #define VERSION "v0.1-abcdef" where "v0.1-abcdef" is the contents of the variable PROJECT_VERSION in my CMakeLists.txt On 07/07/10 23:10, John Drescher wrote: > On Wed, Jul 7,

Re: [CMake] Building a Version Header

2010-07-07 Thread Clark Gaebel
Thank you! That's perfect. I just KNEW there would be a command to do that! On 07/07/10 23:10, John Drescher wrote: > On Wed, Jul 7, 2010 at 11:04 PM, John Drescher wrote: > >> On Wed, Jul 7, 2010 at 10:59 PM, Clark Gaebel wrote: >> >>> Is there any way I can use the output from a comman

Re: [CMake] building tests

2010-07-07 Thread Paul Harris
On 7 July 2010 23:38, Marcel Loose wrote: > On Wed, 2010-07-07 at 17:05 +0200, Michael Wild wrote: > > On 7. Jul, 2010, at 16:01 , Paul Harris wrote: > > > > > Hi all, > > > > > > I have looked and can't find the answer, so I turn to the list. > > > > > > I have a CMakeLists.txt and a subdirector

Re: [CMake] Building a Version Header

2010-07-07 Thread John Drescher
On Wed, Jul 7, 2010 at 11:04 PM, John Drescher wrote: > On Wed, Jul 7, 2010 at 10:59 PM, Clark Gaebel wrote: >> Is there any way I can use the output from a command-line program (in >> this case, "git describe --dirty") instead of using FindGit? >> > > I believe > add_custom_command > > but I can

Re: [CMake] Building a Version Header

2010-07-07 Thread John Drescher
On Wed, Jul 7, 2010 at 10:59 PM, Clark Gaebel wrote: > Is there any way I can use the output from a command-line program (in > this case, "git describe --dirty") instead of using FindGit? > I believe add_custom_command but I can not help with an example of that. John ___

Re: [CMake] Building a Version Header

2010-07-07 Thread Clark Gaebel
Is there any way I can use the output from a command-line program (in this case, "git describe --dirty") instead of using FindGit? On 07/07/10 22:58, John Drescher wrote: >> 1) I'm using git >> > I know. You have some work to do.. > On top of the minor differences in what you want the FindGIt

Re: [CMake] Building a Version Header

2010-07-07 Thread John Drescher
> 1) I'm using git I know. You have some work to do.. On top of the minor differences in what you want the FindGIt.cmake does not have that option to return the version so you need to adapt it to get the git version similar to the way the FindSubversion.cmake module does for subversion repositorie

Re: [CMake] Building a Version Header

2010-07-07 Thread Clark Gaebel
Couple things wrong with this: 1) I'm using git 2) If it outputs to the build directory, how do I refer to it? On 07/07/10 22:43, John Drescher wrote: > On Wed, Jul 7, 2010 at 9:44 PM, Clark Gaebel wrote: > >> I would like to generate file that looks something like this: >> >>// version.h

Re: [CMake] Building a Version Header

2010-07-07 Thread John Drescher
On Wed, Jul 7, 2010 at 9:44 PM, Clark Gaebel wrote: > I would like to generate file that looks something like this: > >    // version.h >    #define VERSION "v0.1-345-ga77ede8" > > where the version string is the result of running "git describe --tags > --dirty". How can I auto-generate this file,

Re: [CMake] building tests

2010-07-07 Thread Paul Harris
On 7 July 2010 23:05, Michael Wild wrote: > > On 7. Jul, 2010, at 16:01 , Paul Harris wrote: > > > Hi all, > > > > I have looked and can't find the answer, so I turn to the list. > > > > I have a CMakeLists.txt and a subdirectory called utils, which also has > its > > own CMakeLists.txt > > > > I

[CMake] Building a Version Header

2010-07-07 Thread Clark Gaebel
I would like to generate file that looks something like this: // version.h #define VERSION "v0.1-345-ga77ede8" where the version string is the result of running "git describe --tags --dirty". How can I auto-generate this file, include it in my project, and have it regenerate as a pre-buil

Re: [CMake] IF(TARGET var) fails on cmake 2.6.0

2010-07-07 Thread Brad King
On 7/7/2010 7:45 AM, Marcel Loose wrote: My pragmatic question is: is there a different way to check whether a target has already been defined, or not. Try this: get_target_property(mytarget_exists mytarget TYPE) if(mytarget_exists) message("YES") else() message("NO") endif()

Re: [CMake] Install PDB files

2010-07-07 Thread Rolf Eike Beer
Am Wednesday 07 July 2010 schrieb Patrick Spendrin: > Hello everybody, > > we're currently thinking about setting up a symbol server for our > project, and cannot find out how to install the pdb file together with > the install command (or in another way). > > Did somebody do this already? Is the

Re: [CMake] building tests

2010-07-07 Thread Marcel Loose
On Wed, 2010-07-07 at 17:05 +0200, Michael Wild wrote: > On 7. Jul, 2010, at 16:01 , Paul Harris wrote: > > > Hi all, > > > > I have looked and can't find the answer, so I turn to the list. > > > > I have a CMakeLists.txt and a subdirectory called utils, which also has its > > own CMakeLists.txt

Re: [CMake] problems with creating static library on aix

2010-07-07 Thread Verweij, Arjen
Hi, Apparently it had to do with the setting for "ncargs". Increasing it to 256 (blocks of 4K) solved it. Regards, Arjen >-Original Message- >From: cmake-boun...@cmake.org [mailto:cmake-boun...@cmake.org] On Behalf >Of Verweij, Arjen >Sent: dinsdag 6 juli 2010 18:55 >To: cmake@cmake.org

[CMake] Install PDB files

2010-07-07 Thread Patrick Spendrin
Hello everybody, we're currently thinking about setting up a symbol server for our project, and cannot find out how to install the pdb file together with the install command (or in another way). Did somebody do this already? Is there only the way to fetch the pdb files by hand? regards, Pa

Re: [CMake] PROJECT() command when cross compiling

2010-07-07 Thread Kishore
On Friday 02 Jul 2010 12:36:17 am Kishore wrote: > On Friday 02 Jul 2010 12:07:07 am Alexander Neundorf wrote: > > On Thursday 01 July 2010, Kishore wrote: > > > It seems that the PROJECT() command does a fair bit behind the scenes > > > and is not documented enough. It seems to "reset" several var

Re: [CMake] building tests

2010-07-07 Thread Michael Wild
On 7. Jul, 2010, at 16:01 , Paul Harris wrote: > Hi all, > > I have looked and can't find the answer, so I turn to the list. > > I have a CMakeLists.txt and a subdirectory called utils, which also has its > own CMakeLists.txt > > In the parent CML.txt, I have something like: > > ENABLE_TESTIN

[CMake] building tests

2010-07-07 Thread Paul Harris
Hi all, I have looked and can't find the answer, so I turn to the list. I have a CMakeLists.txt and a subdirectory called utils, which also has its own CMakeLists.txt In the parent CML.txt, I have something like: ENABLE_TESTING() add_subdirectory(utils) In my utils CML.txt, I have ADD_EXECUTA

Re: [CMake] CMAKE_DEBUG_POSTFIX

2010-07-07 Thread Michael Wild
On 7. Jul, 2010, at 15:39 , Diablo 666 wrote: > > Hi again, > > I tried using the CMAKE_DEBUG_POSTFIX to add a D to all library names on > Windows only. On Linux, they should not have a closing D. To this point, > everything is fine. > > But how can I link against these libraries? To keep th

Re: [CMake] Propagating variable to toplevel parent

2010-07-07 Thread Michael Wild
On 7. Jul, 2010, at 14:45 , Mathieu Malaterre wrote: > On Wed, Jul 7, 2010 at 1:07 PM, Bo Thorsen wrote: >> Den 07-07-2010 12:34, Mathieu Malaterre skrev: >>> >>> Hi there, >>> >>> I am wondering if I am missing anything here. How would one >>> propagate a variable across subdirectories in c

Re: [CMake] Propagating variable to toplevel parent

2010-07-07 Thread Mathieu Malaterre
On Wed, Jul 7, 2010 at 1:07 PM, Bo Thorsen wrote: > Den 07-07-2010 12:34, Mathieu Malaterre skrev: >> >> Hi there, >> >>   I am wondering if I am missing anything here. How would one >> propagate a variable across subdirectories in cmake ? I thought that a >> simple CACHE variable would do the tri

[CMake] IF(TARGET var) fails on cmake 2.6.0

2010-07-07 Thread Marcel Loose
Hi all, Today I stumbled upon the following problem. On a somewhat older machine we have cmake 2.6-patch 0 installed. Up till now I had done my development on a machine running cmake 2.6-patch 2, and everything was working fine, also with newer versions of cmake (2.6-patch 4, 2.8.1, etc). With c

Re: [CMake] Propagating variable to toplevel parent

2010-07-07 Thread Bo Thorsen
Den 07-07-2010 12:34, Mathieu Malaterre skrev: Hi there, I am wondering if I am missing anything here. How would one propagate a variable across subdirectories in cmake ? I thought that a simple CACHE variable would do the trick, but using cmake 2.8.1 I had to do the following trick list(APP

[CMake] Propagating variable to toplevel parent

2010-07-07 Thread Mathieu Malaterre
Hi there, I am wondering if I am missing anything here. How would one propagate a variable across subdirectories in cmake ? I thought that a simple CACHE variable would do the trick, but using cmake 2.8.1 I had to do the following trick list(APPEND v "42") # make sure to actually update the CAC

Re: [CMake] option bug ?

2010-07-07 Thread Michael Hertling
On 07/07/2010 09:40 AM, Chris Hillery wrote: > On Wed, Jul 7, 2010 at 12:32 AM, Michael Hertling wrote: > >> IMO, things aren't sooo bad. ;-) >> >> [100 lines of explanation of how SET() behaves in 6 different ways elided] >> > > I think you've just proven my point. Thanks! :) Actually, I in

Re: [CMake] option bug ?

2010-07-07 Thread Michael Wild
On 7. Jul, 2010, at 9:32 , Michael Hertling wrote: > On 07/03/2010 01:03 AM, Chris Hillery wrote: >> There's a slightly nicer work-around: Change project A's CMakeLists to set >> PROJB_OPENCV_LINK as a cache variable, ie, SET(PROJB_OPENCV_LINK NO CACHE >> BOOLEAN "doc"). I've tested it locally an

Re: [CMake] option bug ?

2010-07-07 Thread Chris Hillery
On Wed, Jul 7, 2010 at 12:32 AM, Michael Hertling wrote: > IMO, things aren't sooo bad. ;-) > > [100 lines of explanation of how SET() behaves in 6 different ways elided] > I think you've just proven my point. Thanks! :) Ceej aka Chris Hillery ___

Re: [CMake] option bug ?

2010-07-07 Thread Michael Hertling
On 07/03/2010 01:03 AM, Chris Hillery wrote: > There's a slightly nicer work-around: Change project A's CMakeLists to set > PROJB_OPENCV_LINK as a cache variable, ie, SET(PROJB_OPENCV_LINK NO CACHE > BOOLEAN "doc"). I've tested it locally and it works the way you want it to. > > It seems that CMak