[CMake] build.h instead of config.h

2011-01-17 Thread luxInteg
Greetings, I am learning cmake. I progressed to doing configH checks (libtool to cmake conversion). I have followed useful tips I obtained from this list and this link:- http://www.cmake.org/Wiki/CMake:How_To_Write_Platform_Checks I have a test projectwith the following features --i

[CMake] targetname_BINARY_DIR?

2011-01-17 Thread Pau Garcia i Quiles
Hello, If I use: project( blah ) that creates variables blah_SOURCE_DIR and blah_BINARY_DIR. Does anything like that exist for a *target* ? I've managed to emulate targetname_SOURCE_DIR with: get_target_property(${name}_SOURCEFILES ${name} SOURCES) list(GET ${name}_SOURCEFILES 0 ${name}_FI

Re: [CMake] xcode project and static library dependencies

2011-01-17 Thread Nick Kledzik
On Jan 13, 2011, at 1:57 PM, Bill Hoffman wrote: > On 1/13/2011 4:49 PM, Nick Kledzik wrote: >> On Jan 13, 2011, at 12:41 PM, Bill Hoffman wrote: >>> This is because Xcode provides no way to order static libraries as >>> far as I can tell, or to repeat them. Also, no way to depend on a >>> static

Re: [CMake] gcov: handling same file name in different directories

2011-01-17 Thread Marco Craveiro
On Sun, 2011-01-16 at 22:31 -0500, Bill Hoffman wrote: > A bug report with the patch would be the best thing to do. > this has been submitted as #0011717 http://www.cmake.org/Bug/view.php?id=11717 thanks for your time Bill. marco -- Constraint has encouraged not only economy, but also a cert

Re: [CMake] text file modifications while Install

2011-01-17 Thread Michael Hertling
On 01/17/2011 02:53 PM, Ilja Golshtein wrote: > Hello, list, > > please, suggest proper way to do some text file modifications while Install. > > Basically I need something similar with RPATH change Cmake does, > but against a configuration file. > > Currently I create amended version of the con

Re: [CMake] cmake and shell commands

2011-01-17 Thread Tyler Roscoe
On Mon, Jan 17, 2011 at 06:24:58PM +, mark...@email.it wrote: >ln -s lib/libfreenect.so.0.0 lib/libfreenect.so For this specific problem, check out: http://www.cmake.org/cmake/help/cmake-2-8-docs.html#prop_tgt:SOVERSION > Should I use: add_custom_command ? For the general problem of

Re: [CMake] Customize dependencies scanned by CMake

2011-01-17 Thread Dieter Oberkofler
Thanks' a lot! From: David Cole [mailto:david.c...@kitware.com] Sent: Monday, January 17, 2011 16:40 To: Dieter Oberkofler Cc: CMake@cmake.org Subject: Re: [CMake] Customize dependencies scanned by CMake See this command: http://cmake.org/cmake/help/cmake-2-8-docs.html#command:include_r

[CMake] cmake and shell commands

2011-01-17 Thread mark...@email.it
Hi everybody, I'd like to know if it is possible with cmake create a Makefile with shell commands. I mean, I need a Makefile of this type: # CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.6 # Default target executed when no arguments are given to m

Re: [CMake] Properly Detecting Win64

2011-01-17 Thread Michael Jackson
On Jan 17, 2011, at 1:23 PM, Eric Noulard wrote: > 2011/1/17 Michael Jackson : >> I have the following code: >> >> if ( "${CMAKE_SIZEOF_VOID_P}" EQUAL "8" ) >>set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-Win64") >> elseif( "${CMAKE_SIZEOF_VOID_P}" EQUAL "4" ) >>set(CPACK_PACKAGE_

[CMake] cmake and shell commands

2011-01-17 Thread mark...@email.it
Hi everybody, I'd like to know if it is possible with cmake create a Makefile with shell commands. I mean, I need a Makefile of this type: # CMAKE generated file: DO NOT EDIT! # Generated by "Unix Makefiles" Generator, CMake Version 2.6 # Default target executed when no arguments are given to m

Re: [CMake] Properly Detecting Win64

