On 4/25/2012 3:15 PM, M Stauffer -V- wrote:
Is CMakeVersionSource.cmake run from cmake or as a cmake script from
makefiles (I'm assuming the latter is possible)?

It's run during CMake processing, not during the build.

If the former, then am
I right in thinking that if the user has changed branches since running
cmake, then the commit version will be wrong?

It's probably possible but CMake almost always reruns so we haven't
noticed problems.  That may be different for ITK though.

If such a cmake script
could be run from a makefile then the current commit and index status
would always be accurate.

The script should run at build time in a custom target that always runs
and on which other targets (that use the generated header) depend using
add_dependencies.  The generated header should be updated only when
changed (copy-if-different).

What do you then do with the CMake_VERSION_SOURCE variable? I'm thinking
I'd write what I'm looking to produce to a header file that's included
itkVersion.h.

Yes, it goes into a configured header file.

-Brad
_______________________________________________
Powered by www.kitware.com

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

Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-developers

Reply via email to