View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0013241CMakeCMakepublic2012-05-21 11:492012-08-09 19:35
ReporterBrad King 
Assigned ToAlex Neundorf 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product VersionCMake 2.8.8 
Target VersionCMake 2.8.9Fixed in VersionCMake 2.8.9 
Summary0013241: WriteBasicConfigVersionFile produces bad files without CMAKE_SIZEOF_VOID_P
DescriptionModules/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.

TagsNo tags attached.
Attached Files

 Relationships
related to 0012958closedKitware Robot "Package Registry" undocumented 

  Notes
(0029525)
Brad King (manager)
2012-05-21 11:50

See 0012958:0029523 for relationship to issue 0012958.
(0029535)
Alex Neundorf (developer)
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 (manager)
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 (developer)
2012-05-23 14:51

Merged into next.
If CMAKE_SIZEOF_VOID_P is empty, it is ignored now.

 Issue History
Date Modified Username Field Change
2012-05-21 11:49 Brad King New Issue
2012-05-21 11:49 Brad King Status new => assigned
2012-05-21 11:49 Brad King Assigned To => Alex Neundorf
2012-05-21 11:50 Brad King Relationship added related to 0012958
2012-05-21 11:50 Brad King Note Added: 0029525
2012-05-21 16:29 Alex Neundorf Note Added: 0029535
2012-05-21 18:53 Brad King Note Added: 0029538
2012-05-23 14:51 Alex Neundorf Note Added: 0029549
2012-05-23 14:51 Alex Neundorf Status assigned => closed
2012-05-23 14:51 Alex Neundorf Resolution open => fixed
2012-08-09 19:35 David Cole Fixed in Version => CMake 2.8.9


Copyright © 2000 - 2018 MantisBT Team