summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'module-link-interface-issue-11945'Brad King2011-03-151-3/+7
|\ | | | | | | | | | | c9d55ae Add parens in cmTarget::ComputeLinkInterface logic c6a8e4c The link interface of MODULE libraries is empty (#11945)
| * Add parens in cmTarget::ComputeLinkInterface logicBrad King2011-03-141-1/+1
| | | | | | | | | | | | | | | | | | Avoid GCC warning warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses] added by commit c6a8e4c7 (The link interface of MODULE libraries is empty, 2011-03-09).
| * The link interface of MODULE libraries is empty (#11945)Brad King2011-03-091-3/+7
| | | | | | | | | | | | | | | | MODULE libraries cannot be linked into other libraries and executables (just like executables without ENABLE_EXPORTS). Set the MODULE target link interface to be empty. This allows such targets to be installed in an EXPORT set without including all their private implementation dependencies.
* | Add target property LINK_SEARCH_START_STATIC to aid static linkingBrad King2011-03-031-8/+23
| | | | | | | | | | | | | | | | | | Commit afd7d4ca (Add target property LINK_SEARCH_END_STATIC, 2008-01-31) defined a property to ensure that static runtime libraries get selected. Add a property to specify that all libraries whose type is unknown, such as "-lm", should be assumed static. Furthermore it assumes that an option such as "-static" is also used so that no initial -Bstatic is needed.
* | Merge topic 'fix-11295-support-plugin-bundles-on-mac'Brad King2011-02-221-0/+24
|\ \ | |/ |/| | | | | | | cabc407 CFBundle Test: Add PATHS for finding Rez (#11295) 5457b82 Add support for CFBundle targets on the Mac (#11295)
| * Add support for CFBundle targets on the Mac (#11295)Richard Bateman2011-01-111-0/+24
| | | | | | | | | | This commit enables building, for example, plugin bundles to be loaded by web browsers.
* | Combine duplicate COMPILE_DEFINITIONS disclaimerBrad King2011-01-171-8/+2
| |
* | Document reading LOCATION_<CONFIG> early as undefined (#11671)Brad King2011-01-101-9/+12
| | | | | | | | | | | | | | Although the LOCATION property is for compatibility with CMake 2.4, the LOCATION_<CONFIG> property is modern. However, if a project reads it and sets location-altering properties later the behavior is undefined. See parent commit for details.
* | Document reading LOCATION early as undefined (#11671)Brad King2011-01-101-1/+11
|/ | | | | | | | | | | Reading the LOCATION target property currently locks down the result and ignores any later changes to properties that affect it. This may or may not be expected and may or may not be the behavior in earlier versions of CMake. The property is documented as provided only for compatibility with CMake 2.4 and alternative interfaces are now available for all originally envisioned use cases. We want to discourage its use without outright deprecating it. Add documentation to explicitly state that reading the property before other properties are set is undefined.
* Merge topic 'custom-command-generator-expressions'Brad King2010-12-211-0/+17
|\ | | | | | | | | | | | | | | | | | | | | 4499d50 Mark CustomCommand test perconfig.out as SYMBOLIC f0cdb60 Introduce "generator expression" syntax to custom commands (#11209) 4749e4c Record set of targets used in cmGeneratorExpression ef9e9de Optionally suppress errors in cmGeneratorExpression 45e1953 Factor per-config sample targets out of 'Testing' test 4091bca Factor generator expression docs out of add_test bfb7288 Record backtrace in cmCustomCommand
| * Introduce "generator expression" syntax to custom commands (#11209)Brad King2010-12-151-0/+17
| | | | | | | | | | | | | | | | | | Evaluate in the COMMAND arguments of custom commands the generator expression syntax introduced in commit d2e1f2b4 (Introduce "generator expressions" to add_test, 2009-08-11). These expressions have a syntax like $<TARGET_FILE:mytarget> and are evaluated during build system generation. This syntax allows per-configuration target output files to be referenced in custom command lines.
* | Merge topic 'cross-compile-apple-host'Brad King2010-12-141-15/+24
|\ \ | | | | | | | | | | | | 3b7f901 Fix soname in cross-compiled targets with Mac host (#11547)
| * | Fix soname in cross-compiled targets with Mac host (#11547)Brad King2010-12-091-15/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The soname generation code was compile-time selected instead of runtime selected. The result is that a Mac-compiled cmake used to cross-compile Mac -> Unix generates an soname of the form libfoo.x.y.so instead of libfoo.so.x.y as expected. Instead do a runtime check based on the target platform. Inspired-By: George Staikos <staikos@kde.org>
* | | Merge topic 'parallel-make-install-of-CMake'Brad King2010-12-141-0/+9
|\ \ \ | |_|/ |/| | | | | | | | 608d6bb Fix parallel "make install" of CMake itself
| * | Fix parallel "make install" of CMake itselfBrad King2010-12-091-0/+9
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Avoid tracing dependencies of GLOBAL_TARGET targets. The build system generators are not designed to handle any dependencies that may be discovered. Global targets are only generated by CMake and never have commands that reference targets built in the project anyway. The exception is when building CMake itself there is a special case to use the just-built "cmake" binary in the "install" target so that CMake can replace itself on Windows. Even in this special case we do not want to let the "install" target depend on the "cmake" target. Doing so breaks cases like "make -j4 install".
* | Honor custom command dependencies on imported targets (#10395)Brad King2010-12-081-4/+4
|/ | | | | | | Imported targets do not themselves build, but we can follow dependencies through them to find real targets. This allows imported targets to depend on custom targets that provide the underlying files at build time.
* Define LINK_DEPENDS target property (#11406)Brad King2010-11-051-0/+12
| | | | | Custom Makefile link rules may need to depend on linker scripts. Define this property to allow user-specified link-time dependencies.
* Document ENABLE_EXPORTS behavior on Mac (#11295)Brad King2010-10-111-4/+8
| | | | | Mention that it is implemented with -bundle-loader on platforms that need link-time symbol resolution but that do not use DLL import libs.
* Merge topic 'document-IMPORTED_NO_SONAME'Brad King2010-09-211-0/+18
|\ | | | | | | | | 8f96818 Document IMPORTED_NO_SONAME target property
| * Document IMPORTED_NO_SONAME target propertyBrad King2010-09-171-0/+18
| | | | | | | | | | Commit fd37a6ec (Better linker search path computation, 2008-02-21) added this property but did not document it. Add the documentation.
* | Merge topic 'improve-missing-source-file-error'Brad King2010-09-141-1/+8
|\ \ | | | | | | | | | | | | a6b5ead Report missing source files with context of target
| * | Report missing source files with context of targetBrad King2010-09-131-1/+8
| | | | | | | | | | | | | | | Previously we reported only the CMakeLists.txt file in the directory that adds the target.
* | | No CMAKE_CONFIGURATION_TYPES in single-config generators (#10202)Brad King2010-09-081-12/+1
|/ / | | | | | | | | | | Factor out reading of CMAKE_CONFIGURATION_TYPES and CMAKE_BUILD_TYPE into cmMakefile::GetConfigurations. Read the former only in multi-config generators.
* | Add FOLDER target property, for IDEs (#3796)David Cole2010-09-031-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This work was started from a patch by Thomas Schiffer. Thanks, Thomas! See the newly added documentation of the FOLDER target property for details. Also added global properties, USE_FOLDERS and PREDEFINED_TARGETS_FOLDER. See new docs here, too. By default, the FOLDER target property is used to organize targets into folders in IDEs that have support for such organization. This commit adds "solution folder" support to the Visual Studio generators. Currently works with versions 7 through 10. Also, use the new FOLDER property in the ExternalProject test and in the CMake project itself.
* | Add STATIC_LIBRARY_FLAGS_<CONFIG> property (#10768)Brad King2010-05-281-0/+5
| | | | | | | | This is a per-configuration version of STATIC_LIBRARY_FLAGS.
* | -fix typo in HAS_CXX docs (#10578)Alex Neundorf2010-04-211-1/+1
| | | | | | | | Alex
* | Name Cygwin DLLs with SOVERSION, not VERSIONBrad King2010-01-131-2/+2
| | | | | | | | | | | | | | | | | | Cygwin versions .dll files by putting the version number in the file name. Our fix to issue #3571 taught CMake to do this, but it used the VERSION target property. It is better to use the SOVERSION property since that is the interface (rather than implementation) version. Change based on patch from issue #10122.
* | Fix issue #9054 - ensure a valid install name for frameworks.David Cole2009-12-141-7/+14
| | | | | | | | | | | | When the INSTALL_NAME_DIR property is empty, still use a name of the form <name>.framework/Versions/<version>/<name> for installed frameworks.
* | Introduce per-config OUTPUT_DIRECTORY propertiesBrad King2009-10-281-2/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We create per-configuration target properties to specify ARCHIVE, LIBRARY, and RUNTIME output directories. The properties override the generic properties for the <CONFIG> configuration: ARCHIVE_OUTPUT_DIRECTORY -> ARCHIVE_OUTPUT_DIRECTORY_<CONFIG> LIBRARY_OUTPUT_DIRECTORY -> LIBRARY_OUTPUT_DIRECTORY_<CONFIG> RUNTIME_OUTPUT_DIRECTORY -> RUNTIME_OUTPUT_DIRECTORY_<CONFIG> For multi-configuration generators, the per-configuration subdirectory normally appended to the generic output directory is not added to the configuration-specific property values. This allows projects to set the exact location at which binaries will be placed for each configuration. See issue #9163.
* | Consolidate duplicate documentation in cmTargetBrad King2009-10-281-15/+10
| | | | | | | | | | The documentation of (ARCHIVE|LIBRARY|RUNTIME)_OUTPUT_DIRECTORY was duplicated. We consolidate it using a macro.
* | Define per-target OSX_ARCHITECTURES propertyBrad King2009-10-211-0/+39
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Target copy ctor should initialize internal stateBrad King2009-10-061-0/+1
| | | | | | | | | | | | The commit "Target copy ctor should copy internal state" created a new cmTargetInternals constructor but failed to initialize a POD member that the original constructor initializes. This commit fixes it.
* | Target copy ctor should copy internal stateBrad King2009-10-051-3/+9
| | | | | | | | | | | | | | Ideally we should never copy cmTarget instances, but it is a pain to remove current uses of it. The pimplized portion of cmTarget has mostly members that cache results, but some are part of the object state. These should be copied in the copy ctor instead of re-initialized.
* | Invalidate target link info when necessaryBrad King2009-10-051-0/+19
| | | | | | | | | | | | | | | | 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-9/+7
| | | | | | | | | | | | | | 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-0/+7
| | | | | | | | | | | | | | 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-12/+0
| |
* | Create INTERPROCEDURAL_OPTIMIZATION build featureBrad King2009-10-021-0/+13
| | | | | | | | | | | | | | | | This commit creates target and directory properties to enable the Intel interprocedural optimization support on Linux. Enabling it adds the compiler option '-ipo' and uses 'xiar' to create archives. See issue #9615.
* | Introduce "build feature" lookup frameworkBrad King2009-10-021-0/+20
| | | | | | | | | | | | | | 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.
* | Fix CMake Internal Error from cmTarget::GetOutputInfo - triggered by calling ↵David Cole2009-09-251-10/+14
| | | | | | | | GetLocation on a utility target - caused by custom command output file with same name as custom target. The fix is to avoid calling GetLocation unless the target is of a type that is expected to have a location...
* | Save source dependencies from custom command traceBrad King2009-09-071-5/+41
| | | | | | | | | | | | | | | | 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 source file dependency tracing logicBrad King2009-09-041-52/+56
| | | | | | | | | | | | | | | | | | | | In cmTarget we trace the dependencies of source files in the target to bring in all custom commands needed to generate them. We clean up the implementation to use simpler logic and better method names. The new approach is based on the observation that a source file is actually an input (dependency) of the rule that it runs (compiler or custom) even in the case that it is generated (another .rule file has the rule to generate it).
* | Cleanup cmTarget source file list representationBrad King2009-09-041-8/+16
| | | | | | | | | | | | 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/+64
| | | | | | | | | | | | | | | | | | 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-3/+9
| | | | | | | | | | | | | | 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.
* | Do not always propagate linker language preferenceBrad King2009-07-301-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | The commit "Consider link dependencies for link language" taught CMake to propagate linker language preference from languages compiled into libraries linked by a target. It turns out this should only be done for some languages, such as C++, because normally the language of the program entry point (main) should be used. We introduce variable CMAKE_<LANG>_LINKER_PREFERENCE_PROPAGATES to tell CMake whether a language should propagate its linker preference across targets. Currently it is true only for C++.
* | Refactor target linker language selectionBrad King2009-07-301-29/+56
| | | | | | | | | | | | This factors the decision logic out of cmTarget::ComputeLinkClosure into dedicated class cmTargetSelectLinker. We replace several local variables with a single object instance, and organize code into methods.
* | ENH: Export and import link interface languagesBrad King2009-07-111-0/+42
| | | | | | | | | | | | | | | | Now that languages are part of the link interface of a target we need to export/import the information. A new IMPORTED_LINK_INTERFACE_LANGUAGES property and per-config IMPORTED_LINK_INTERFACE_LANGUAGES_<CONFIG> property specify the information for imported targets. The export() and install(EXPORT) commands automatically set the properties.
* | ENH: Update LINKER_LANGUAGE and HAS_CXX docsBrad King2009-07-101-9/+15
| | | | | | | | | | This updates the documentation of these properties to account for the new automatic linker language computation.