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?
The hashes are deterministic. You should always get the same hash for the same path. "CM_" (CMake) is intend for cmake reserved IDs which will leave IDs not starting with CM_ to users. The explicit SCHEME_TYPE prevents you from creating a filename based on an existing hash which would conflict with a hash generated ID.

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 '_'.
<ID_TYPE> is primarily for me since I expect it makes IDs easier to trace when things don't work as expected/intended (plus that one extra character doesn't really hurt either).

Acording to the documentation on msdn "-" is not legal in identifiers.
Legal are A-Z a-z 0-9 . and _.

Nils
--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to