MantisBT - CMake
View Issue Details
0013241CMakeCMakepublic2012-05-21 11:492012-08-09 19:35
Brad King 
Alex Neundorf 
normalminoralways
closedfixed 
CMake 2.8.8 
CMake 2.8.9CMake 2.8.9 
0013241: WriteBasicConfigVersionFile produces bad files without CMAKE_SIZEOF_VOID_P
Modules/BasicConfigVersion-*.cmake.in contain the code

# check that the installed version has the same 32/64bit-ness as the one which is currently searching:
if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@")
  math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8")
  set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
  set(PACKAGE_VERSION_UNSUITABLE TRUE)
endif()

When this is configured with an empty CMAKE_SIZEOF_VOID_P the resulting file breaks. This breaks find_package calls that load the version file with an outright error instead of reporting an unsuitable version.

No tags attached.
related to 0012958closed Kitware Robot "Package Registry" undocumented 
Issue History
2012-05-21 11:49Brad KingNew Issue
2012-05-21 11:49Brad KingStatusnew => assigned
2012-05-21 11:49Brad KingAssigned To => Alex Neundorf
2012-05-21 11:50Brad KingRelationship addedrelated to 0012958
2012-05-21 11:50Brad KingNote Added: 0029525
2012-05-21 16:29Alex NeundorfNote Added: 0029535
2012-05-21 18:53Brad KingNote Added: 0029538
2012-05-23 14:51Alex NeundorfNote Added: 0029549
2012-05-23 14:51Alex NeundorfStatusassigned => closed
2012-05-23 14:51Alex NeundorfResolutionopen => fixed
2012-08-09 19:35David ColeFixed in Version => CMake 2.8.9

Notes
(0029525)
Brad King   
2012-05-21 11:50   
See 0012958:0029523 for relationship to issue 0012958.
(0029535)
Alex Neundorf   
2012-05-21 16:29   
I see.
It works if both the using package and the installed lib have a proper SIZEOF_VOID_P.

What should it do if one of them is empty ?
Accept or reject ?

If both are empty I guess it should accept (which it does right now).
(0029538)
Brad King   
2012-05-21 18:53   
Re 0013241:0029535: If the package version file is generated by a project that has not computed CMAKE_SIZEOF_VOID_P then it hasn't enabled any language like C or CXX and so probably doesn't care about the ABI. The ABI check should be skipped altogether in this case.
(0029549)
Alex Neundorf   
2012-05-23 14:51   
Merged into next.
If CMAKE_SIZEOF_VOID_P is empty, it is ignored now.