Re: [CMake] add_custom_target always runs?

2008-12-18 Thread Hugo Heden
2008/12/16 Tyler Roscoe ty...@cryptio.net: I am using what I think is a common pattern to create some headers. Following the example at http://www.cmake.org/Wiki/CMake_FAQ#How_do_I_generate_an_executable.2C_then_use_the_executable_to_generate_a_file.3F, I have an add_custom_command which calls

Re: [CMake] add_custom_target always runs?

2008-12-17 Thread Tyler Roscoe
On Wed, Dec 17, 2008 at 08:45:01AM +0100, Martin Apel wrote: I had a similar problem some time ago. I worked around it by first generating the header files into ${CMAKE_CURRENT_BINARY_DIR} and then execute 'cmake -E copy_if_different' to their target location. This way dependent files will

[CMake] add_custom_target always runs?

2008-12-16 Thread Tyler Roscoe
I am using what I think is a common pattern to create some headers. Following the example at http://www.cmake.org/Wiki/CMake_FAQ#How_do_I_generate_an_executable.2C_then_use_the_executable_to_generate_a_file.3F, I have an add_custom_command which calls a script (generateheader.py):

Re: [CMake] add_custom_target always runs?

2008-12-16 Thread Eric NOULARD
Le Tue, 16 Dec 2008 12:26:26 -0800, Tyler Roscoe ty...@cryptio.net a écrit : I am using what I think is a common pattern to create some headers. Following the example at http://www.cmake.org/Wiki/CMake_FAQ#How_do_I_generate_an_executable.2C_then_use_the_executable_to_generate_a_file.3F, I

Re: [CMake] add_custom_target always runs?

2008-12-16 Thread Alexander Neundorf
On Tuesday 16 December 2008, Tyler Roscoe wrote: I am using what I think is a common pattern to create some headers. Following the example at http://www.cmake.org/Wiki/CMake_FAQ#How_do_I_generate_an_executable.2C_then _use_the_executable_to_generate_a_file.3F, I have an add_custom_command

Re: [CMake] add_custom_target always runs?

2008-12-16 Thread Tyler Roscoe
On Tue, Dec 16, 2008 at 10:09:41PM +0100, Alexander Neundorf wrote: Did you try to use full pathes, i.e. use CMAKE_CURRENT_SOURCE_DIR and CMAKE_CURRENT_BINARY_DIR respectively ? Yes, all paths in my cmake files are based on ${CMAKE_CURRENT_SOURCE_DIR}. tyler

Re: [CMake] add_custom_target always runs?

2008-12-16 Thread Tyler Roscoe
On Tue, Dec 16, 2008 at 09:44:38PM +0100, Eric NOULARD wrote: Ok, so is it simply impossible to do delta builds if my build process needs add_custom_command/add_custom_target invocations? Is there some better way to have CMake create the headers for me? Does this behavior of

Re: [CMake] add_custom_target always runs?

2008-12-16 Thread Martin Apel
Tyler Roscoe wrote: On Tue, Dec 16, 2008 at 09:44:38PM +0100, Eric NOULARD wrote: Ok, so is it simply impossible to do delta builds if my build process needs add_custom_command/add_custom_target invocations? Is there some better way to have CMake create the headers for me? Does this