summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix default PDB output directory (#13644)Brad King2012-11-021-1/+1
| | | | | | | | | The ComputePDBOutputDir added by commit 3f60dbf1 (Add PDB_OUTPUT_DIRECTORY and PDB_NAME target properties, 2012-09-25) falls back to the current binary directory instead of the target output directory as before. When no PDB_OUTPUT_DIRECTORY property is set we instead should fall back to the target output directory where .pdb files used to go before the new property was added.
* Merge topic 'vs-pdb-output'Brad King2012-10-011-0/+7
|\ | | | | | | | | | | | | | | 2ccca05 Run PDBDirectoryAndName test on MSVC and Intel efc83b3 Document that PDB_(NAME|OUTPUT_DIRECTORY) are ignored for VS 6 b294457 Verify that PDB_(NAME|OUTPUT_DIRECTORY) are honored in test 3f60dbf Add PDB_OUTPUT_DIRECTORY and PDB_NAME target properties (#10830)
| * Add PDB_OUTPUT_DIRECTORY and PDB_NAME target properties (#10830)Yuchen Deng2012-09-251-0/+7
| | | | | | | | | | | | | | This enables changing the name and output folder of the debug symbol files produced by MS compilers. Inspired-by: Thomas Bernard <thomas.bernard@ipetronik.com>
* | Revert "Move GenerateTargetManifest to cmGeneratorTarget."Stephen Kelly2012-09-201-0/+3
| | | | | | | | | | | | | | | | This reverts commit 987e12e2f962b6e9ed9f15f8ff486512911b744e. GenerateTargetManifest is called by the global generator before it creates the generator targets, so we can't move it to cmGeneratorTarget yet.
* | Move GetIncludeDirectories to cmGeneratorTarget.Stephen Kelly2012-09-191-3/+0
| |
* | Move GetCreateRuleVariable to cmGeneratorTarget.Stephen Kelly2012-09-191-4/+0
| |
* | Make cmLocalGenerator::AddArchitectureFlags take a cmGeneratorTarget.Stephen Kelly2012-09-191-3/+0
| |
* | Move GetLinkInformation to cmGeneratorTargetStephen Kelly2012-09-191-14/+0
| |
* | Move GenerateTargetManifest to cmGeneratorTarget.Stephen Kelly2012-09-191-3/+0
|/
* Remove incorrect doc string for link type enumStephen Kelly2012-08-191-3/+0
| | | | This is actually a duplicate doc string for a method a few lines above.
* Re-factor framework directory computation.Nicolas Despres2012-07-171-0/+3
|
* Re-factor Mac OS X content directory computation.Nicolas Despres2012-07-171-0/+13
|
* Support building shared libraries or modules without soname (#13155)Modestas Vainius2012-04-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a boolean target property NO_SONAME which may be used to disable soname for the specified shared library or module even if the platform supports it. This property should be useful for private shared libraries or various plugins which live in private directories and have not been designed to be found or loaded globally. Replace references to <CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG> and hard-coded -install_name flags with a conditional <SONAME_FLAG> which is expanded to the value of the CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG definition as long as soname supports is enabled for the target in question. Keep expanding CMAKE_SHARED_LIBRARY_SONAME_${LANG}_FLAG in rules in case third party projects still use it. Such projects would not yet use NO_SONAME so the adjacent <TARGET_SONAME> will always be expanded. Make <TARGET_INSTALLNAME_DIR> NO_SONAME aware as well. Since -install_name is soname on OS X, this should not be a problem if this variable is expanded only if soname is enabled. The Ninja generator performs rule variable substitution only once globally per rule to put its own placeholders. Final substitution is performed by ninja at build time. Therefore we cannot conditionally replace the soname placeholders on a per-target basis. Rather than omitting $SONAME from rules.ninja, simply do not write its contents for targets which have NO_SONAME. Since 3 variables are affected by NO_SONAME ($SONAME, $SONAME_FLAG, $INSTALLNAME_DIR), set them only if soname is enabled.
* Add $<TARGET_OBJECTS:...> expression to use an object libraryBrad King2012-03-161-0/+7
| | | | | | For now do not allow an OBJECT library to reference other object libraries. Teach cmTarget::ComputeLinkImplementation to include the languages of object libraries used by a target.
* Add OBJECT_LIBRARY target typeBrad King2012-03-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* Merge branch 'cleanup-object-file-names' into object-libraryBrad King2012-03-091-3/+0
|\
| * Remove unused partial OBJECT_FILES property implementationBrad King2012-03-061-3/+0
| | | | | | | | | | | | | | Remove partial implementation added by commit ca0230a3 (check in initial conv library stuff, 2007-02-16) since it was never finished. It does not make sense for multi-configuration generators since no specific build configuration is processed at CMake time.
* | Merge topic 'target-include-directories'David Cole2012-03-081-0/+3
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d662dff Fix shadowed variable warning on dashboard results f66e735 Fix compiler warning reported on older Borland dashboard. d90eed4 Fix compiler error reported on older Borland dashboard. 8233636 Update the documentation regarding INCLUDE_DIRECTORIES. d899eb7 Call ExpandVariablesInString for each target's INCLUDE_DIRECTORIES c21db87 Make search paths ordered and unique 22021f0 Remove cmMakefile::GetIncludeDirectories 9106b56 Extract and use the INCLUDE_DIRECTORIES target properties. 840509b Keep the INCLUDE_DIRECTORIES target property up to date. a4d5f7b Add API to get the ordered includes for a target. 8adaee2 CMake: Eliminate cmMakefile::IncludeDirectories 7620932 Remove include flags memoization. 97a5faa Make it safe to call this method without creating duplicates. edd5303 Refactor GetIncludeFlags to take includes instead of fetching them
| * Add API to get the ordered includes for a target.Stephen Kelly2012-02-221-0/+3
| |
* | Factor cmInstallType out of cmTarget::TargetTypeBrad King2012-02-271-1/+0
|/ | | | | | The purpose of the TargetType enumeration was overloaded for install type because install rules were once recorded as targets. Factor the install types out into their own enumeration.
* Merge topic 'refactor-versioned-lib-names'David Cole2011-12-071-0/+7
|\ | | | | | | | | 96f65ba cmTarget: Create helper method for versioned library names
| * cmTarget: Create helper method for versioned library namesBrad King2011-12-061-0/+7
| | | | | | | | | | Replace the duplicate logic for the realName and soName of versioned shared libraries with calls to a new ComputeVersionedName method.
* | Add CMAKE_GNUtoMS option to convert GNU .dll.a to MS .libBrad King2011-12-051-0/+8
|/ | | | | | | | | | | | | | | | Teach the Windows-GNU.cmake platform file to look for Visual Studio tools matching the target ABI. Add an extra step to the link command for shared libraries and executables that export symbols and on which a new GNUtoMS property is set (initialized by the CMAKE_GNUtoMS option). Tell the GNU linker to output a module definition (.def) file listing exported symbols in addition to the GNU-format import library (.dll.a). Pass the .def file to the MS "lib" tool to construct a MS-format DLL import library (.lib). Teach the install(TARGETS) command to install the MS import library next to the GNU one. Teach the install(EXPORT) and export() command to set the IMPORTED_IMPLIB property pointing at the import library to use the import library matching the tools in the importing project.
* Refactor TargetTypeNames.Nicolas Despres2011-10-021-1/+1
| | | | | | Make it a static method instead of an array. It is safer for the type checking and if we add a new target type we will be warned to add a case to the switch.
* Merge topic 'effective-platform-name'Brad King2011-07-261-1/+5
|\ | | | | | | | | | | 74c73d5 Correct KWStyle line too long error 0c030ef Add use of EFFECTIVE_PLATFORM_NAME to generated Xcode projects.
| * Add use of EFFECTIVE_PLATFORM_NAME to generated Xcode projects.David Cole2011-07-181-1/+5
| | | | | | | | | | Facilitates building iOS projects, enabling switching back and forth between simulator and device builds at development time.
* | Fix #12342: Add APPEND_STRING option to set_property()Alex Neundorf2011-07-151-1/+1
|/ | | | | | | | | set_property() has APPEND, which creates a list. E.g. when appending to COMPILE_FLAGS a string is needed, not a list. With the APPEND_STRING option the value is append as string, not as list. Alex
* Documentation: Fix a few typos (#11883)Modestas Vainius2011-02-221-1/+1
| | | | | | | | | | | | | W: cmake: manpage-has-errors-from-man usr/share/man/man1/cmake.1.gz 10029: warning [p 158, 13.5i]: can't break line I: cmake: spelling-error-in-manpage usr/share/man/man1/cmake.1.gz informations information I: cmake: spelling-error-in-manpage usr/share/man/man1/cmake.1.gz dependant dependent I: cmake: spelling-error-in-manpage usr/share/man/man1/cmake.1.gz prefered preferred I: cmake: spelling-error-in-binary ./usr/bin/cmake prefered preferred I: cmake: spelling-error-in-binary ./usr/bin/cpack prefered preferred I: cmake: spelling-error-in-binary ./usr/bin/ctest prefered preferred I: cmake-data: spelling-error-in-manpage usr/share/man/man1/cmakepolicies.1.gz prefered preferred I: cmake-curses-gui: spelling-error-in-binary ./usr/bin/ccmake prefered preferred I: cmake-qt-gui: spelling-error-in-binary ./usr/bin/cmake-gui prefered preferred
* Add support for CFBundle targets on the Mac (#11295)Richard Bateman2011-01-111-0/+3
| | | | | This commit enables building, for example, plugin bundles to be loaded by web browsers.
* 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.