2011-01-17 Thread Eric Noulard
2011/1/17 Michael Jackson : > I have the following code: > > if ( "${CMAKE_SIZEOF_VOID_P}" EQUAL "8" ) >        set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-Win64") > elseif( "${CMAKE_SIZEOF_VOID_P}" EQUAL "4" ) >        set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-Win32") > else() >        set(CPA

[CMake] Properly Detecting Win64

2011-01-17 Thread Michael Jackson
I have the following code: if ( "${CMAKE_SIZEOF_VOID_P}" EQUAL "8" ) set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-Win64") elseif( "${CMAKE_SIZEOF_VOID_P}" EQUAL "4" ) set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-Win32") else() set(CPACK_PACKAGE_FILE_NAME "${PROJECT_NAME}-Un

Re: [CMake] How to assign version numbers from a source header to CMake variables?

2011-01-17 Thread SF Markus Elfring
The bug tracker is meant to help us track what bugs are going to be fixed in the upcoming releases of CMake. I have got no problems with this view. I have just dared to submit a feature request directly. It is not good as a general discussion mechanism because only a handful of CMake develo

Re: [CMake] How to assign version numbers from a source header to CMake variables?

2011-01-17 Thread David Cole
Markus, Please discuss things on the CMake mailing list and wait (sometimes a few days are necessary for a discussion to evolve and resolve itself into a conclusion) until there is a consensus about a course of action among the people discussing it on the mailing list before you bring things up in

Re: [CMake] complete rebuild

2011-01-17 Thread Peter Kümmel
On 17.01.2011 15:12, Peter Kümmel wrote: I also stumbled over this and found that it has to do with subversion. After reverting a file Studio is totally confused and shows this buggy behavior. Sorry, false alarm: pchs and a header with svnversion's output have triggered the rebuilds. Peter ___

Re: [CMake] How to assign version numbers from a source header to CMake variables?

2011-01-17 Thread SF Markus Elfring
Here is the code: I have found and implemented a solution that can extract data from a header file with the "help" from evaluation of regular expressions. file(STRINGS "${CPPCHECK_SOURCE_DIR}/lib/library_version.h" CPPCHECK_BUILD_SPECIFICATION REGEX "^[ \t]*#define[ \t]+CPPCHECK_LIBRARY

Re: [CMake] Customize dependencies scanned by CMake

2011-01-17 Thread Alexey Livshits
It looks that precompiled headers should help here. 2011/1/17 David Cole : > See this command: > http://cmake.org/cmake/help/cmake-2-8-docs.html#command:include_regular_expression > > If you can match many of the "header files that rarely, if ever, change" > with a regular expression based on dire

Re: [CMake] Customize dependencies scanned by CMake

2011-01-17 Thread David Cole
See this command: http://cmake.org/cmake/help/cmake-2-8-docs.html#command:include_regular_expression If you can match many of the "header files that rarely, if ever, change" with a regular expression based on directory and file name patterns, then you can reduce the number of entries in the genera

Re: [CMake] add_custom_command problem

2011-01-17 Thread Andrea Galeazzi
Title: korg Firma Eric Noulard ha scritto: 2011/1/17 Andrea Galeazzi : Eric Noulard ha scritto: 2011/1/17 Andrea Galeazzi : Il 17/01/2011 12.34, Eric Noulard ha scritto: I just realized something. Do you want    A) to increase the build number EACH time you build    B) to incr

Re: [CMake] complete rebuild

2011-01-17 Thread Peter Kümmel
I also stumbled over this and found that it has to do with subversion. After reverting a file Studio is totally confused and shows this buggy behavior. Only re-opening the solution helps. But after the next svn revert it starts again rebuilding everything. Anders, is your project also managed by

Re: [CMake] add_custom_command problem

2011-01-17 Thread Eric Noulard
2011/1/17 Andrea Galeazzi : > Eric Noulard ha scritto: > > 2011/1/17 Andrea Galeazzi : > > > Il 17/01/2011 12.34, Eric Noulard ha scritto: > > > I just realized something. > Do you want >    A) to increase the build number EACH time you build >    B) to increase the build number WHEN of of the SOUR

Re: [CMake] text file modifications while Install

2011-01-17 Thread Michael Wild
On 01/17/2011 02:53 PM, Ilja Golshtein wrote: > Hello, list, > > please, suggest proper way to do some text file modifications while Install. > > Basically I need something similar with RPATH change Cmake does, > but against a configuration file. > > Currently I create amended version of the con

