[cmake-developers] [CMake 0012442]: find_library iterates through paths before names
Mantis Bug Tracker
mantis at public.kitware.com
Fri Sep 2 16:20:43 EDT 2011
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=12442
======================================================================
Reported By: khusmann
Assigned To:
======================================================================
Project: CMake
Issue ID: 12442
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2011-09-02 16:20 EDT
Last Modified: 2011-09-02 16:20 EDT
======================================================================
Summary: find_library iterates through paths before names
Description:
find_library will check all the paths in its search before moving to the next
name to check. I would expect it to work the opposite way: checking all the
names before it moves to the next path. If the former detection scheme is
intentional, it should be specified in the documentation.
Steps to Reproduce:
Given a CMakeLists:
cmake_minimum_required(VERSION 2.8)
find_library(foo NAMES boost_system-mt boost_system HINTS /packages/boost/lib)
message(STATUS ${foo})
And if the following files exist:
/packages/boost/lib/libboost_system.so
/usr/lib/libboost_system-mt.so
It will find /usr/lib/libbost_system-mt.so instead of
/packages/boost/lib/libboost_system.so as I would expect. (Because the
directories in HINTS should be completely searched before system directories
are)
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2011-09-02 16:20 khusmann New Issue
======================================================================
More information about the cmake-developers
mailing list