MantisBT - CMake
View Issue Details
0015250CMakeModulespublic2014-11-13 12:382015-06-01 08:38
Felix Geyer 
 
normalminoralways
closedfixed 
CMake 3.0.2 
CMake 3.2CMake 3.2 
0015250: cmake --find-package ignores multi-arch dir
cmake --find-package ignores multi-arch dirs when looking for the library.

In Modules/CMakeFindPackageMode.cmake it sets CMAKE_${LANGUAGE}_LANGUAGE_ARCHITECTURE which I believe is a typo.
It should be CMAKE_${LANGUAGE}_LIBRARY_ARCHITECTURE.

It also doesn't set the CMAKE_LIBRARY_ARCHITECTURE variable.
Steps to reproduce in Debian unstable:
# apt-get install cmake libgdcm2-dev
# cmake --find-package -DNAME=GDCM -DLANGUAGE=CXX -DCOMPILER_ID=GNU -DMODE=COMPILE
GDCM not found.
CMake Error: Problem processing arguments. Aborting.

with the attached patch:

# cmake --find-package -DNAME=GDCM -DLANGUAGE=CXX -DCOMPILER_ID=GNU -DMODE=COMPILE
-I/usr/include/gdcm-2.4


The gdcm cmake files are located in /usr/lib/x86_64-linux-gnu/gdcm-2.4/
No tags attached.
patch cmake_findpackage_multiarch.patch (823) 2014-11-13 12:38
https://public.kitware.com/Bug/file/5297/cmake_findpackage_multiarch.patch
Issue History
2014-11-13 12:38Felix GeyerNew Issue
2014-11-13 12:38Felix GeyerFile Added: cmake_findpackage_multiarch.patch
2014-11-13 13:06Brad KingAssigned To => Alex Neundorf
2014-11-13 13:06Brad KingStatusnew => assigned
2014-11-13 13:06Brad KingTarget Version => CMake 3.2
2015-01-19 10:29Brad KingTarget VersionCMake 3.2 =>
2015-01-19 10:49Brad KingNote Added: 0037741
2015-01-19 10:50Brad KingAssigned ToAlex Neundorf =>
2015-01-19 10:50Brad KingStatusassigned => acknowledged
2015-01-19 10:50Brad KingTarget Version => CMake 3.2
2015-01-20 09:15Brad KingStatusacknowledged => resolved
2015-01-20 09:15Brad KingResolutionopen => fixed
2015-01-20 09:15Brad KingFixed in Version => CMake 3.2
2015-06-01 08:38Robert MaynardNote Added: 0038850
2015-06-01 08:38Robert MaynardStatusresolved => closed

Notes
(0037741)
Brad King   
2015-01-19 10:49   
I've applied the patch with a minor tweak:

 CMakeFindPackageMode: Fix Debian multiarch default guess
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=48984958 [^]

Please test.
(0038850)
Robert Maynard   
2015-06-01 08:38   
Closing resolved issues that have not been updated in more than 4 months.