Commit Graph

200 Commits

Author SHA1 Message Date
Brad King 8f96818a5c Document IMPORTED_NO_SONAME target property
Commit fd37a6ec (Better linker search path computation, 2008-02-21)
added this property but did not document it.  Add the documentation.
2010-09-17 13:28:29 -04:00
Brad King fd37a6ec3d ENH: Better linker search path computation.
- 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
2008-02-21 11:41:11 -05:00
Brad King a3c2d32802 COMP: Fix HP warning about cmTargetInternalPointer::operator= checking for self-assignment. 2008-02-19 09:09:46 -05:00
Brad King 9ed4266306 ENH: Cleanup impl of PUBLIC_HEADER, PRIVATE_HEADER, and RESOURCE properties 2008-02-18 16:38:34 -05:00
Brad King 67f8c0fd10 ENH: Allow multiple OS X applications bundles to be created in a single build directory. Converted Info.plist files to be generated directly instead of configured with make variables. The MACOSX_BUNDLE_* variables are now properties (and vars for compatibility). 2008-02-14 15:31:08 -05:00
Brad King ac0e58dcfb ENH: Enforce global target name uniqueness.
- Error if imported target is involved in conflict
  - Error for non-imported target conflict unless
    CMAKE_BACKWARDS_COMPATIBILITY <= 2.4
  - Include OUTPUT_NAME property in error message
  - Update add_executable and add_library command documentation
2008-02-11 13:35:39 -05:00
Brad King 410d7b0f36 ENH: Avoid computing link information for static library targets. They do not link. 2008-02-07 16:49:11 -05:00
Brad King afad124313 BUG: Make sure linking to a shared lib on windows uses import library and not the new realname. 2008-02-06 14:19:03 -05:00
Brad King 31a6670e43 BUG: Do not create versioned executable names on Xcode where they are not supported. 2008-02-06 14:06:50 -05:00
Brad King 07be6bb87b ENH: When linking to versioned targets whose real file name is known pass the real name to the linker instead of the symlink name. 2008-02-06 13:34:44 -05:00
Brad King 82fcaebe28 ENH: Pass dependent library search path to linker on some platforms.
- 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
2008-02-01 08:56:00 -05:00
Brad King f28f1585f6 COMP: Fix shadowed local warning. 2008-02-01 08:55:41 -05:00
Brad King 2cff26fa52 ENH: Support linking to shared libs with dependent libs
- 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
2008-01-31 15:45:31 -05:00
Brad King afd7d4ca4c ENH: Add target property LINK_SEARCH_END_STATIC to help people building static binaries on some platforms. 2008-01-31 08:05:34 -05:00
Brad King 7902bc06aa ENH: Implemented link-interface specification feature.
- Shared libs and executables with exports may now have
    explicit transitive link dependencies specified
  - Created LINK_INTERFACE_LIBRARIES and related properties
  - Exported targets get the interface libraries as their
    IMPORTED_LINK_LIBRARIES property.
  - The export() and install(EXPORT) commands now give
    an error when a linked target is not included since
    the user can change the interface libraries instead
    of adding the target.