Re: [CMake] add_custom_command problem

2011-01-17 Thread Andrea Galeazzi
Eric Noulard ha scritto: 2011/1/17 Andrea Galeazzi : Il 17/01/2011 12.34, Eric Noulard ha scritto: I just realized something. Do you want    A) to increase the build number EACH time you build    B) to increase the build number WHEN of of the SOURCES change?

[CMake] text file modifications while Install

2011-01-17 Thread Ilja Golshtein
Hello, list, please, suggest proper way to do some text file modifications while Install. Basically I need something similar with RPATH change Cmake does, but against a configuration file. Currently I create amended version of the config make-time and use it install-time. It does not look like a

Re: [CMake] add_custom_command problem

2011-01-17 Thread Eric Noulard
2011/1/17 Andrea Galeazzi : > Il 17/01/2011 12.34, Eric Noulard ha scritto: >> I just realized something. >> Do you want >>    A) to increase the build number EACH time you build >>    B) to increase the build number WHEN of of the SOURCES change? > > The B is definitely my choice. So then what is

Re: [CMake] add_custom_command problem

2011-01-17 Thread Andrea Galeazzi
Il 17/01/2011 12.34, Eric Noulard ha scritto: 2011/1/17 Andrea Galeazzi: Il 17/01/2011 11.09, Eric Noulard ha scritto: 2011/1/17 Andrea Galeazzi: I'm trying to invoke a program which increment the build number on a header I just realized something. Do you want A) to increase the build num

Re: [CMake] problem getting defines quoted properly

2011-01-17 Thread Andreas Pakulat
On 14.01.11 20:25:25, Andreas Pakulat wrote: > Hi, > > I'm trying to set a define so that it can be used as string-literal in > C++ code using add_definitions. This: > > add_definition( -DMYFOO=\"BAR BAZ\" ) > > works fine on linux, but breaks with MSVC6 on windows. I always thought > I understo

Re: [CMake] add_custom_command problem

2011-01-17 Thread Eric Noulard
2011/1/17 Andrea Galeazzi : > Il 17/01/2011 11.09, Eric Noulard ha scritto: >> >> 2011/1/17 Andrea Galeazzi: >>> >>> I'm trying to invoke a program which increment the build number on a >>> header I just realized something. Do you want A) to increase the build number EACH time you build B) t

Re: [CMake] add_custom_command problem

2011-01-17 Thread Andrea Galeazzi
Il 17/01/2011 11.09, Eric Noulard ha scritto: 2011/1/17 Andrea Galeazzi: I'm trying to invoke a program which increment the build number on a header file. I'm currently using the following statement: add_custom_command(OUTPUT "./BuildNumber.h" COMMAND "java" ARGS "-jar"

Re: [CMake] add_custom_command problem

2011-01-17 Thread Rolf Eike Beer
> I'm trying to invoke a program which increment the build number on a > header file. I'm currently using the following statement: > add_custom_command(OUTPUT "./BuildNumber.h" COMMAND "java" ARGS "-jar" Specify an absolute output path here, usually using CMAKE_CURRENT_BINARY_DIR or something s

Re: [CMake] add_custom_command problem

2011-01-17 Thread Eric Noulard
2011/1/17 Andrea Galeazzi : > I'm trying to invoke a program which increment the build number on a header > file. I'm currently using the following statement: > add_custom_command(OUTPUT "./BuildNumber.h" COMMAND "java" ARGS "-jar" >                                        "${TOOLS}\\BuildNumberUpda

[CMake] add_custom_command problem

2011-01-17 Thread Andrea Galeazzi
I'm trying to invoke a program which increment the build number on a header file. I'm currently using the following statement: add_custom_command(OUTPUT "./BuildNumber.h" COMMAND "java" ARGS "-jar" "${TOOLS}\\BuildNumberUpdater.jar"

Re: [CMake] Is HEADER_FILE_ONLY not working in Visual Studio 2010?

2011-01-17 Thread Andrea Galeazzi
Il 15/01/2011 0.34, aaron_wri...@selinc.com ha scritto: I have a project with custom resource files in it, and unfortunately they have the same extension as real resource files, so Visual Studio tries to compile them. This obviously doesn't work. So I set the HEADER_FILE_ONLY property on these f