Re: [CMake] Creating custom file before building/compiling with cmake

2010-08-21 Thread Michael Wild
On 21. Aug, 2010, at 16:48 , Roman Wüger @mac.com wrote: > OK, > > I added "CONFIGURE_FILE(xml/ApplicationVersion.xml.in > xml/ApplicationVersion.xml)" to the CMakeLists.txt file which builds the > main.cpp > The file "xml/ApplicationVersion.xml.in" looks like the following: > > > > ${BUIL

Re: [CMake] Creating custom file before building/compiling with cmake

2010-08-21 Thread Roman Wüger
After trying a bit around, the following will work:SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/xml/ApplicationVersion.xml) SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/xml/ApplicationVersion.xml PROPERTIES GEN

Re: [CMake] Creating custom file before building/compiling with cmake

2010-08-21 Thread Roman Wüger
OK, I added "CONFIGURE_FILE(xml/ApplicationVersion.xml.in xml/ApplicationVersion.xml)" to the CMakeLists.txt file which builds the main.cppThe file "xml/ApplicationVersion.xml.in" looks like the following:  ${BUILD_DATE}  ${BUILD_TIME}  ${BUILD_ARCHITECTURE}      ${BUILD_VERSION_MAJOR}    ${BUILD_V

Re: [CMake] Creating custom file before building/compiling with cmake

2010-08-21 Thread Michael Wild
The .in suffix is merely a convention. Refer to the documentation of the configure_file command for more info. Michael On 21.08.2010, at 11:04, "Roman Wüger" @mac.com wrote: > So, how must the file "ApplicationVersion.xml.in" looks like? I didn't find > the documentation for the *.in file ex

Re: [CMake] Creating custom file before building/compiling with cmake

2010-08-21 Thread Roman Wüger
So, how must the file "ApplicationVersion.xml.in" looks like? I didn't find the documentation for the *.in file extensions.Thanks in advanceBest RegardsNoRulezAm 21. Aug 2010 um 02:08 schrieb Michael Hertling :On 08/20/2010 12:42 PM, Michael Wild wrote: > > On 19. Aug, 2010, at 23:36 , Michael Her

Re: [CMake] Creating custom file before building/compiling with cmake

2010-08-20 Thread Michael Hertling
On 08/20/2010 12:42 PM, Michael Wild wrote: > > On 19. Aug, 2010, at 23:36 , Michael Hertling wrote: > >> On 08/19/2010 09:42 PM, Michael Wild wrote: >>> >>> In that case I recommend creating a CMake script (e.g. >>> create_application_version.cmake) which creates the ApplicationVersion.xml >>>

Re: [CMake] Creating custom file before building/compiling with cmake

2010-08-20 Thread Michael Wild
On 19. Aug, 2010, at 23:36 , Michael Hertling wrote: > On 08/19/2010 09:42 PM, Michael Wild wrote: >> >> In that case I recommend creating a CMake script (e.g. >> create_application_version.cmake) which creates the ApplicationVersion.xml >> file. It queries the current revision (have a look at

Re: [CMake] Creating custom file before building/compiling with cmake

2010-08-19 Thread Michael Hertling
On 08/19/2010 09:42 PM, Michael Wild wrote: > > In that case I recommend creating a CMake script (e.g. > create_application_version.cmake) which creates the ApplicationVersion.xml > file. It queries the current revision (have a look at FindSVN.cmake on how to > do this), determines the date and

Re: [CMake] Creating custom file before building/compiling with cmake

2010-08-19 Thread norulez
OK, thank you very much, I will try it Best Regards NoRulez Am 19.08.2010 um 21:42 schrieb Michael Wild : > > In that case I recommend creating a CMake script (e.g. > create_application_version.cmake) which creates the ApplicationVersion.xml > file. It queries the current revision (have a loo

Re: [CMake] Creating custom file before building/compiling with cmake

2010-08-19 Thread Michael Wild
In that case I recommend creating a CMake script (e.g. create_application_version.cmake) which creates the ApplicationVersion.xml file. It queries the current revision (have a look at FindSVN.cmake on how to do this), determines the date and time (this is a problem, refer to this thread for mo

Re: [CMake] Creating custom file before building/compiling with cmake

2010-08-19 Thread Roman Wüger
The file should be updated every time a build is started.Best RegardsNoRulezAm 19. Aug 2010 um 16:48 schrieb Michael Wild : On 19. Aug, 2010, at 16:38 , Roman Wüger @mac.com wrote: > Hello, > > i need to create a file called "ApplicationVersion.xml" before the main source file (main.cpp) would b

Re: [CMake] Creating custom file before building/compiling with cmake

2010-08-19 Thread Michael Wild
On 19. Aug, 2010, at 16:38 , Roman Wüger @mac.com wrote: > Hello, > > i need to create a file called "ApplicationVersion.xml" before the main > source file (main.cpp) would be compiled. > The file should contain some application details and the current Date/Time > and SVN Revision. > > How c

[CMake] Creating custom file before building/compiling with cmake

2010-08-19 Thread Roman Wüger
Hello,i need to create a file called "ApplicationVersion.xml" before the main source file (main.cpp) would be compiled.The file should contain some application details and the current Date/Time and SVN Revision.How can I create such file before the source file are compiled?How can I get the current