Teach the export command to handle export sets defined by invocations
of install(TARGETS ... EXPORT foo). This makes maintenance of targets
exported to both the build tree and install tree trivial.
The export-sets topic, merged in commit 49c7b649 (Merge topic
'export-sets', 2012-10-01) changed install(EXPORT) to allow
exporting targets whose dependents are exported separately
to different locations. Doing the same for export() was not
possible because the export() command was executed at
configure-time.
Now that export() is also executed at generate-time, make it
possible to export to multiple dependent export sets.
Make the API for adding targets string based so that it can easily
use cmGeneratorTarget.
Teach the cmIncludeCommand to generate the exported file at
configure-time instead if it is to be include()d.
The RunCMake.ExportWithoutLanguage test now needs a dummy header.h
file as expected error from export() is now reported after the
missing file error.
This is better than the cmCommand, because the lifetime of that is
not as useful, and it is only used to report an error anyway.
In the next commit, the cmExportBuildFileGenerator will outlive the
cmCommand.
Before, cmExportFileGenerator::ComplainAboutMissingTarget() was a virtual
function which had to be implemented in the subclasses. It is not
anymore. Instead, there is now a virtual function
HandleMissingTargets(), which is implemented in the two subclasses.
This makes e.g. dealing correctly with APPEND mode easier.
Alex
If a target is exported, and a library it depends on is not part
of the same export set, before this patch cmake errored out.
With this patch, it now checks whether the missing target
is exported somewhere else exactly once, and accepts in this
case (because then it can determine the namespace for the
missing target and use this).
Alex
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.
- 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
- 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.
- 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