Thanks Eric.
That clarifies lots of things.
Kind regards,
Jupiter
On 3/11/13, Eric Noulard eric.noul...@gmail.com wrote:
2013/3/11 hce jupiter@gmail.com:
Andreas Stahl wrote
Hello Jupiter,
can you post the error message here? I wasn't aware that install(FILES
...) did any checking
Hi Jupiter,
regarding your second question: you'd need to escape the nested
quotes. Also, I'm not sure if 'not exists' can be given in lowercase.
However, I'd strongly suggest using install(SCRIPT ...) instead of
install(CODE ...), precisely because of the escaping issues.
Petr
On Mon, Mar 11,
Thanks Petr. I changed to use SCRIPT, it still got syntax error either.
Please correct me what is wrong in the following statement.
install(SCRIPT
if (not exists ${destination}/myfile.txt)
install(FILES ${source}/myfile.txt DESTINATION ${destination})
endif()
)
Also, even the
install(SCRIPT ...) takes a name of a file as an argument, and
executes the CMake code in the file at installation time. That's why
you don't have to care about escaping there.
How this works is that the code in the file (or the code you give to
install(CODE ...)) is injected into
Am 11.03.2013 um 06:14 schrieb hce:
Hi,
I have following statement to install a file from source directory to
destination. It got a conflict error if the destination has already had the
file.
Hello Jupiter,
can you post the error message here? I wasn't aware that install(FILES ...) did
Andreas Stahl wrote
Hello Jupiter,
can you post the error message here? I wasn't aware that install(FILES
...) did any checking besides comparing the dates and overwriting if the
file to be installed is newer.
Also, you misunderstood what Petr meant. You need to escape the quotes in
the
2013/3/11 hce jupiter@gmail.com:
Andreas Stahl wrote
Hello Jupiter,
can you post the error message here? I wasn't aware that install(FILES
...) did any checking besides comparing the dates and overwriting if the
file to be installed is newer.
Also, you misunderstood what Petr meant. You
Hi,
I have following statement to install a file from source directory to
destination. It got a conflict error if the destination has already had the
file.
install(FILES ${source}/myfile.txt DESTINATION ${destination})
Is there anyway to set either overwrite, or no overwrite if the file