2010/11/24 Dominique Belhachemi <domi...@cs.tu-berlin.de>:
>> The ${CMAKE_SOURCE_DIR}/copytree.cmake script simply looks like:
>>
>> FILE(COPY ${SRC} DESTINATION ${DST} PATTERN .svn EXCLUDE)
>>
> Thanks, I will see if this works for me.
>
>> Because FILE(COPY ...) copies files and directories only if they are new
> Does it mean it is a bug if FILE(COPY ...) doesn't copy new files?

Not in this case.
FILE( xxx) is CMake-time  command (it runs when CMake runs)

when you do "make" your are at "Build time"
at Build time, cmake may be [automatically] invoked again if some target
(library, executable, custom etc...) NEEDS a re-run because of a dependency.

In your example there is no mean for CMake to know that FILE(COPY ...)
generates a build time dependency.

So when a new file is added either your re-run cmake yourself
or you try Michael proposal
which adds this kind of "build time dependency" using custom target.

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to