[cmake-developers] [CMake 0013742]: find_path() ought to pick up architecture-specific headers on multiarch systems
Mantis Bug Tracker
mantis at public.kitware.com
Mon Nov 26 15:33:56 EST 2012
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=13742
======================================================================
Reported By: Nick Hutchinson
Assigned To:
======================================================================
Project: CMake
Issue ID: 13742
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2012-11-27 09:33 NZDT
Last Modified: 2012-11-27 09:33 NZDT
======================================================================
Summary: find_path() ought to pick up architecture-specific
headers on multiarch systems
Description:
On my Ubuntu 12.10 box, headers for libffi are located at
/usr/include/i386-linux-gnu/. This means that a simple find_path(FFI_INCLUDE_DIR
NAMES ffi.h) won't find the header, as /usr/include/i386-linux-gnu/ is not
searched by default. It ought to be; when compiling with either GCC or Clang,
this directory is in the default #include search list.
Steps to Reproduce:
1. On a multiarch system, e.g. Ubuntu, attempt to use find_path() to find an
architecture-specific header.
Expected behaviour:
It "just works": CMake searches the appropriate include directory, without
requiring the user to add any supplementary search paths, suffixes, and so on.
This seems to be the behaviour with find_library(), for example.
Actual behaviour:
CMake fails to find the header.
Additional Information:
I'm not sure how robust this is, but I'm currently working around this issue by
using the following:
find_file(FFI_INCLUDE_DIR NAMES ffi.h PATH_SUFFIXES
${CMAKE_LIBRARY_ARCHITECTURE})
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2012-11-27 09:33 Nick HutchinsonNew Issue
======================================================================
More information about the cmake-developers
mailing list