[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-build

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 cg.wowus...@gmail.com wrote: I would like to generate file that looks something like

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.cmake

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 dresche...@gmail.com wrote: On Wed, Jul 7, 2010 at 10:59 PM, Clark Gaebel cg.wowus...@gmail.com wrote: Is there any way I

Re: [CMake] Building a Version Header

2010-07-07 Thread Clark Gaebel
at 11:04 PM, John Drescher dresche...@gmail.com wrote: On Wed, Jul 7, 2010 at 10:59 PM, Clark Gaebel cg.wowus...@gmail.com 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

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 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 dresche...@gmail.com wrote: Nice. that works. I'm so sorry to be such a bother, but here's my output now... #define

[CMake] Non-build output

2010-06-20 Thread Clark Gaebel
How would I go about placing a text file in the same directory as a target's output? For example, let's say I have a target called foo, which creates an executable. foo has a config file called foo.conf that should always go in the same directory. At the moment, it resides in the src/ directory

Re: [CMake] Non-build output

2010-06-20 Thread Clark Gaebel
I'm doing exclusively out-of-source builds, so this is perfect. Thank you! Regards, -- Clark On 06/20/10 16:31, Eric Noulard wrote: 2010/6/20 Clark Gaebel cg.wowus...@gmail.com: How would I go about placing a text file in the same directory as a target's output? For example, let's say

[CMake] Shipping Config Files

2010-06-18 Thread Clark Gaebel
What would I need to add to my CMakeLists.txt to make sure that a config file in the src/ directory gets copied to the build output directory, and the install directory when make install is run? -- Regards, -Clark ___ Powered by www.kitware.com Visit

Re: [CMake] Using Valgrind on all tests

2010-06-07 Thread Clark Gaebel
This is almost perfect for my needs with a bit of trivial tweaking. I wish support was built-in to cmake just like valgrind-on-nightly-test was. Oh well. Thank you so much, -Clark On 06/07/10 17:46, Ben Boeckel wrote: Clark Gaebel cg.wowus...@gmail.com wrote: Hello, I've currently set up

[CMake] Using Valgrind on all tests

2010-06-06 Thread Clark Gaebel
Hello, I've currently set up CMake and CTest for my building and testing needs, but CDash just isn't for me. How do I set up CTest to run all the tests in Valgrind? Again, I don't want to use CDash - just CTest. Also, it'd be great if I get output on leaks, and silence when everything's alright.

[CMake] Enabling compiler flags for one file ONLY.

2010-06-01 Thread Clark Gaebel
I have a massive .cpp file that has been autogenerated ahead of time. However, whenever I build it, according to gcc timing information, it spends all its time in variable tracking. Therefore, I would like to enable the flag -fno-var-tracking for that file only (having variable debug information

[CMake] Trying to link my project with Boost.Thread using CMake

2010-05-23 Thread Clark Gaebel
When I link Boost.Thread to my boost_test executable, it gives me |make[2]: *** No rule to make target `/usr/lib64/libboost_thread-mt.so', needed by `gogo/test/test_boost'. Stop. | when I |make| it. Here's the offending CMake code, what am I doing wrong? |add_executable(boost_test