2008-01-30 17:25:52 -05:00
Brad King 6066e92ba2 BUG: cmTarget instances should not be copied. Removed pass-by-value arguments from cmLocalVisualStudio7Generator::WriteGroup and cmLocalVisualStudio6Generator::WriteGroup. Updated cmTarget to make this easier to find. 2008-01-29 17:30:34 -05:00
Brad King ffac622a85 ENH: Add cmTarget::GetLinkInformation method to allow several places in the generators to share link information while only computing it once per configuration for a target. Use it to simplify the chrpath feature. 2008-01-29 15:07:33 -05:00
Brad King 64b6c0b950 ENH: Document PRIVATE_HEADER, PUBLIC_HEADER, and RESOURCE target properties and corresponding arguments to INSTALL(TARGETS). 2008-01-28 15:12:12 -05:00
Brad King e3b1bdb058 ENH: Support exporting/importing of AppBundle targets.
- 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
2008-01-28 14:46:16 -05:00
Brad King 28ea034737 ENH: Support exporting/importing of Framework targets.
- 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
2008-01-28 13:05:58 -05:00
Brad King 5594ad4885 ENH: Updated exporting and importing of targets to support libraries and 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
2008-01-28 08:38:36 -05:00
Brad King 99b97dece8 ENH: Created cmComputeLinkDepends to compute link dependencies.
- 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
2008-01-27 13:42:49 -05:00
Brad King 96fd5909d9 ENH: Implement linking with paths to library files instead of -L and -l 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.
2008-01-22 09:13:04 -05:00
Brad King 17dbc31ad4 BUG: Added missing documentation of LINK_FLAGS_<CONFIG> property. 2008-01-21 13:59:10 -05:00
Brad King caca9b8065 ENH: Add AppendProperty methods for use by C++ code in CMake. Simplify implementation of SET_PROPERTY command by using them. 2008-01-17 18:13:55 -05:00
Brad King 80c2be45e0 ENH: Renamed <CONFIG>_COMPILE_DEFINITIONS to COMPILE_DEFINITIONS_<CONFIG> for better documentation clarity. 2008-01-15 21:02:00 -05:00
Brad King da335fbd00 ENH: Add explicit documentation entry for configuration-specific <CONFIG>_COMPILE_DEFINITIONS. 2008-01-15 10:49:22 -05:00
Brad King 8262ccfd4e ENH: Create COMPILE_DEFINITIONS property for targets and source files. Create <config>_COMPILE_DEFINITIONS property as per-configuration version. Add Preprocess test to test the feature. Document limitations on Xcode and VS6 generators. 2008-01-14 09:20:58 -05:00
Amitha Perera 4d9259c15b STYLE: Spelling fixes on documentation 2008-01-09 22:09:19 -05:00
Alexander Neundorf 3da6fd9da4 ENH: only allow usage of chrpath if the executable file format is ELF
Alex
2008-01-02 16:53:10 -05:00
Brad King b2e8c07af8 ENH: Implemented Fortran module output directory and search path flags. 2007-12-30 16:11:38 -05:00
Alexander Neundorf 3ae731fab7 ENH: add support for chrpath, so the RPATH in ELF files can be changed when
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
2007-12-18 17:50:27 -05:00
Brad King 8506938407 ENH: Added SOURCES property to targets. This is based on patch from issues #6137. 2007-12-17 10:12:22 -05:00
Brad King 91f68fc391 BUG: For imported target directory, do not return pointer to freed memory. 2007-11-21 08:59:43 -05:00
Ken Martin 9bd0d0f1ed BUG: fix undefined property FRAMEWORK 2007-10-30 11:03:16 -04:00
David Cole 2458b07464 BUG: Fix the dashboards! Put it back the way it was so it always creates the target directory at configure time. Figure out how to avoid it for the framework case on the Mac/Xcode later... 2007-10-12 11:43:50 -04:00
David Cole 8e4c7b99e1 ENH: Finish up the Framework creation code restructuring. Frameworks build and install now. More work needed on the packaging step. See Tests/Framework for example use. 2007-10-10 11:06:15 -04:00
Brad King f2ac53bb10 ENH: Added XCODE_ATTRIBUTE_<an-attribute> property to allow direct setting of Xcode target attributes in generated projects. For example, one may set the prefix header property and the corresponding precompiled option to do precompiled headers. 2007-09-10 10:22:19 -04:00
Alexander Neundorf 112747e4e2 STYLE: fix typo
Alex
2007-08-09 08:49:49 -04:00
Brad King bffcff4530 ENH: Added warning when an install rule is created from an EXCLUDE_FROM_ALL target. Added a foo/preinstall version of targets that need relinking so that exclude-from-all targets can be manually relinked for installation. 2007-08-03 16:31:08 -04:00
Brad King d7118006de BUG: Target exclusion-from-all tests should always use the root local generator associated with the all target being tested. 2007-08-03 15:44:25 -04:00
Brad King 9f2de08f90 ENH: Added cmTarget::GetLanguages method to centralize computation of the list of languages compiled in a target. 2007-08-02 13:38:39 -04:00
David Cole ee91e25499 BUG: Only pay attention to the FRAMEWORK target property for SHARED library targets 2007-08-01 13:04:45 -04:00
Brad King e0fc8b2995 BUG: <CONFIG>_LOCATION property should use the config name in the directory and not $(OutDir). This addresses bug#5363. 2007-08-01 11:36:35 -04:00
Alexander Neundorf 021ceea1b0 ENH: second try for handling the linker language with integer priority values (returning a pointer to a string on the stack is no good idea)
Alex
2007-07-12 08:37:10 -04:00
Alexander Neundorf 16705a3e87 COMP: revert last commit for now, broke Visual Studio
Alex
2007-07-11 17:29:27 -04:00
Alexander Neundorf bea1a5de77 ENH: CMAKE_<LANG>_LINKER_PREFERENCE is now an integer priority, not a
two-step priority (None or Prefered)
Current order: ASM 0, C 10, Fortran 20, CXX 30, Java 40
This is the same order as automake choses:
http://www.gnu.org/software/automake/manual/html_node/How-the-Linker-is-Chosen.html

This change should be backward compatible:
if there is a project using fortran and CXX, they had to set the
LINKER_LANGUAGE explicitely, otherwise cmake complained (but still generated
the project files). Explicitely setting the linker language still overrides
automatic detection.
If somebody has a custom language for cmake and the PREFERENCE starts with
"P", its changed to 100, which gives it preference over all other languages
(except the other custom languages which have also "Prefered"). "None" is
converted to 0.

Alex
2007-07-11 16:22:04 -04:00
Brad King cac79e92b8 STYLE: Fixed line-too-long, fixed indentation, removed trailing whitespace, added function separator comment lines. 2007-07-02 13:32:41 -04:00
Alexander Neundorf cfe9fda9fe ENH: here we really want only non-imported targets, as discussed with Brad
Alex
2007-06-27 15:42:33 -04:00
Alexander Neundorf e126db1f71 BUG: handle dependencies to imported targets better: don't create a
dependency if the target name was not listed in DEPENDS, if it was listed in
DEPENDS, create a dependency to the file

Seems to work, but have to check with Brad.

Alex
2007-06-21 13:08:22 -04:00