summaryrefslogtreecommitdiffstats
path: root/Source/cmFindLibraryCommand.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Refactor and seperate search path construction for find commandsChuck Atkins2014-11-111-1/+1
| | | | | | | Prior to this commit, the set of search paths to traverse for find commands was incrementally constructed. This change allows each group of paths, i.e. CMakeVariablePaths, UserHintsPaths, SystemEnvironmentPaths, etc. to be constructed and manipulated independently, and then all combined togethor.
* strings: Remove redundant calls to std::string::c_str()Nils Gladitz2014-10-151-10/+10
| | | | | Replacements were detected and performed by the clang tool remove-cstr-calls on a linux build.
* Remove some c_str() calls.Stephen Kelly2014-03-111-3/+3
| | | | | | Use the clang RemoveCStrCalls tool to automatically migrate the code. This was only run on linux, so does not have any positive or negative effect on other platforms.
* strings: Remove cmStdString referencesBen Boeckel2014-03-081-2/+2
| | | | | | | | | | | Casts from std::string -> cmStdString were high on the list of things taking up time. Avoid such implicit casts across function calls by just using std::string everywhere. The comment that the symbol name is too long is no longer relevant since modern debuggers alias the templates anyways and the size is a non-issue since the underlying methods are generated since it's inherited.
* Drop builtin command documentationBrad King2013-10-161-56/+0
| | | | | Drop all GetTerseDocumentation and GetFullDocumentation methods from commands. The command documentation is now in Help/command/*.rst files.
* find_library: Optionally consider all names in each directoryBrad King2012-09-251-0/+84
| | | | | | | When more than one value is given to the NAMES option this command by default will consider one name at a time and search every directory for it. Add a NAMES_PER_DIR option to tell this command to consider one directory at a time and search for all names in it.
* find_library: Simplify framework search logicBrad King2012-09-251-9/+12
| | | | | | In cmFindLibraryCommand::FindFrameworkLibrary drop use of the old SystemTools::FindDirectory method. Replace it with a direct implementation of the only code path we used.
* find_library: Refactor internal name iterationBrad King2012-09-251-37/+55
| | | | | | Teach cmFindLibraryHelper to support multiple possible names and iterate over all of them in each CheckDirectory call. For now we still only ever configure one name.
* Remove trailing whitespace from most CMake and C/C++ codeKitware Robot2012-08-131-1/+1
| | | | | | | | | | | | | | | | | Our Git commit hooks disallow modification or addition of lines with trailing whitespace. Wipe out all remnants of trailing whitespace everywhere except third-party code. Run the following shell code: git ls-files -z -- \ bootstrap doxygen.config '*.readme' \ '*.c' '*.cmake' '*.cpp' '*.cxx' \ '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \ '*.mm' '*.pike' '*.py' '*.txt' '*.vim' | egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' | egrep -z -v '^(Modules/CPack\..*\.in)' | xargs -0 sed -i 's/ \+$//'
* find_library: Fix mixed lib->lib64 (non-)conversion cases (#13419)Brad King2012-07-201-16/+35
| | | | | | | | When a search path contains multiple "lib/" instances we previously converted all or none. This fails for cases where only some of the multiple instances must be converted. Teach AddArchitecturePaths to generate all combinations that exist. Uncomment these cases in the CMakeOnly.find_library test now that they work.
* find_library: Simplify lib->lib<arch> expansionBrad King2012-07-201-17/+9
| | | | | | Simplify cmFindLibraryCommand::AddArchitecturePaths logic to avoid recording a separate 'found' status and populating an entire vector<string> just to throw it away.
* find_library: Refactor lib->lib64 conversionBrad King2012-07-201-48/+5
| | | | | | | Previously methods AddArchitecturePaths and AddLib64Paths were almost identical. Replace the latter with a call to the former. Fix the AddArchitecturePaths implementation to add trailing slashes to all tested paths.
* FIND_LIBRARY: document FIND_LIBRARY_USE_LIB64_PATHSRolf Eike Beer2012-03-291-1/+7
|
* Find_library(): allow searching for versioned shared objectsRolf Eike Beer2012-02-181-4/+14
| | | | | | | | | This did not work because find_library() did only treat the given name as complete filename if is matched "PREFIX.*SUFFIX": find_library(MYLIB libfoo.so.2) Now it is also taken as a whole if the name matches "PREFIX.*SUFFIX\..*".
* find_library: Use lib->lib64 conversion in CXX-only projects (#12247,#12248)Brad King2011-06-151-5/+0
| | | | | | | | | | | | Do not require the C language to be enabled to do lib->lib64 conversion. The check was originally added by commit a5825cd1 (check in new find stuff, 2006-03-02) to ensure that CMAKE_SIZEOF_VOID_P is set. Since commit 3fdf1411 (FIND_LIBRARY should not require CMAKE_SIZEOF_VOID_P, 2008-02-11) the code following the check does not fail when the variable is not set, so just remove the original check. This allows conversion for any language that is enabled so long as the address size is known. Reported-by: Christoph Höger <choeger@cs.tu-berlin.de>
* Teach find_(library|package) about Linux multiarch (#12037)Brad King2011-06-081-0/+4
| | | | | | | | | | | | | Implement support for multiarch as specified here: http://wiki.debian.org/Multiarch https://wiki.ubuntu.com/MultiarchSpec Detect the <arch> part of <prefix>/lib/<arch> from the implicit library search path from each compiler to set CMAKE_<lang>_LIBRARY_ARCHITECTURE. Define CMAKE_LIBRARY_ARCHITECTURE using one of these values (they should all be the same). Teach the find_library and find_package commands to search <prefix>/lib/<arch> whenever they would search <prefix>/lib.
* Speedup find_* commands (#11412)Brad King2010-11-121-5/+10
| | | | | | | Delay computation of the command documentation until it is needed. It is wasteful to do it in the constructor on every call. Inspired-By: Christian Ehrlicher <Ch.Ehrlicher@gmx.de>
* Convert CMake to OSI-approved BSD LicenseBrad King2009-09-281-14/+9
| | | | | | | This converts the CMake license to a pure 3-clause OSI-approved BSD License. We drop the previous license clause requiring modified versions to be plainly marked. We also update the CMake copyright to cover the full development time range.
* BUG: Fix lib/ to lib/64/ search path conversionBrad King2008-09-231-1/+2
| | | | | | | Automatic generation of 64-bit library search paths must preserve trailing slashes. This fixes a failure case exposed by the recent rewrite of find_library, which assumes trailing slashes occur on all search paths.
* ENH: Teach find_library to find OpenBSD-style libsBrad King2008-09-221-2/+30
| | | | | | | OpenBSD shared libraries use a ".so.<major>.<minor>" extension and do not have a symlink with just a ".so" extension. Its "ld" is capable of finding the library with the best version. This change adds support for finding such libraries. See issue #3470.
* ENH: Refactor find_library search logicBrad King2008-09-221-50/+207
| | | | | | | | Previously we searched for library files by enumerating every possible combination of prefix and suffix. Now we load (and cache) directory content from disk and search for matching file names. This should reduce disk access. It will also allow more advanced matching rules in the future. See issue #3470.
* ENH: Refactor find_* command framework/appbundle search order impl.Brad King2008-06-091-51/+66
| | | | | | | | | | | - CMAKE_FIND_FRAMEWORK and CMAKE_FIND_APPBUNDLE are supposed to specify whether to find frameworks/appbundles FIRST, LAST, ONLY, or NEVER. - Previously this affected only the placement of CMAKE_FRAMEWORK_PATH and CMAKE_APPBUNDLE_PATH with respect to the other path specifiers. - Now it behaves as documented. The entire search path is inspected for each kind of program, library, or header before trying the next kind. - Additionally the ONLY mode is now honored for headers so that users do not end up with a library in framework and a header from elsewhere.
* ENH: In find_* implementation centralize addition of trailing slashesBrad King2008-06-091-10/+0
| | | | | | - Create cmFindCommon::AddTrailingSlashes - Use it in cmFindBase and cmFindPackageCommand - Remove duplication from other find commands
* BUG: FIND_LIBRARY should not require CMAKE_SIZEOF_VOID_P to be set.Brad King2008-02-111-2/+2
|
* BUG: Fix recent find_library change to look for user-specified name first to ↵Brad King2008-02-101-6/+27
| | | | do so only if the name matches a valid library extension.
* ENH: Make find_library test for the library file as named before trying ↵Brad King2008-02-061-0/+10
| | | | prefixes and suffixes. This will allow users to explicitly search for static libraries on unix. See bug #1643.
* BUG: Move decision to switch library paths found in implicit link ↵Brad King2008-01-311-72/+0
| | | | directories to use -l options from cmFindLibraryCommand to cmComputeLinkInformation. Existing projects may depend on find_library returning a full path. This slightly weakens cmComputeLinkInformation but is necessary for compatibility.
* ENH: Apply new implicit link directory find_library policy when loading a ↵Brad King2008-01-241-0/+20
| | | | cache from an earlier CMake.
* ENH: Remove sparcv9 architecture subdir added earlier. The new implicit ↵Brad King2008-01-231-5/+0
| | | | link directory policy takes care of the problem.
* ENH: Teach find_library to avoid returning library paths in system ↵Brad King2008-01-231-1/+53
| | | | directories that may be converted to architecture-specific directories by the compiler when it invokes the linker.
* ENH: add return and break support to cmake, also change basic command ↵Ken Martin2008-01-231-1/+2
| | | | invocation signature to be able to return extra informaiton via the cmExecutionStatus class
* ENH: Enable library search path suffix for sparcv9 architecture. This ↵Brad King2008-01-231-24/+32
| | | | should be generalized to a platform file later.
* ENH: Add support to find_library to transform /lib to /lib32 on some ↵Brad King2008-01-211-0/+49
| | | | architectures.
* BUG: Fix previous commit to not access empty strings out of bounds.Brad King2008-01-211-1/+1
|
* BUG: Make sure search paths never have double-slashes. Leading with two ↵Brad King2008-01-201-2/+10
| | | | slashes (//) on cygwin looks like a network path and delays while waiting for a non-existent machine. This file was left out of the previous checkin for this problem.
* ENH: Major improvements to the FIND_PACKAGE command. See bug #3659.Brad King2008-01-171-0/+6
| | | | | | | | | - Use CMAKE_PREFIX_PATH and CMAKE_SYSTEM_PREFIX_PATH among other means to locate package configuration files. - Create cmFindCommon as base for cmFindBase and cmFindPackageCommand - Move common functionality up to cmFindCommon - Improve documentation of FIND_* commands. - Fix FIND_* commands to not add framework/app paths in wrong place.
* BUG: fix for bug 6039 LIB and INCLUDE not used for find stuffBill Hoffman2007-12-151-0/+1
|
* ENH: add support for CMAKE_FIND_PREFIX_PATH as discussed with Brad.Alexander Neundorf2007-10-261-0/+2
| | | | | | | | CMAKE_FIND_PREFIX_PATH is both an environment variable and a cmake variable, which is a list of base directories where FIND_PATH, FIND_FILE, FIND_PROGRAM and FIND_LIBRARY will search in the respective subdirectories Alex
* ENH: make commands lower case by defaultKen Martin2007-10-101-1/+1
|
* STYLE: add some newlines to cmake_install.cmake, so it's easier to readAlexander Neundorf2007-08-201-1/+1
| | | | | | -move the array behind the if, it's unused before it Alex
* ENH: Added global property FIND_LIBRARY_USE_LIB64_PATHS to allow lib64 paths ↵Brad King2007-06-271-2/+8
| | | | to be searched optionally. Turn off the feature on debian systems. This addresses debian report 419007.
* ENH: add cmExternalMakefileProjectGenerator, which should make it easier toAlexander Neundorf2007-06-081-0/+4
| | | | | | | | | write generators for IDE projects, which use already existing makefiles (current the kdevelop generator) -first stept of the export interface, iniitial export() command -more replacements for the FIND_XXX docs Alex
* BUG: If the user specifies a cache entry on the command line without a type, ↵Brad King2006-07-181-0/+9
| | | | the FIND_* commands should add the type and docstring to the given value and put it back in the cache.
* STYLE: fix line lengthKen Martin2006-05-101-3/+6
|
* STYLE: some m_ to this-> cleanupKen Martin2006-03-151-13/+13
|
* ENH: fix spelling errors in docsBill Hoffman2006-03-021-1/+1
|
* ENH: check in new find stuffBill Hoffman2006-03-021-102/+155
|
* BUG: use IsNOTFOUNDBill Hoffman2003-02-071-1/+1
|
* ENH: add checking for NOTFOUNDBill Hoffman2003-01-311-1/+2
|
* ENH: Moved ExpandListVariables out of individual commands. Argument ↵Brad King2002-12-111-4/+2
| | | | evaluation rules are now very consistent. Double quotes can always be used to create exactly one argument, regardless of contents inside.