summaryrefslogtreecommitdiffstats
path: root/Source/cmExportCommand.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Port all cmOStringStream to std::ostringstream.Stephen Kelly2015-01-111-13/+13
| | | | All compilers hosting CMake support the std class.
* Allow the Package Registry to be disabled (#14849)Daniele E. Domenichelli2014-05-121-0/+7
| | | | | | | | | | | | | | | | When a project is packaged for redistribution the local package registries should not be updated or consulted. They are for developers. Add variables to disable use of package registries globally: * CMAKE_EXPORT_NO_PACKAGE_REGISTRY that disables the export(PACKAGE) command * CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY that disables the User Package Registry in all the find_package calls. * CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY that disables the System Package Registry in all the find_package calls. Update documentation and unit tests.
* Simplify multiple config handling.Stephen Kelly2014-04-021-9/+6
| | | | | Use conventional pattern of not repeating the loop body for empty config.
* Remove some c_str() calls.Stephen Kelly2014-03-111-12/+12
| | | | | | Use the clang RemoveCStrCalls tool to automatically migrate the code. This was only run on linux, so does not have any positive or negative effect on other platforms.
* cmTarget: Remove the project argument to FindTargetBen Boeckel2014-03-081-1/+1
| | | | All callers passed 0 in, so just remove the branch.
* cmMakefile: make some methods take const std::string& instead of const char*Rolf Eike Beer2014-01-161-1/+1
| | | | | | | | Most callers already have a std::string, on which they called c_str() to pass it into these methods, which internally converted it back to std::string. Pass a std::string directly to these methods now, avoiding all these conversions. Those methods that only pass in a const char* will get the conversion to std::string now only once.
* Don't allow include() of export(EXPORT) file at configure time.Stephen Kelly2014-01-061-2/+8
| | | | | | | | | As a new feature it does not need to participate in CMP0024. Store cmExportBuildFileGenerator instances which correspond to the export(EXPORT) signature in a second map which does not own the pointers. This avoids the need to add cmExportBuildFileGenerator and dependencies to the bootstrap system.
* export: Implement EXPORT subcommand (#9822)Stephen Kelly2013-12-241-53/+107
| | | | | | 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.
* Windows: Use wide-character system APIsClinton Stimpson2013-12-091-7/+12
| | | | | Make CMake compile with -DUNICODE. Make it possible for the 8 bit encoding to eventually be UTF-8 instead ANSI.
* export(): Check targets exist at configure-time (#14608)Stephen Kelly2013-12-041-0/+8
| | | | | | | | | Commit 66b290e7 (export(): Process the export() command at generate time., 2012-10-06 ) refactored export() so that it could evaluate strings at generate-time. This was intended for evaluating target properties, but that commit also removed a check for target existence at configure-time. Restore that check and add a test for this case.
* export(): Process the export() command at generate time.Stephen Kelly2013-10-111-51/+20
| | | | | | | | | | | | 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.
* export(): Set a Makefile on the cmExportBuildFileGenerator.Stephen Kelly2013-10-101-1/+1
| | | | | | | | 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.
* CMP0024: Store the fact of included export in global generator.Stephen Kelly2013-10-101-1/+3
| | | | | Storing it in the makefile means that the policy does not trigger when include and export are in differing directories.
* Merge topic 'haiku-updates'Brad King2013-10-091-6/+8
|\ | | | | | | | | | | | | | | 54ef2be Haiku: Include files cleanup in cmCTest 38d5555 Haiku: Remove outdated preprocessor checks 1dc61f8 Haiku: Remove use of B_COMMON_DIRECTORY 7ebc1cb Haiku: Several fixes to platform module
| * Haiku: Remove use of B_COMMON_DIRECTORYAdrien Destugues2013-10-081-6/+8
| | | | | | | | | | | | | | The common directory was removed in Haiku. Applications are now installed in the system directory. Applied-by: Rolf Eike Beer <eike@sf-mail.de>
* | Merge topic 'export-policy'Brad King2013-10-081-0/+2
|\ \ | | | | | | | | | | | | 904ff9f export: Add policy CMP0024 to disallow include() of export files
| * | export: Add policy CMP0024 to disallow include() of export filesStephen Kelly2013-10-071-0/+2
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, export() is executed at configure-time. One problem with this is that certain exported properties like the link interface may not be complete at the point the export() is encountered leading to an incorrect or incomplete exported representation. Additionally, the generated IMPORTED_LOCATION property may even be incorrect if commands following the export() have an effect on it. Another problem is that it requires the C++ implementation of cmake to be capable of computing the exported information at configure time. This is a limitation on the cleanup and maintenance of the code. At some point in the future, this limitation will be dropped and more implementation will be moved from cmTarget to cmGeneratorTarget.
* | export: Add support for INTERFACE_LIBRARY targetsStephen Kelly2013-10-081-1/+2
|/
* Add the ALIAS target concept for libraries and executables.Stephen Kelly2013-08-021-0/+9
| | | | | | | | | | | | | | | | | * The ALIAS name must match a validity regex. * Executables and libraries may be aliased. * An ALIAS acts immutable. It can not be used as the lhs of target_link_libraries or other commands. * An ALIAS can be used with add_custom_command, add_custom_target, and add_test in the same way regular targets can. * The target of an ALIAS can be retrieved with the ALIASED_TARGET target property. * An ALIAS does not appear in the generated buildsystem. It is kept separate from cmMakefile::Targets for that reason. * A target may have multiple aliases. * An ALIAS target may not itself have an alias. * An IMPORTED target may not have an alias. * An ALIAS may not be exported or imported.
* Export: Generate INTERFACE_LINK_LIBRARIES property on targets.Stephen Kelly2013-07-081-0/+2
| | | | | | | | | | This property is generated only for targets which have recorded policy CMP0022 as NEW, and a compatibility mode is added to additionally export the old interfaces in that case too. If the old interfaces are not exported, the generated export files require CMake 2.8.12. Because the unit tests use a version which is not yet called 2.8.12, temporarily require a lower version.
* Fix spelling and typos (affecting binary data / module messages)Andreas Mohr2013-05-071-1/+1
|
* Add OBJECT_LIBRARY target typeBrad King2012-03-131-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* No CMAKE_CONFIGURATION_TYPES in single-config generators (#10202)Brad King2010-09-081-9/+3
| | | | | | Factor out reading of CMAKE_CONFIGURATION_TYPES and CMAKE_BUILD_TYPE into cmMakefile::GetConfigurations. Read the former only in multi-config generators.
* 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.
* Use BeAPI for per-user package registry on HaikuBrad King2009-09-281-0/+15
| | | | | | | | Applications on Haiku are discouraged from storing their data in $HOME. This teaches export(PACKAGE) and find_package() to use the BeAPI on Haiku to store the package registry instead of using ~/.cmake/packages. See issue #9603.
* Teach export(PACKAGE) to fill the package registryBrad King2009-09-011-0/+149
| | | | | | | We define the export(PACKAGE) command mode to store the location of the build tree in the user package registry. This will help find_package locate the package in the build tree. It simplies user workflow for manually building a series of dependent projects.
* ENH: Improve exporting/importing of targetsBrad King2008-02-061-1/+1
| | | | | - Use real name instead of link for location of versioned targets - Error when a target is exported multiple times
* ENH: Implemented link-interface specification feature.Brad King2008-01-301-6/+8
| | | | | | | | | | | | - 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.
* ENH: Restored APPEND option to EXPORT() command in new implementation.Brad King2008-01-281-0/+2
|
* ENH: Updated exporting and importing of targets to support libraries and ↵Brad King2008-01-281-109/+88
| | | | | | | | | | | | | | | | | | 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
* ENH: add return and break support to cmake, also change basic command ↵Ken Martin2008-01-231-1/+1
| | | | invocation signature to be able to return extra informaiton via the cmExecutionStatus class
* BUG: fix #5806, wrong quotes used in the exported fileAlexander Neundorf2007-10-141-1/+1
| | | | Alex
* STYLE: use correct case for cmGlobalUnixMakefileGenerator3Alexander Neundorf2007-08-091-2/+2
| | | | | | make export() work with spaces in the path Alex
* COMP: fix warningsAlexander Neundorf2007-07-021-4/+4
| | | | Alex
* ENH: add framework for unified handling of arguments to cmake commands,Alexander Neundorf2007-07-021-105/+55
| | | | | | example see cmExportCommand.cxx Alex
* ENH: fail if an unknown target is listedAlexander Neundorf2007-06-081-12/+32
| | | | Alex
* ENH: add cmExternalMakefileProjectGenerator, which should make it easier toAlexander Neundorf2007-06-081-0/+233
write generators for IDE projects, which use already existing makefiles (current the kdevelop generator) -first stept of the export interface, iniitial export() command -more replacements for the FIND_XXX docs Alex