On Tue, Jan 12, 2010 at 02:09:36PM -0600, Daniel Blezek wrote:
> CONFIGURE_FILE(${DCMTK_SOURCE_DIR}/osconfig.h.in
>                ${DCMTK_BINARY_DIR}/include/dcmtk/config/osconfig.h)
> 
> However, every time I touch a CMake file, ³osconfig.h² is regenerated,
> causing nearly the entire library to re-build because of dependancies.  Is
> this a good/proper/recommended way to guard against regeneration of the
> file?

You could configure_file() to a temporary location, then
'cmake -E copy_if_different' from the temp location to the real
location. This way, the real osconfig.h is only updated (and the
dependent parts of the build are re-compiled) if something has changed.

tyler
_______________________________________________
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