Re: [CMake] copy_if_different on build

2013-04-23 Thread Skippy VonDrake
> 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

Re: [CMake] copy_if_different on build

2013-04-17 Thread Skippy VonDrake
> 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

Re: [CMake] copy_if_different on build

2013-03-29 Thread Skippy VonDrake
>> 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

[CMake] copy_if_different on build

2013-03-29 Thread Skippy VonDrake
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

[CMake] gcc option passed to assembler

2010-09-16 Thread skippy VonDrake
Greetings, I have a project most of which is in C but it includes a couple of assembly files (.S). CMake builds it just fine until I add a preprocessor option meant for gcc - and that the assembler can't digest. Recently I set the COMPILE_FLAGS to include "-H". The compiler did as the flag specifi