Commit Graph

229 Commits

Author SHA1 Message Date
Bill Hoffman 086cf607c3 ENH: add missing property definitions 2008-10-07 16:46:25 -04:00
Alexander Neundorf fc7a017d1a STYLE: add documentation for the "TYPE" target property
Alex
2008-10-02 18:48:06 -04:00
Brad King 4f6137c70c ENH: Allow link line computation for static libs
In some cases it may be useful to compute a "link" line for a static
library even though it will not be put in the generated build system.
This removes the assertion which previously diallowed the case.
2008-09-15 13:30:11 -04:00
Brad King 3c5cf1bb8c ENH: Allow a custom list of debug configurations
Create a DEBUG_CONFIGURATIONS global property as a way for projects to
specify which configuration names are considered to be 'debug'
configurations.
2008-09-04 17:34:25 -04:00
Brad King f89dae7a94 ENH: Create Info.plist files in OS X Frameworks
A Mac OS X Framework should provide a Resources/Info.plist file
containing meta-data about the framework.  This change generates a
default Info.plist for frameworks and provides an interface for users to
customize it.
2008-09-02 12:06:32 -04:00
Brad King fe98e57e38 ENH: Disallow link-type keywords in link interface
The LINK_INTERFACE_LIBRARIES target property may not contain the
"debug", "optimized", or "general" keywords.  These keywords are
supported only by the target_link_libraries (and link_libraries) command
and are not a generic library list feature in CMake.  When a user
attempts to add one of these keywords to the property value, we now
produce an error message that refers users to alternative means.
2008-08-19 11:43:51 -04:00
Brad King 41c5dd13dc ENH: Clarify link interface documentation
The LINK_INTERFACE_LIBRARIES property does not apply for STATIC
libraries.  The IMPORTED_LINK_INTERFACE_LIBRARIES property does apply
for STATIC libraries.  State both explicitly in the documentation.
Also, clarify that the per-configuration version of these properties
completely overrids the generic version.
2008-08-19 10:29:35 -04:00
Brad King 061d20be38 ENH: Add UNKNOWN type for IMPORTED libraries
When creating an IMPORTED target for a library that has been found on
disk, it may not be known whether the library is STATIC or SHARED.
However, the library may still be linked using the file found from disk.
Use of an IMPORTED target is still important to allow per-configuration
files to be specified for the library.

This change creates an UNKNOWN type for IMPORTED library targets.  The
IMPORTED_LOCATION property (and its per-config equivalents) specifies
the location of the library.  CMake makes no assumptions about the
library that cannot be inferred from the file on disk.  This will help
projects and find-modules import targets found on disk or specified by
the user.
2008-08-18 11:39:22 -04:00
Brad King 0bf093fd17 STYLE: Convert unused target type cases to default
In switch statements that deal with only a few target types, use a
'default' case for the remaining target types instead of listing them
explicitly.  This will make it easier to add more types in the future.
2008-08-18 11:26:51 -04:00
Brad King b93f0318fe ENH: Support full-path libs w/out valid names.
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.
2008-07-23 12:59:14 -04:00
Brad King da4f142cc1 ENH: Add full target version signature cmTarget::GetTargetVersion. 2008-07-09 10:09:00 -04:00
Brad King c1b8ad4e1d ENH: Allow users to specify a custom Info.plist template
- Create MACOSX_BUNDLE_INFO_PLIST target property to specify template.
  - Look for MacOSXBundleInfo.plist.in in CMAKE_MODULE_PATH by default.
  - See issue #6983.
2008-05-17 12:53:56 -04:00
Brad King a1bb7e90ef ENH: Allow users to specify macro-like #include line transforms for dependency scanning.
- Define IMPLICIT_DEPENDS_INCLUDE_TRANSFORM property on targets and directories.
  - Make the directory version inherited.
  - See issue #6648.
2008-05-14 11:54:52 -04:00
Brad King 771bdb7ef8 BUG: Make sure all source files are found before generating.
- Previously this was done implicitly by the check for a target
    link language which checked all source full paths.
  - The recent change to support computing a link language without
    finding all the source files skipped the implicit check.
  - This change adds an explicit check to find all source files.
2008-05-12 17:43:45 -04:00
Brad King 629afe07ce BUG: A per-config target name postfix should be ignored for Mac bundle and framework names. 2008-04-14 15:27:27 -04:00
Brad King 67834f2d53 BUG: Correct Mac OS X framework behavior
- 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
2008-04-08 00:06:47 -04:00
Brad King 1829bed8b5 BUG: Do not create target output directory in cmTarget. Let the generators do it. 2008-04-07 13:39:13 -04:00
Ken Martin 16f1cc9b59 ENH: support unset of properties 2008-04-01 14:22:09 -04:00
Brad King 8c1a743027 ENH: Add note to Fortran_MODULE_DIRECTORY property documentation about using CMAKE_Fortran_MODULE_DIRECTORY to initialize it. 2008-03-28 13:07:03 -04:00
Brad King 133e5b5dd8 STYLE: Fix line-too-long for new INTERNAL_ERROR messages. 2008-03-15 10:00:07 -04:00
Brad King bf4cef9d5c ENH: Add policy CMP_0004 to require library names to have no leading or trailing whitespace. Replace previous check of CMAKE_BACKWARDS_COMPATIBILITY against version 2.4 with the policy. 2008-03-13 16:35:39 -04:00
Brad King d46ff28ac9 ENH: Convert CMAKE_LINK_OLD_PATHS to policy CMP0003.
- 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
2008-03-13 16:23:18 -04:00
Brad King f7f03347a6 ENH: Improve new error/warning message generation
- Add cmListFileBacktrace to record stack traces
  - Move main IssueMessage method to the cmake class instance
    (make the backtrace an explicit argument)
  - Change cmMakefile::IssueMessage to construct a backtrace
    and call the cmake instance version
  - Record a backtrace at the point a target is created
    (useful later for messages issued by generators)
2008-03-13 13:48:57 -04:00
Bill Hoffman 5ab6c0f0ed ENH: remove abort calls and replace with an IssueMessage INTERANL_ERROR, better to not crash on the end user. 2008-03-12 21:06:32 -04:00
Brad King 96ee85d197 BUG: Fix memory leak when cmTarget instances are assigned. We really need to get rid of global targets and their associated assignments. 2008-03-04 13:51:27 -05:00
Brad King 652951b976 ENH: Allow users to work around problems with the builtin chrpath by setting CMAKE_NO_BUILTIN_CHRPATH. 2008-03-02 16:37:34 -05:00
Brad King d732de4a8a ENH: Cleanup builtin chrpath support
- 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
2008-03-02 14:35:23 -05:00
Brad King 59001281bb BUG: Do not try to change the RPATH when installing a target if CMAKE_SKIP_RPATH is on or the path does not need to be changed. 2008-03-01 13:02:08 -05:00
Brad King 34c76d4304 ENH: Use builtin chrpath instead of relinking ELF targets
- 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
2008-03-01 12:51:07 -05:00
Brad King dab5ea859a COMP: Fix Borland 5.5 build
- Its <iosfwd> header includes windows.h which
    defines GetCurrentDirectory
  - It defines 'interface' so we cannot use it as
    a variable name.
2008-02-24 14:05:11 -05: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