summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallTargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Replace !foo.size() pattern with foo.empty().Stephen Kelly2015-01-181-1/+1
|
* Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-4/+4
| | | | All compilers hosting CMake support the std class.
* Fix some Clang -Wstring-conversion warningsSean McBride2014-12-121-1/+1
| | | | | Some false positives, but some flagged faulty asserts where the ! was inside the string instead of outside.
* OSX: Warn when attempting to change runtime paths on OS X 10.5Clinton Stimpson2014-10-101-27/+53
| | | | | | | | | | Even though 10.5 supports @rpath, the support is not complete enough for CMake. For instance, install_name_tool doesn't support adding and removing rpaths. Also modifying BundleUtilities test to remove an undesirable cmake generated runtime path. The intent was to build with the install rpath as is done with the other cases in this test.
* Merge topic 'install-cfbundle-directory'Brad King2014-07-141-0/+14
|\ | | | | | | | | a3ac67cc OS X: Install CFBundles as complete directories
| * OS X: Install CFBundles as complete directoriesTim Blechmann2014-07-101-0/+14
| | | | | | | | | | Install CFBundles as directories just like frameworks and application bundles.
* | install: Thread message level setting through internal APIBrad King2014-06-241-2/+4
| | | | | | | | | | | | | | Create a cmInstallGenerator::MessageLevel enumeration for future use in specifying install message verbosity. Thread values of the type through constructors and save the value as a member of cmInstallGenerator. Use only a "MessageDefault" value for now.
* | stringapi: Pass configuration names as stringsBen Boeckel2014-03-081-13/+16
| |
* | 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.
* OS X: Make sure RPATHs are unique to avoid possible corruption.Clinton Stimpson2014-02-031-8/+22
| | | | | | | | When using link_directories() and including CMAKE_CFG_INTDIR, one can end up with duplicate RPATHs in the binary which install_name_tool cannot fix without corrupting the binary. Also, the cmake_install.cmake file has been fixed to correctly handle these generator specific variables.
* Constify handling of link targets.Stephen Kelly2013-12-111-6/+8
|
* Merge topic 'INTERFACE_LIBRARY-target-type'Brad King2013-10-081-0/+5
|\ | | | | | | | | | | | | ce0c303 install: Teach EXPORT option to handle INTERFACE_LIBRARY targets 435c912 export: Add support for INTERFACE_LIBRARY targets fe73226 Add the INTERFACE_LIBRARY target type.
| * Add the INTERFACE_LIBRARY target type.Stephen Kelly2013-10-071-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This target type only contains INTERFACE_* properties, so it can be used as a structural node. The target-specific commands enforce that they may only be used with the INTERFACE keyword when used with INTERFACE_LIBRARY targets. The old-style target properties matching LINK_INTERFACE_LIBRARIES_<CONFIG> are always ignored for this target type. The name of the INTERFACE_LIBRARY must match a validity generator expression. The validity is similar to that of an ALIAS target, but with the additional restriction that it may not contain double colons. Double colons will carry the meaning of IMPORTED or ALIAS targets in CMake 2.8.13. An ALIAS target may be created for an INTERFACE library. At this point it can not be exported and does not appear in the buildsystem and project files are not created for them. That may be added as a feature in a later commit. The generators need some changes to handle the INTERFACE_LIBRARY targets returned by cmComputeLinkInterface::GetItems. The Ninja generator does not use that API, so it doesn't require changes related to that.
* | Generate modern-style cmake code.Stephen Kelly2013-08-221-12/+12
|/ | | | | | | | | | | The commits 9db31162 (Remove CMake-language block-end command arguments, 2012-08-13) and 77543bde (Convert CMake-language commands to lower case, 2012-08-13) changed most cmake code to use lowercase commands and no parameters in termination commands. However, those changes excluded cmake code generated in c++ by cmake. Make a similar style change to code generated by cmake.
* install: do not strip dll import libraries (#14123)Alex Neundorf2013-07-011-3/+3
| | | | DLL import libraries exist specifically to have symbols.
* OS X: Add RPATH support for Mac.Clinton Stimpson2013-06-031-19/+57
| | | | | | | | | RPATH support is activated on targets that have the MACOSX_RPATH property turned on. For install time, it is also useful to set INSTALL_RPATH to help find dependent libraries with an @rpath in their install name. Also adding detection of rpath conflicts when using frameworks.
* Refactor how bundles and frameworks are supported.Clinton Stimpson2013-05-231-8/+6
| | | | | | | | | | | | | | | | Make handling of directory separators consistent between non-bundle and bundle code. Remove xcode specific flag from cmTarget when getting install_name. Add (more) consistent convenience functions in cmTarget to get directories inside of bundles and frameworks to add files to. This refactor also fixes bug #12263 where frameworks had the wrong install name when SKIP_BUILD_RPATH. Also make install_name for frameworks consistent between Makefile and Xcode generator.
* Revert "Move GetLinkInformation to cmGeneratorTarget"Stephen Kelly2012-11-211-26/+4
| | | | | | | As we can't move all linking related code from cmTarget, it makes sense to reverse the move in some cases. This reverts commit 4f5384e75c6a00d110d3fa3f555a3f6a4f31bb46.
* Move GetLinkInformation to cmGeneratorTargetStephen Kelly2012-09-191-4/+26
|
* Add OBJECT_LIBRARY target typeBrad King2012-03-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This library type can compile sources to object files but does not link or archive them. It will be useful to reference from executable and normal library targets for direct inclusion of object files in them. Diagnose and reject the following as errors: * An OBJECT library may not be referenced in target_link_libraries. * An OBJECT library may contain only compiling sources and supporting headers and custom commands. Other source types that are not normally ignored are not allowed. * An OBJECT library may not have PRE_BUILD, PRE_LINK, or POST_BUILD commands. * An OBJECT library may not be installed, exported, or imported. Some of these cases may be supported in the future but are not for now. Teach the VS generator that OBJECT_LIBRARY targets are "linkable" just like STATIC_LIBRARY targets for the LinkLibraryDependencies behavior.
* Factor cmInstallType out of cmTarget::TargetTypeBrad King2012-02-271-6/+20
| | | | | | The purpose of the TargetType enumeration was overloaded for install type because install rules were once recorded as targets. Factor the install types out into their own enumeration.
* Add CMAKE_GNUtoMS option to convert GNU .dll.a to MS .libBrad King2011-12-051-2/+24
| | | | | | | | | | | | | | | | Teach the Windows-GNU.cmake platform file to look for Visual Studio tools matching the target ABI. Add an extra step to the link command for shared libraries and executables that export symbols and on which a new GNUtoMS property is set (initialized by the CMAKE_GNUtoMS option). Tell the GNU linker to output a module definition (.def) file listing exported symbols in addition to the GNU-format import library (.dll.a). Pass the .def file to the MS "lib" tool to construct a MS-format DLL import library (.lib). Teach the install(TARGETS) command to install the MS import library next to the GNU one. Teach the install(EXPORT) and export() command to set the IMPORTED_IMPLIB property pointing at the import library to use the import library matching the tools in the importing project.
* Tweak all files during target installationBrad King2009-10-211-48/+90
| | | | | | | | | | | | | During installation of a target we generate "tweak" rules to update the installed file (RPATH, strip, ranlib, etc.). However, some targets install multiple files, such as the versioned names of a shared library. Previously the extra files for a target have always been symbolic links, but for cross-compiling from Windows to UNIX they may need to be copies. This commit teaches the generated install scripts to loop over all files installed for the target to apply tweaks to those that are not symlinks. See issue #9171.
* Compute install destination for all target filesBrad King2009-10-211-70/+70
| | | | | | | | | In cmInstallTargetGenerator::GenerateScriptForConfig we were computing the full 'from' paths for all target files to be installed, but only computing a 'to' path for the "main" target file. This commit teaches the method to compute both 'from' and 'to' paths for every target file to be installed. The result is cleaner, easier to follow, and will allow installation tweaks to be added later on all target files.
* Simplify 'strip' and 'ranlib' install tweak codeBrad King2009-10-211-6/+4
| | | | | | The cmInstallTargetGenerator methods AddStripRule and AddRanlibRule do not need the target type argument. They can simply use the type of the target for which the generator instance was created.
* 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.
* ENH: Pass config to cmTarget RPATH install methodsBrad King2009-07-081-3/+3
| | | | | This passes the build configuration to cmTarget methods IsChrpathUsed and NeedRelinkBeforeInstall. Later these methods will use the value.
* ENH: Cleanup per-config target install generationBrad King2009-07-031-18/+13
| | | | | This cleans up cmInstallTargetGenerator's code that computes the build tree location of a target under each configuration.
* ENH: Remove unused PROPERTIES from file(INSTALL)Brad King2009-04-271-2/+1
| | | | | The undocumented file(INSTALL) command used to support a PROPERTIES option, but no install code still uses it. This removes the option.
* ENH: Refactor cmInstallGenerator for re-useBrad King2009-03-161-42/+1
| | | | | | A new cmScriptGenerator base class factors out the non-install-specific part of cmInstallGenerator. This will be useful for other generators that want per-configuration functionality.
* BUG: Do not map install_name of imported targetsBrad King2008-11-251-1/+8
| | | | | | | | | | | | When we install a target on Mac, we generate a call to install_name_tool to fix install_name entries in the target for shared libraries it links. This change makes the step ignore entries for imported targets since their install_name will not change and cmTarget cannot produce a mapping for them. This fixes the error GetLibraryNamesInternal called on imported target: kdelibs seen by kde folks.
* BUG: Fix config test for target install rulesBrad King2008-10-031-50/+34
| | | | | | | | | | | | In single-configuration generators a target installation rule should apply to all configurations for which the INSTALL command was specified. The configuration in which the target is built does not matter. In multi-configuration generators each installation rule must be associated with a particular build configuration to install the proper file. The set of configurations for which rules are generated is the intersection of the build configurations and those for which the INSTALL command was specified.
* BUG: RPATH adjustment of versioned executables should operate on the file ↵Brad King2008-05-271-0/+6
| | | | and not the symlink.
* ENH: Improve RPATH behavior during installation.Brad King2008-04-141-20/+85
| | | | | | | - If new RPATH is empty then remove the entry completely - Preserve file modification time so installation is not repeated - If installed file already exists remove it if its RPATH does not match that expected
* BUG: Correct Mac OS X framework behaviorBrad King2008-04-081-4/+5
| | | | | | | | | | | | - Place the built library in foo.framework/Versions/A/foo - Do not create unused content symlinks (like PrivateHeaders) - Do not use VERSION/SOVERSION properties for frameworks - Make cmTarget::GetDirectory return by value - Remove the foo.framework part from cmTarget::GetDirectory - Correct install_name construction and conversion on install - Fix MACOSX_PACKAGE_LOCATION under Xcode to use the Versions/<version> directory for frameworks - Update the Framework test to try these things
* ENH: During installation do not use builtin chrpath if the rpath will not ↵Brad King2008-03-021-0/+6
| | | | change.
* ENH: Cleanup builtin chrpath supportBrad King2008-03-021-11/+8
| | | | | | | | | | | | - Move computation of extended build-tree rpath to cmComputeLinkInformation - Only enable the extended build-tree rpath if the target will be installed - Generalize the interface of file(CHRPATH) - When changing the rpath on installation only replace the part generated by CMake because the native tools (ex SunCC on Linux) might have added their own part to the rpath
* ENH: Use builtin chrpath instead of relinking ELF targetsBrad King2008-03-011-5/+2
| | | | | | | | | | - 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: Improve exporting/importing of targetsBrad King2008-02-061-14/+23
| | | | | - Use real name instead of link for location of versioned targets - Error when a target is exported multiple times
* COMP: Add missing include for assert.Brad King2008-02-051-0/+2
|
* ENH: Allow separate installation of shared libs and their links.Brad King2008-02-041-19/+94
| | | | | | | - Add NAMELINK_ONLY and NAMELINK_SKIP to INSTALL command - Options select a \"namelink\" mode - cmInstallTargetGenerator selects files/link based on mode - See bug #4419
* BUG: Remove InstallNameFixupPath from cmTarget and cmInstallTargetGenerator.Brad King2008-02-011-27/+22
| | | | | | | | | - Motivation: - It depended on the order of installation - It supported only a single destination for each target - It created directory portions of an install name without user request - Updated ExportImport test to install targets in an order that expoed this bug
* ENH: Update cmInstallTargetGenerator to get the shared libraries linked by a ↵Brad King2008-01-291-47/+28
| | | | target from cmComputeLinkInformation instead of duplicating the computation.
* ENH: Add cmTarget::GetLinkInformation method to allow several places in the ↵Brad King2008-01-291-27/+12
| | | | generators to share link information while only computing it once per configuration for a target. Use it to simplify the chrpath feature.
* ENH: Support exporting/importing of AppBundle targets.Brad King2008-01-281-2/+1
| | | | | | | | - Imported bundles have the MACOSX_BUNDLE property set - Added cmTarget::IsAppBundleOnApple method to simplify checks - Document BUNDLE keyword in INSTALL command - Updated IMPORTED_LOCATION property documentation for bundles - Updated ExportImport test to test bundles
* ENH: Support exporting/importing of Framework targets.Brad King2008-01-281-2/+1
| | | | | | | | - Imported frameworks have the FRAMEWORK property set - Added cmTarget::IsFrameworkOnApple method to simplify checks - Also remove separate IMPORTED_ENABLE_EXPORTS property and just use ENABLE_EXPORTS since, like FRAMEWORK, it just represents the target type. - Document FRAMEWORK keyword in INSTALL command. - Updated IMPORTED_LOCATION property documentation for Frameworks
* ENH: Updated exporting and importing of targets to support libraries and ↵Brad King2008-01-281-16/+5
| | | | | | | | | | | | | | | | | | configurations. - Created cmExportFileGenerator hierarchy to implement export file generation - Installed exports use per-config import files loaded by a central one. - Include soname of shared libraries in import information - Renamed PREFIX to NAMESPACE in INSTALL(EXPORT) and EXPORT() commands - Move addition of CMAKE_INSTALL_PREFIX to destinations to install generators - Import files compute the installation prefix relative to their location when loaded - Add mapping of importer configurations to importee configurations - Rename IMPORT targets to IMPORTED targets to distinguish from windows import libraries - Scope IMPORTED targets within directories to isolate them - Place all properties created by import files in the IMPORTED namespace - Document INSTALL(EXPORT) and EXPORT() commands. - Document IMPORTED signature of add_executable and add_library - Enable finding of imported targets in cmComputeLinkDepends
* BUG: fix for bug 6193, fix xcode depend helperBill Hoffman2008-01-101-12/+3
|
* STYLE: fix warnings: comparison signed/unsigned, unused variableAlexander Neundorf2007-12-191-2/+2
| | | | Alex
* ENH: add support for chrpath, so the RPATH in ELF files can be changed whenAlexander Neundorf2007-12-181-0/+55
| | | | | | | | | | | | | | | | | | installing without having to link the target again -> can save a lot of time chrpath is handled very similar to install_name_tool on the mac. If the RPATH in the build tree file is to short, it is padded using the separator character. This is currently disabled by default, it can be enabled using the option CMAKE_USE_CHRPATH. There are additional checks whether it is safe to enable it. I will rework them and use FILE(READ) instead to detect whether the binaries are actually ELF files. chrpath is available here http://www.tux.org/pub/X-Windows/ftp.hungry.com/chrpath/ or kde svn (since a few days): http://websvn.kde.org/trunk/kdesupport/chrpath/ Alex