On 2013-04-23 16:00, Skippy VonDrake wrote:
Hmm... that is odd. I think there may be something else going on in your
project that is not obvious from the above information. I wrote a quick
example along the lines of what you show, and it worked fine for me. Actual
CMakeLists.txt I used is attache
> Hmm... that is odd. I think there may be something else going on in your
> project that is not obvious from the above information. I wrote a quick
> example along the lines of what you show, and it worked fine for me. Actual
> CMakeLists.txt I used is attached. (The foo.c can contain any compilin
Please keep this on list so that others may contribute/benefit. Thanks.
On 2013-04-23 10:43, Skippy VonDrake wrote:
Hmm... yes, I'm not sure if add_dependencies can be used to add a file
dependency to a target (the documentation only talks about adding other
targets as dependencies).
Usually th
On 2013-04-17 12:41, Skippy VonDrake wrote:
Thought I understood this - but alas my implementation is wrong.
Here's my test case with a top-level cmake file and 3 subdirectories:
'src', 'bin' and 'outdir'.
Top level CMakeLists.txt
cmake_minimum_required (VERSION 2.8)
project (copyFile)
> believe what you want is:
>
> add_custom_command(
> OUTPUT "${output}"
> DEPENDS "${input}"
> COMMAND ${CMAKE_COMMAND} -E copy
> "${input}" "${output}"
>
> ...which is roughly equivalent to a Makefile rule like:
>
> output: input
> cp input output
>
> IOW, the file "${o
On 2013-03-29 17:07, Skippy VonDrake wrote:
I'll look closer at add_custom_command. I want the file to copy over if
it has changed - at build time. Not cmake time. And not copy if it hasn't
changed. But that may not be doable.
Seems like every StackOverflow post I see has a different take on how
>> I'm using:
>>execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
>> )
>>
>> Should the file be copied when:
>> the file has changed AND a build is executed?
>> Or
>> the file has changed AND CMakeLists.txt has changed AND a build is
>> executed?
>>
>> Only the 2nd m
On 2013-03-29 15:15, Skippy VonDrake wrote:
I'm using:
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
)
Should the file be copied when:
the file has changed AND a build is executed?
Or
the file has changed AND CMakeLists.txt has changed AND a build is executed?
I'm using:
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different
)
Should the file be copied when:
the file has changed AND a build is executed?
Or
the file has changed AND CMakeLists.txt has changed AND a build is executed?
Only the 2nd method (when the CMakeLists.txt file