summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Add a way to print the origins of used include directories.Stephen Kelly2013-01-031-0/+27
|
* Keep track of INCLUDE_DIRECTORIES as a vector of structs.Stephen Kelly2013-01-031-2/+123
| | | | | The struct can keep track of where the include came from, which gives us proper backtraces.
* Use cmsys::auto_ptr to manage cmCompiledGeneratorExpressionsStephen Kelly2012-12-201-3/+4
| | | | | The compiled generator expressions need to outlive the creating type. For the same reason, store the input string in a std::string.
* Makefile: Use modern link information for framework search pathsBrad King2012-12-071-21/+0
| | | | | | Use cmComputeLinkInformation::GetFrameworkPaths to get the list of framework paths needed by the linker. Drop the now unused framework information from the old-style cmTarget link dependency analysis.
* Revert "Move GetLinkInformation to cmGeneratorTarget"Stephen Kelly2012-11-211-0/+50
| | | | | | | As we can't move all linking related code from cmTarget, it makes sense to reverse the move in some cases. This reverts commit 4f5384e75c6a00d110d3fa3f555a3f6a4f31bb46.
* Split link information processing into two steps.Stephen Kelly2012-11-211-2/+12
| | | | | The first step can be ported to use the generator expression API, while the second can not. This is for compatibility with CMP0003.
* Merge topic 'per-config-EXCLUDE_FROM_DEFAULT_BUILD'Brad King2012-11-201-0/+15
|\ | | | | | | | | | | | | | | 739f166 Serialize tests for EXCLUDE_FROM_DEFAULT_BUILD e31d83b Define property EXCLUDE_FROM_DEFAULT_BUILD d1f8828 Add property EXCLUDE_FROM_DEFAULT_BUILD_<CONFIG> b777272 Add tests for EXCLUDE_FROM_DEFAULT_BUILD
| * Define property EXCLUDE_FROM_DEFAULT_BUILDPetr Kmoch2012-11-131-0/+15
| | | | | | | | | | Add definition and documentation of properties EXLCUDE_FROM_DEFAULT_BUILD and EXCLUDE_FROM_DEFAULT_BUILD_<CONFIG>.
* | Merge topic 'link-depends-no-shared'Brad King2012-11-131-0/+17
|\ \ | |/ |/| | | | | | | 306796e Teach BuildDepends test to cover LINK_DEPENDS_NO_SHARED ed97631 Optionally skip link dependencies on shared library files
| * Optionally skip link dependencies on shared library filesBrad King2012-10-261-0/+17
| | | | | | | | | | | | | | Add target property LINK_DEPENDS_NO_SHARED and initialization variable CMAKE_LINK_DEPENDS_NO_SHARED to enable this behavior. Suggested-by: Leif Walsh <leif.walsh@gmail.com>
* | Fix default PDB output directory (#13644)Brad King2012-11-021-4/+7
|/ | | | | | | | | 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 'documentation-cleanup'Brad King2012-10-011-6/+12
|\ | | | | | | | | | | | | | | | | | | 4ad0233 Remove period at the end of the check message. 50b1ea5 Fix minor typos. 19c3206 Remove unused parameter marker and the unused parameter. 9d462b2 Document that generator expressions can be used in target properties. daf88c3 Fix punctuation in some variables documentation. 3172cde Fix the layout of the generator expression documentation.
| * Fix minor typos.Stephen Kelly2012-09-291-2/+2
| | | | | | | | | | | | | | | | nothe -> note than -> that duplicat -> duplicate directory -> directly Wipe wipe -> Wipe
| * Remove unused parameter marker and the unused parameter.Stephen Kelly2012-09-291-2/+1
| |
| * Document that generator expressions can be used in target properties.Stephen Kelly2012-09-291-2/+9
| |
* | Merge topic 'vs-pdb-output'Brad King2012-10-011-3/+136
|\ \ | |/ |/| | | | | | | | | | | 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)
| * Document that PDB_(NAME|OUTPUT_DIRECTORY) are ignored for VS 6Brad King2012-09-251-4/+12
| |
| * Add PDB_OUTPUT_DIRECTORY and PDB_NAME target properties (#10830)Yuchen Deng2012-09-251-3/+128
| | | | | | | | | | | | | | 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/+70
| | | | | | | | | | | | | | | | 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-24/+0
| |
* | Move GetCreateRuleVariable to cmGeneratorTarget.Stephen Kelly2012-09-191-19/+0
| |
* | Make cmLocalGenerator::AddArchitectureFlags take a cmGeneratorTarget.Stephen Kelly2012-09-191-21/+0
| |
* | Move GetLinkInformation to cmGeneratorTargetStephen Kelly2012-09-191-50/+0
| |
* | Move GenerateTargetManifest to cmGeneratorTarget.Stephen Kelly2012-09-191-70/+0
|/
* cmGeneratorExpression: Port users to two-stage processingStephen Kelly2012-09-181-4/+13
| | | | | | | | | | Removing the Process() API and removing the parameters from the constructor will allow cmGeneratorExpressions to be cached and evaluated with multiple configs for example, such as when evaluating target properties. This requires the creation of a new compiled representation of cmGeneratorExpression. The cmListFileBacktrace remains in the constructor so that we can record where a particular generator expression appeared in the CMakeLists file.
* add_library: Document POSITION_INDEPENDENT_CODE default (#13479)Brad King2012-08-311-1/+1
| | | | | | | | | | The POSITION_INDEPENDENT_CODE property documentation states that its default value depends on whether SHARED or MODULE is given to the add_library call. Since these are options to the add_library command we should document on the command how they affect the property. While at it, add a missing space to the POSITION_INDEPENDENT_CODE property documentation.
* Fix casing of 'Qt' in docs, comments and user-visible strings.Stephen Kelly2012-08-281-1/+1
| | | | | QT (cue-tea) is Apple QuickTime. Qt (cute) is the C++ framework.
* Merge topic 'pic-docs'David Cole2012-08-241-1/+4
|\ | | | | | | | | c82fbe0 Fix unfortunate documentation error for PIC feature.
| * Fix unfortunate documentation error for PIC feature.Stephen Kelly2012-08-201-1/+4
| | | | | | | | | | The wrong variable is documented, and it is not referred to in the target-specific property.
* | Remove duplicate 'of' from docs.Stephen Kelly2012-08-201-1/+1
| |
* | Add missing whitespace to docs.Stephen Kelly2012-08-191-1/+1
|/
* Re-factor framework directory computation.Nicolas Despres2012-07-171-12/+14
|
* Re-factor Mac OS X content directory computation.Nicolas Despres2012-07-171-45/+62
|
* Ninja: Add support for CFBundle.Nicolas Despres2012-07-171-0/+13
| | | | This patch fixes test CFBundleTest on Darwin.
* Refactor generation of shared library flagsStephen Kelly2012-06-121-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | CMAKE_SHARED_LIBRARY_<lang>_FLAGS has flags on various platforms for a variety of purposes that are correlated with shared libraries but not exclusive to them. Refactor generation of these flags to use new purpose-specific platform variables CMAKE_<lang>_COMPILE_OPTIONS_DLL CMAKE_<lang>_COMPILE_OPTIONS_PIC CMAKE_<lang>_COMPILE_OPTIONS_PIE Activate the DLL flags specifically for shared libraries. Add a new POSITION_INDEPENDENT_CODE target property to activate PIC/PIE flags, and default to true for shared libraries to preserve default behavior. Initialize the new property from CMAKE_POSITION_INDEPENDENT_CODE to allow easy global configuration in projects. Although the default behavior is unchanged by this refactoring, the new approach ignores CMAKE_SHARED_LIBRARY_<lang>_FLAGS completely. We must leave it set in case projects reference the value. Furthermore, if a project modifies CMAKE_SHARED_LIBRARY_<lang>_FLAGS it expects the new value to be used. Add policy CMP0018 to handle compatibility with projects that modify this platform variable. Add a PositionIndependentCode test on platforms where we can get meaningful results.
* Update the docs of IMPORTED_LOCATION_CONFIG to match the code.Stephen Kelly2012-05-251-3/+3
|
* Fix a few typos in NO_SONAME property description.Modestas Vainius2012-05-021-1/+1
|
* Support building shared libraries or modules without soname (#13155)Modestas Vainius2012-04-301-13/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* CMake: Clarify SUFFIX target property documentation.David Cole2012-04-021-2/+3
| | | | | Make it clear that the property applies to libs, modules and exes, not just libs.
* Merge topic 'object-library'David Cole2012-03-201-1/+43
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 93d5509 Merge branch 'ninja-object-library' into object-library 821037c Merge branch 'xcode-object-library' into object-library eb24c99 Merge branch 'object-library' into xcode-object-library 63d1be8 Xcode: Honor $<TARGET_OBJECTS:...> source expressions 020ba38 Merge branch 'object-library' into xcode-object-library e8ea615 Build object library targets in Xcode 8045e17 Pre-compute object file names before Xcode generation 247a132 Allow txt files as ExtraSources in object library targets b063599 Add a default source group for object files. be01f3b Xcode: Re-factor some existing methods into "FromPath" variants 2693dbe Merge branch 'object-library' into ninja-object-library 51997cb Ninja: Honor $<TARGET_OBJECTS:...> source expressions 23ec258 Merge branch 'object-library' into ninja-object-library 61124de Build object library targets in Ninja f5b06cd Pre-compute object file names before Ninja generation a2514f1 Simplify cmNinjaTargetGenerator using cmGeneratorTarget ...
| * Add $<TARGET_OBJECTS:...> expression to use an object libraryBrad King2012-03-161-1/+41
| | | | | | | | | | | | 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-0/+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-59/+0
| |\
* | \ Merge topic 'doc-Fortran-mod-dir-issue-13034'Brad King2012-03-131-1/+6
|\ \ \ | | | | | | | | | | | | | | | | 54604ee Document Fortran_MODULE_DIRECTORY as OUTPUT only (#13034)
| * | | Document Fortran_MODULE_DIRECTORY as OUTPUT only (#13034)Brad King2012-03-121-1/+6
| |/ / | | | | | | | | | | | | | | | CMake does not automatically pass the Fortran module output directory location to the module search path. Add a note to the documentation that the location must also be specified by INCLUDE_DIRECTORIES.
* | | Merge topic 'cleanup-object-file-names'Brad King2012-03-131-59/+0
|\ \ \ | |/ / |/| / | |/ | | | | | | 0996f2a Hide Makefile local object info inside local generator 67734be VS: Simplify object name computation 4ae7f36 Remove unused partial OBJECT_FILES property implementation
| * Remove unused partial OBJECT_FILES property implementationBrad King2012-03-061-59/+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/+49
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * | Update the documentation regarding INCLUDE_DIRECTORIES.David Cole2012-02-221-0/+20
| | | | | | | | | | | | | | | It is now a target property and is affected by the use of the include_directories command.
| * | Keep the INCLUDE_DIRECTORIES target property up to date.Stephen Kelly2012-02-221-0/+5
| | | | | | | | | | | | The directory level property changes need to be added to it.