Re: [CMake] Copy a input file from src folder to EXECUTABLE_OUTPUT_PATH

2011-12-13 Thread Michael Hertling
On 12/12/2011 04:36 PM, Michael Wild wrote: > On 12/12/2011 04:29 PM, Totte Karlsson wrote: >>> >>> At build time: >>> >> >>> ADD_CUSTOM_COMMAND(TARGET OneOfYourExecutables >>> COMMAND ${CMAKE_COMMAND} -E copy_if_different >>> //input.txt $) >>> ADD_CUSTOM_COMMAND(TARGET AnotherExecut

Re: [CMake] Copy a input file from src folder to EXECUTABLE_OUTPUT_PATH

2011-12-12 Thread Michael Wild
On 12/12/2011 04:29 PM, Totte Karlsson wrote: >> >> At build time: >> > >> ADD_CUSTOM_COMMAND(TARGET OneOfYourExecutables >> COMMAND ${CMAKE_COMMAND} -E copy_if_different >> //input.txt $) >> ADD_CUSTOM_COMMAND(TARGET AnotherExecutable >> COMMAND ${CMAKE_COMMAND} -E copy_if_diff

Re: [CMake] Copy a input file from src folder to EXECUTABLE_OUTPUT_PATH

2011-12-12 Thread Totte Karlsson
At build time: ADD_CUSTOM_COMMAND(TARGET OneOfYourExecutables COMMAND ${CMAKE_COMMAND} -E copy_if_different //input.txt $) ADD_CUSTOM_COMMAND(TARGET AnotherExecutable COMMAND ${CMAKE_COMMAND} -E copy_if_different //input.txt $) Personally, I'd prefer the latter as

Re: [CMake] Copy a input file from src folder to EXECUTABLE_OUTPUT_PATH

2011-12-06 Thread Totte Karlsson
I want to be moved to the same folder as the executables. How do I do that in CMake? At configuration time: CONFIGURE_FILE(//input.txt ${EXECUTABLE_OUTPUT_PATH} COPYONLY) Note that the destination directory, i.e. the EXECUTABLE_OUTPUT_PATH, possibly must already exist, and refer to the EXECU

Re: [CMake] Copy a input file from src folder to EXECUTABLE_OUTPUT_PATH

2011-12-05 Thread Michael Hertling
On 12/05/2011 10:30 PM, Totte Karlsson wrote: > Hi, > I have a tree of applications, some needing an inoput file to run. I have > CMake > compiling all of them and moving the executables to > EXECUTABLE_OUTPUT_PATH. In the src directories, I have some input.txt files > that > I want to be moved

[CMake] Copy a input file from src folder to EXECUTABLE_OUTPUT_PATH

2011-12-05 Thread Totte Karlsson
Hi, I have a tree of applications, some needing an inoput file to run. I have CMake compiling all of them and moving the executables to EXECUTABLE_OUTPUT_PATH. In the src directories, I have some input.txt files that I want to be moved to the same folder as the executables. How do I do that in