summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.h
Commit message (Collapse)AuthorAgeFilesLines
* Define per-target OSX_ARCHITECTURES propertyBrad King2009-10-211-0/+3
| | | | | | | | | | | The CMAKE_OSX_ARCHITECTURES variable works only as a global setting. This commit defines target properties OSX_ARCHITECTURES OSX_ARCHITECTURES_<CONFIG> to specify OS X architectures on a per-target and per-configuration basis. See issue #8725.
* Invalidate target link info when necessaryBrad King2009-10-051-0/+2
| | | | | | | | In cmTarget we compute the link implementation, link interface, and link closure structures on-demand and cache the results. This commit teaches cmTarget to invalidate results after a LINK_INTERFACE_* property changes or a new link library is added. We also clear the results at the end of the Configure step to ensure the Generate step uses up-to-date results.
* Combine duplicate code in target property methodsBrad King2009-10-051-0/+2
| | | | | | | In cmTarget::SetProperty and cmTarget::AppendProperty we check whether changing the property invalidates cached information. The check was duplicated in the two methods, so this commit moves the check into a helper method called from both.
* Create explicit cmTarget::FinishConfigure stepBrad King2009-10-051-1/+4
| | | | | | | This method is called during ConfigureFinalPass on every target. It gives each target a chance to do some final processing after it is known that no more commands will affect it. Currently we just call the old AnalyzeLibDependencies that used to be called directly.
* Remove unused cmTarget::AddLinkLibrary methodBrad King2009-10-051-3/+0
|
* Introduce "build feature" lookup frameworkBrad King2009-10-021-0/+2
| | | | | | | This creates cmTarget::GetFeature and cmMakefile::GetFeature methods to query "build feature" properties. These methods handle local-to-global scope and per-configuration property lookup. Specific build features will be defined later.
* 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.
* Save source dependencies from custom command traceBrad King2009-09-071-1/+4
| | | | | | | | In each target we trace dependencies among custom commands to pull in all source files and build rules necessary to complete the target. This commit teaches cmTarget to save the inter-source dependencies found during its analysis. Later this can be used by generators that need to topologically order custom command rules.
* Cleanup cmTarget source file list representationBrad King2009-09-041-3/+3
| | | | | | This teaches cmTarget to use a set of cmSourceFile pointers to guarantee unique insertion of source files in a target. The order of insertion is still preserved in the SourceFiles vector.
* Define 'multiplicity' for cyclic dependenciesBrad King2009-09-011-0/+6
| | | | | | | | | We create target property "LINK_INTERFACE_MULTIPLICITY" and a per-config version "LINK_INTERFACE_MULTIPLICITY_<CONFIG>". It sets the number of times a linker should scan through a mutually dependent group of static libraries. The largest value of this property on any target in the group is used. This will help projects link even for extreme cases of cyclic inter-target dependencies.
* Create cmTarget DLL query methodsBrad King2009-08-111-0/+6
| | | | | | | We creates methods IsDLLPlatform() and HasImportLibrary(). The former returns true on Windows. The latter returns whether the target has a DLL import library. It is true on Windows for shared libraries and executables with exports.
* ENH: Consider link dependencies for link languageBrad King2009-07-101-0/+19
| | | | | | | | | | | This teaches cmTarget to account for the languages compiled into link dependencies when determining the linker language for its target. We list the languages compiled into a static archive in its link interface. Any target linking to it knows that the runtime libraries for the static archive's languages must be available at link time. For now this affects only the linker language selection, but later it will allow CMake to automatically list the language runtime libraries.
* ENH: Pass config to cmTarget::GetLinkerLanguageBrad King2009-07-081-1/+1
| | | | | | This passes the build configuration to most GetLinkerLanguage calls. In the future the linker language will account for targets linked in each configuration.
* ENH: Pass config to cmTarget RPATH install methodsBrad King2009-07-081-2/+2
| | | | | This passes the build configuration to cmTarget methods IsChrpathUsed and NeedRelinkBeforeInstall. Later these methods will use the value.
* ENH: Introduce cmTarget::LinkImplementation APIBrad King2009-07-081-0/+16
| | | | | | | | The new method centralizes loops that process raw OriginalLinkLibraries to extract the link implementation (libraries linked into the target) for each configuration. Results are computed on demand and then cached. This simplifies link interface computation because the default case trivially copies the link implementation.
* COMP: Pimplize cmTarget ImportInfo and OutputInfoBrad King2009-07-081-17/+2
| | | | | | These member structures are accessed only in the cmTarget implementation so they do not need to be defined in the header. This cleanup also aids Visual Studio 6 in compiling them.
* STYLE: Fix comment on cmTarget::LinkInterfaceBrad King2009-07-071-3/+2
| | | | The comment had a typo and was longer than necessary.
* ENH: Simplify cmTarget link interface storageBrad King2009-07-071-32/+21
| | | | | This makes the LinkInterface struct a member of cmTarget, pimplizes the config-to-interface map, and stores interface instances by value.
* ENH: Simpler cmTarget::GetLinkerLanguage signatureBrad King2009-07-071-1/+1
| | | | | | | This method previously required the global generator to be passed, but that was left from before cmTarget had its Makefile member. Now the global generator can be retrieved automatically, so we can drop the method argument.
* ENH: Centralize default link interface computationBrad King2009-07-061-0/+4
| | | | | | When LINK_INTERFACE_LIBRARIES is not set we use the link implementation to implicitly define the link interface. These changes centralize the decision so that all linkable targets internally have a link interface.
* ENH: Move CMP0004 check into cmTargetBrad King2009-07-061-0/+4
| | | | | | This moves code implementing policy CMP0004 into cmTarget::CheckCMP0004. The implementation is slightly simpler and can be re-used outside of cmComputeLinkDepends.
* ENH: Exception safe link interface computationBrad King2009-07-061-1/+4
| | | | | | This fixes cmTarget::GetLinkInterface to compute and return the link interface in an exception-safe manner. We manage the link interface returned by cmTarget::ComputeLinkInterface using auto_ptr.
* ENH: Refactor target output dir computationBrad King2009-07-031-6/+11
| | | | | | This creates cmTarget::GetOutputInfo to compute, cache, and lookup target output directory information on a per-configuration basis. It avoids re-computing the information every time it is needed.
* ENH: Remove cmTarget internal type argumentsBrad King2009-05-011-19/+4
| | | | | | | | Internally cmTarget was passing the target type in several name computation signatures to support computation of both shared and static library names for one target. We no longer need to compute both names, so this change simplifies the internals by using the GetType method and dropping the type from method signatures.
* ENH: Remove cmTarget::GetExecutableCleanNamesBrad King2009-05-011-8/+0
| | | | This method was redundant with GetExecutableNames.
* ENH: Always imply CLEAN_DIRECT_OUTPUT target propBrad King2009-05-011-12/+0
| | | | | | | | | | | | | | This property was left from before CMake always linked using full path library names for targets it builds. In order to safely link with "-lfoo" we needed to avoid having both shared and static libraries in the build tree for targets that switch on BUILD_SHARED_LIBS. This meant cleaning both shared and static names before creating the library, which led to the creation of CLEAN_DIRECT_OUTPUT to disable the behavior. Now that we always link with a full path we do not need to clean old library names left from an alternate setting of BUILD_SHARED_LIBS. This change removes the CLEAN_DIRECT_OUTPUT property and instead uses its behavior always. It removes some complexity from cmTarget internally.
* ENH: Allow more specification of target file namesBrad King2009-05-011-0/+3
| | | | | | | | | | | | | | This creates target properties ARCHIVE_OUTPUT_NAME, LIBRARY_OUTPUT_NAME, and RUNTIME_OUTPUT_NAME, and per-configuration equivalent properties ARCHIVE_OUTPUT_NAME_<CONFIG>, LIBRARY_OUTPUT_NAME_<CONFIG>, and RUNTIME_OUTPUT_NAME_<CONFIG>. They allow specification of target output file names on a per-type, per-configuration basis. For example, a .dll and its .lib import library may have different base names. For consistency and to avoid ambiguity, the old <CONFIG>_OUTPUT_NAME property is now also available as OUTPUT_NAME_<CONFIG>. See issue #8920.
* ENH: Refactor target output file type computationBrad King2009-05-011-0/+3
| | | | | | | This creates method cmTarget::GetOutputTargetType to compute the output file type 'ARCHIVE', 'LIBRARY', or 'RUNTIME' from the platform and target type. It factors out logic from the target output directory computation code for later re-use.
* ENH: Define target-specific support directoriesBrad King2009-02-101-0/+3
| | | | | | | | | This creates method cmTarget::GetSupportDirectory to compute a target-specific support directory in the build tree. It uses the "CMakeFiles/<name>.dir" convention already used by the Makefile generators. The method will be useful for any code that needs to generate per-target information into the build tree for use by CMake tools that do not run at generate time.
* ENH: Allow a custom list of debug configurationsBrad King2008-09-041-0/+3
| | | | | | Create a DEBUG_CONFIGURATIONS global property as a way for projects to specify which configuration names are considered to be 'debug' configurations.
* ENH: Disallow link-type keywords in link interfaceBrad King2008-08-191-0/+1
| | | | | | | | | 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.
* ENH: Add UNKNOWN type for IMPORTED librariesBrad King2008-08-181-1/+5
| | | | | | | | | | | | | | | 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.
* ENH: Support full-path libs w/out valid names.Brad King2008-07-231-0/+5
| | | | | | | | 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.
* ENH: Add full target version signature cmTarget::GetTargetVersion.Brad King2008-07-091-0/+5
|
* BUG: Make sure all source files are found before generating.Brad King2008-05-121-0/+5
| | | | | | | | - 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.
* ENH: remove qualifier from .h fileBill Hoffman2008-04-081-1/+1
|
* BUG: Correct Mac OS X framework behaviorBrad King2008-04-081-10/+13
| | | | | | | | | | | | - 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
* BUG: Do not create target output directory in cmTarget. Let the generators ↵Brad King2008-04-071-3/+0
| | | | do it.
* ENH: Add policy CMP_0004 to require library names to have no leading or ↵Brad King2008-03-131-0/+5
| | | | trailing whitespace. Replace previous check of CMAKE_BACKWARDS_COMPATIBILITY against version 2.4 with the policy.
* ENH: Convert CMAKE_LINK_OLD_PATHS to policy CMP0003.Brad King2008-03-131-0/+8
| | | | | | | | | - 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
* ENH: Improve new error/warning message generationBrad King2008-03-131-0/+4
| | | | | | | | | | - 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)
* ENH: Use builtin chrpath instead of relinking ELF targetsBrad King2008-03-011-1/+1
| | | | | | | | | | - 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: Better linker search path computation.Brad King2008-02-211-0/+5
| | | | | | | | | | | | | - 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
* ENH: Cleanup impl of PUBLIC_HEADER, PRIVATE_HEADER, and RESOURCE propertiesBrad King2008-02-181-4/+33
|
* ENH: When linking to versioned targets whose real file name is known pass ↵Brad King2008-02-061-2/+10
| | | | the real name to the linker instead of the symlink name.
* BUG: Remove InstallNameFixupPath from cmTarget and cmInstallTargetGenerator.Brad King2008-02-011-13/+0
| | | | | | | | | - 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: Support linking to shared libs with dependent libsBrad King2008-01-311-8/+7
| | | | | | | | | - 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
* ENH: Implemented link-interface specification feature.Brad King2008-01-301-0/+24
| | | | | | | | | | | | - 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.
* BUG: cmTarget instances should not be copied. Removed pass-by-value ↵Brad King2008-01-291-2/+10
| | | | arguments from cmLocalVisualStudio7Generator::WriteGroup and cmLocalVisualStudio6Generator::WriteGroup. Updated cmTarget to make this easier to find.
* ENH: Add cmTarget::GetLinkInformation method to allow several places in the ↵Brad King2008-01-291-3/+9
| | | | generators to share link information while only computing it once per configuration for a target. Use it to simplify the chrpath feature.