[cmake-developers] Deterministic identifiers in CPack WiX generator

Ådne Hovda ahovda at openit.com
Thu Oct 10 16:50:06 EDT 2013


Hi Nils

On 10/10/2013 9:14 PM, Nils Gladitz wrote:
> I just pushed my first branch "wix-deterministic-ids" to the topic stage

Fantastic effort!

> I chose to generate identifiers after the following format:
>
> CM_<ID_TYPE><SCHEME_TYPE>_<ID_CONTENT>(_<COUNTER>)

I think the logic is sound, and the hash is useful for truncating long 
paths, but IMO you could skip the CM_<ID_TYPE><SCHEME_TYPE>_ part.

The SCHEME_TYPE is apparent from the presence of a hash, which anyway 
makes the id non-deterministic and unusable from other code. What does 
the CM_ prefix mean, btw?

IMO, the prefix is redundant since the IDs will be used in context, 
e.g.: <ComponentRef Id="share.cmake_2.8.Modules.BundleUtilities.cmake" 
/> or <Property Id="CMAKE_BINARY" Value="[#bin.cmake.exe]" />.

Simple is better. Finally, I would not replace '-' in file names with '_'.

Sorry for being so *over-the-top* finicky and thanks for looking into 
this. :-)

-- 
Ådne






More information about the cmake-developers mailing list