[CMake] Automatically add a revision number to the CPack installer name

Glenn Ramsey gr at componic.co.nz
Thu Mar 8 20:55:40 EST 2012


On 09/03/12 12:00, Eric Noulard wrote:
> 2012/3/8 Glenn Ramsey<gr at componic.co.nz>:
>> Yes, you can use add_custom_command(...) to run a script to get the revision
>> number, but I don't think you can use that to alter CPACK_PACKAGE_FILE_NAME,
>> which has been set at cmake time.
>
> This true but how wouldn't a revision update trigger a CMake re-run?

It appears not to. If I have a makefile build configured and I edit and commit a 
source code file, e.g. main.cpp in my example, and run make in the build dir 
then cmake does not get re-run. It appears to only re-run if one of the 
CMakeLists.txt files has been changed.

Glenn



More information about the CMake mailing list