Commit Graph

3 Commits

Author SHA1 Message Date
Brad King b30b32a493 Drop find_(library|file|path) prefixes from PATH on non-Windows
Since commit v3.3.0-rc1~430^2 (Teach find_(library|file|path) to get
prefixes from PATH, 2015-02-18) we search in <prefix>/include and
<prefix>/lib directories for prefixes with bin directories in the PATH
environment variable.  The motivation was to support MSYS, MinGW and
similar Windows platforms in their default environments automatically.
At the time this behavior was thought to be worthwhile in general.

Suggested-by: Chuck Atkins <chuck.atkins@kitware.com>
2016-05-09 12:58:08 -04:00
Brad King ffc06c1239 Teach find_(library|file|path) to get prefixes from PATH (#15370)
The find_package command already knows how to compute installation
prefixes from PATH.  Use the same approach to establish prefixes for
find_library, find_file, and find_path to use to look in directories
like "<prefix>/lib[/<arch>]" and "<prefix>/include" for libraries and
headers.  This will reduce the amount of configuration end users need to
do to establish a work environment rooted under a specific prefix.
2015-02-19 10:03:17 -05:00
Brad King ce331bab92 find_library: Fix repeat call after changing directory content (#15293)
We use cmGlobalGenerator::GetDirectoryContent to avoid repeating
directory listings.  However, GetDirectoryContent loads content from
disk at most once.  This breaks find_library calls that occur when disk
content has changed since preceding find_library calls.

Teach cmGlobalGenerator::GetDirectoryContent to save the directory
modification time when content is loaded and re-load content if it
changes.

Create a RunCMake.find_library test with a case covering this.
2014-12-08 15:35:50 -05:00