summaryrefslogtreecommitdiffstats
path: root/Source/cmComputeLinkInformation.h
Commit message (Collapse)AuthorAgeFilesLines
* stringapi: Pass configuration names as stringsBen Boeckel2014-03-081-2/+2
|
* strings: Remove cmStdString referencesBen Boeckel2014-03-081-5/+5
| | | | | | | | | | | 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.
* stringapi: Use strings for the languagesBen Boeckel2014-03-081-2/+2
|
* Constify handling of link targets.Stephen Kelly2013-12-111-8/+9
|
* cmTarget: Make GetProperty() const.Stephen Kelly2013-10-311-4/+4
| | | | | | This has follow-on effects for other methods and classes. Further work on making the use of const cmTarget pointers common can be done, particularly with a view to generate-time methods.
* Recognize shared library files with a numerical suffixStephen Kelly2013-05-211-1/+2
| | | | | | When processing link line entries we check for matches with known naming patterns for static and shared libraries. Teach this logic to recognize numerical suffixes after shared library names such as "libfoo.so.1".
* Make linking APIs aware of 'head' targetStephen Kelly2013-01-081-1/+3
| | | | | | | | | | | The 'head' is the dependent target to be linked with the current target. It will be used to evaluate generator expressions with proper handling of mapped configurations and is used as the source target of properties. This requires that memoization is done with a key of a pair of target and config, instead of just config, because now the result also depends on the target. Removing the memoization entirely is not an option because it slows cmake down considerably.
* Optionally skip link dependencies on shared library filesBrad King2012-10-261-0/+1
| | | | | | | Add target property LINK_DEPENDS_NO_SHARED and initialization variable CMAKE_LINK_DEPENDS_NO_SHARED to enable this behavior. Suggested-by: Leif Walsh <leif.walsh@gmail.com>
* Recognize OpenBSD versioned .so names (#12954)Brad King2012-02-131-0/+1
| | | | | | OpenBSD shared library names end in a ".#.#" version number suffix. Teach cmComputeLinkInformation to tolerate the extra suffix after the normal library name suffixes when parsing library names.
* OpenBSD: Work-around static/runtime linker inconsistencyChuck Atkins2010-03-261-0/+3
| | | | | | | Detect the runtime linker's search path and add to the compile time linker's search path. This is needed because OpenBSD's static linker does not search for shared library dependencies in the same places as the runtime linker.
* 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.
* Factor implicit link info addition into methodsBrad King2009-08-241-0/+2
| | | | | | | In cmComputeLinkInformation::Compute we add implicit link information from languages other than the linker language to the end of the link line. This factors out that code into separate methods to improve readability and organization.
* ENH: Link runtime libraries of all languagesBrad King2009-07-271-0/+3
| | | | | | | | | | | | | | | | | | This adds implicit libraries and search directories for languages linked into a target other than the linker language to its link line. For example, when linking an executable containing both C++ and Fortran code the C++ linker is used but we need to add the Fortran libraries. The variables CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES contain the implicit libraries and directories for each language. Entries for the linker language are known to be implicit in the generated link line. Entries for other languages that do not appear in the known implicit set are listed explicitly at the end of the link line.
* STYLE: Factor cmComputeLinkInformation constructorBrad King2009-07-141-0/+1
| | | | | This factors some code out of the constructor into a new method cmComputeLinkInformation::LoadImplicitLinkInfo for readability.
* ENH: Keep target information in final link lineBrad King2008-09-151-3/+6
| | | | | | | In cmComputeLinkInformation items in the final link line returned by GetItems now contain a pointer to their corresponding cmTarget if they were produced by a target. This makes available the set of all targets linked.
* ENH: Support full-path libs w/out valid names.Brad King2008-07-231-0/+1
| | | | | | | | This change introduces policy CMP0008 to decide how to treat full path libraries that do not appear to be valid library file names. Such libraries worked by accident in the VS IDE and Xcode generators with CMake 2.4 and below. We support them in CMake 2.6 by introducing this policy. See policy documentation added by this change for details.
* ENH: Skip libs in known dirs for CMP0003 warnings.Brad King2008-07-231-1/+1
| | | | | | | Sometimes we ask the linker to search for a library for which the path is known but for some reason cannot be specified by full path. In these cases do not include the library in CMP0003 warnings because we know the extra paths are not needed for it.
* ENH: When preserving potentially static portions of original user link lines ↵Brad King2008-04-301-0/+1
| | | | recognize shared library names by their extension and skip them.
* ENH: Yet another attempt at warning for CMP0003.Brad King2008-03-211-1/+1
| | | | | | | - Give example code to avoid the warning - Make explanation more consise - Explicitly state this is for compatibility - Issue the warning for at most one target
* ENH: try to reduce the number of CMP0003 warnings that people see. Only ↵Bill Hoffman2008-03-181-1/+1
| | | | report them for unique sets of libraries with no full path. Also add a message explaining the course of action that should be taken
* ENH: Convert CMAKE_LINK_OLD_PATHS to policy CMP0003.Brad King2008-03-131-2/+4
| | | | | | | | | - Policy is WARN by default so projects will build as they did in 2.4 without user intervention - Remove CMAKE_LINK_OLD_PATHS variable since it was never in a release and the policy supercedes it - Report target creation backtrace in warning message since policy should be set by that point
* ENH: Use builtin chrpath instead of relinking ELF targetsBrad King2008-03-011-1/+0
| | | | | | | | | | - Add cmSystemTools::ChangeRPath method - Add undocumented file(CHRPATH) command - When installing use file(CHRPATH) to change the rpath instead of relinking - Remove CMAKE_CHRPATH lookup from CMakeFindBinUtils - Remove CMAKE_USE_CHRPATH option since this should always work
* ENH: Better linker search path computation.Brad King2008-02-211-12/+15
| | | | | | | | | | | | | - Use linker search path -L.. -lfoo for lib w/out soname when platform sets CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME - Rename cmOrderRuntimeDirectories to cmOrderDirectories and generalize it for both soname constraints and link library constraints - Use cmOrderDirectories to order -L directories based on all needed constraints - Avoid processing implicit link directories - For CMAKE_OLD_LINK_PATHS add constraints from libs producing them to produce old ordering
* ENH: When linking to versioned targets whose real file name is known pass ↵Brad King2008-02-061-2/+1
| | | | the real name to the linker instead of the symlink name.
* BUG: Added TARGET_ARCHIVES_MAY_BE_SHARED_LIBS global property to help ↵Brad King2008-02-041-0/+3
| | | | compute proper rpath information on AIX when shared libraries have names like "libfoo.a".
* ENH: Pass dependent library search path to linker on some platforms.Brad King2008-02-011-41/+12
| | | | | | | | | | | | | | | | - Move runtime path ordering out of cmComputeLinkInformation into its own class cmOrderRuntimeDirectories. - Create an instance of cmOrderRuntimeDirectories for runtime path ordering and another instance for dependent library path ordering. - Replace CMAKE_DEPENDENT_SHARED_LIBRARY_MODE with explicit CMAKE_LINK_DEPENDENT_LIBRARY_FILES boolean. - Create CMAKE_LINK_DEPENDENT_LIBRARY_DIRS boolean. - Create variables to specify -rpath-link flags: CMAKE_SHARED_LIBRARY_RPATH_LINK_<LANG>_FLAG CMAKE_EXECUTABLE_RPATH_LINK_<LANG>_FLAG - Enable -rpath-link flag on Linux and QNX. - Documentation and error message updates
* ENH: Support linking to shared libs with dependent libsBrad King2008-01-311-1/+11
| | | | | | | | | - Split IMPORTED_LINK_LIBRARIES into two parts: IMPORTED_LINK_INTERFACE_LIBRARIES IMPORTED_LINK_DEPENDENT_LIBRARIES - Add CMAKE_DEPENDENT_SHARED_LIBRARY_MODE to select behavior - Set mode to LINK for Darwin (fixes universal binary problem) - Update ExportImport test to account for changes
* BUG: Move decision to switch library paths found in implicit link ↵Brad King2008-01-311-0/+2
| | | | 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: Update cmInstallTargetGenerator to get the shared libraries linked by a ↵Brad King2008-01-291-0/+2
| | | | target from cmComputeLinkInformation instead of duplicating the computation.
* ENH: Add cmTarget::GetLinkInformation method to allow several places in the ↵Brad King2008-01-291-0/+10
| | | | generators to share link information while only computing it once per configuration for a target. Use it to simplify the chrpath feature.
* ENH: Created cmComputeLinkDepends to compute link dependencies.Brad King2008-01-271-1/+1
| | | | | | | | - This will be useful for imported library dependencies - Replaces old cmTarget analyze-lib-depends stuff for linking - Formalizes graph construction and dump - Explicitly represents dependency inferral sets - Use BFS of initial dependencies to preserve order
* BUG: Fix cmComputeLinkInformation cycle detection.Brad King2008-01-231-2/+3
|
* ENH: Added CMAKE_LINK_OLD_PATHS compatibility mode for linker search paths.Brad King2008-01-231-0/+5
|
* BUG: Fix generation of Watcom link lines.Brad King2008-01-231-0/+1
| | | | | - Work-around bug in Watcom command line parsing for spaces in paths. - Add 'library' option before libraries specified by file path.
* BUG: When a library file name is linked without a path make sure the link ↵Brad King2008-01-221-0/+2
| | | | type is restored after the -l option.
* ENH: Implement linking with paths to library files instead of -L and -l ↵Brad King2008-01-221-0/+165
separation. See bug #3832 - This is purely an implementation improvement. No interface has changed. - Create cmComputeLinkInformation class - Move and re-implement logic from: cmLocalGenerator::ComputeLinkInformation cmOrderLinkDirectories - Link libraries to targets with their full path (if it is known) - Dirs specified with link_directories command still added with -L - Make link type specific to library names without paths (name libfoo.a without path becomes -Wl,-Bstatic -lfoo) - Make directory ordering specific to a runtime path computation feature (look for conflicting SONAMEs instead of library names) - Implement proper rpath support on HP-UX and AIX.