summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.h
Commit message (Collapse)AuthorAgeFilesLines
* stringapi: Miscellaneous char* parametersBen Boeckel2014-03-081-1/+1
|
* stringapi: Use strings for feature argumentsBen Boeckel2014-03-081-1/+1
|
* stringapi: Pass configuration names as stringsBen Boeckel2014-03-081-67/+80
|
* cmTarget: Refactor GetLocation APIBrad King2014-03-081-5/+6
| | | | | | | | | When given a non-NULL configuration the GetLocation returned the location for the given configuration. When given a NULL configuration the GetLocation method returned a location with the build-system placeholder for the configuration name. Split the latter use case out into a separate GetLocationForBuild method and update call sites accordingly.
* strings: Remove cmStdString referencesBen Boeckel2014-03-081-12/+12
| | | | | | | | | | | Casts from std::string -> cmStdString were high on the list of things taking up time. Avoid such implicit casts across function calls by just using std::string everywhere. The comment that the symbol name is too long is no longer relevant since modern debuggers alias the templates anyways and the size is a non-issue since the underlying methods are generated since it's inherited.
* stringapi: Use strings in target nameBen Boeckel2014-03-081-9/+9
|
* stringapi: Use strings for the languagesBen Boeckel2014-03-081-1/+1
|
* stringapi: Use strings for source namesBen Boeckel2014-03-081-1/+1
|
* stringapi: Use strings for property namesBen Boeckel2014-03-081-8/+11
| | | | Property names are always generated by CMake and should never be NULL.
* Merge topic 'msvc-compiler-pdb-files'Brad King2014-02-261-3/+20
|\ | | | | | | | | | | | | | | | | fba51b09 MSVC: Add properties to configure compiler PDB files (#14762) 3737860a cmTarget: Add per-config compilation info 718a9532 cmTarget: Refactor ComputePDBOutputDir interface aae5184c Help: Refactor PDB_NAME and PDB_OUTPUT_DIRECTORY docs b4aac0ca Makefile: Fix per-config linker PDB output directory
| * MSVC: Add properties to configure compiler PDB files (#14762)Brad King2014-02-261-0/+12
| | | | | | | | | | | | | | | | | | | | Since commit v2.8.12~437^2~2 (VS: Separate compiler and linker PDB files 2013-04-05) we no longer set /Fd with the PDB_NAME or PDB_OUTPUT_DIRECTORY properties. Those properties now exclusively handle linker PDB files. Since STATIC libraries do not link their compiler PDB file becomes more important. Add new target properties "COMPILE_PDB_NAME[_<CONFIG>]" and "COMPILE_PDB_OUTPUT_DIRECTORY[_<CONFIG>]" to specify the compiler PDB file location and pass the value to the MSVC /Fd option.
| * cmTarget: Add per-config compilation infoBrad King2014-02-241-0/+4
| | | | | | | | | | | | | | Add a cmTarget::CompileInfo struct to hold per-configuration information about the compilation settings in a target. This is different than cmTarget::OutputInfo because it applies to any targets that can compile sources even if they do not link or archive.
| * cmTarget: Refactor ComputePDBOutputDir interfaceBrad King2014-02-241-1/+2
| | | | | | | | | | | | Add a runtime parameter to specify the property name prefix. Update the call site to pass "PDB" to preserve the existing name for that call path.
| * Makefile: Fix per-config linker PDB output directoryBrad King2014-02-241-2/+2
| | | | | | | | | | | | Also, now that all call sites of cmTarget::GetPDBName and cmTarget::GetPDBDirectory pass the configuration, make the argument non-optional.
* | cmTarget: Add GetTransitiveTargetClosure method.Stephen Kelly2014-02-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace calls to GetLinkInformation with calls to a method to get only the target closure, not the link languages etc. The replaced calls are used while evaluating generator expressions only. This makes transitive generator expression evaluation independent from the languages of a target. In a follow-up topic, it will be possible to make the languages depend on generator expression evaluation, via evaluation of the SOURCES and INTERFACE_SOURCES target properties. Because the order of entries is not the same as the final link line, the order of debug output is different in the RunCMake.CompatibleInterface test, because the BOOL_PROP7 target property is evaluated first. Adjust the test to account for that new order.
* | cmTarget: Avoid computing languages when computing transitive targets.Stephen Kelly2014-02-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the OLD CMP0022 behavior, we need to treat the implementation as the interface when computing the interface libraries. Make it possible to do that without computing the link languages by adding a new GetLinkImplementationLibraries method. Extend the existing GetLinkImplementation method to populate the languages if the libraries have already been computed and cached. Change GetTransitivePropertyTargets to invoke GetLinkInterfaceLibraries instead of GetLinkInterface. This is key, as it is a method called by cmGeneratorExpressionEvaluator. Change the cmGeneratorExpressionEvaluator to invoke GetLinkImplementationLibraries instead of GetLinkImplementation.
* | cmTarget: Move ComputeLinkInterface to the internal class.Stephen Kelly2014-02-241-4/+0
| | | | | | | | | | In a follow-up, this will use the OptionalLinkInterface in its API. That class is in the cmTargetInternals class.
* | cmTarget: Extract a ComputeLinkInterfaceLibraries method.Stephen Kelly2014-02-241-2/+8
| | | | | | | | | | | | When evaluating the SOURCES property, we will need to be able to access the link libraries without accessing the link languages, as the languages depend on the SOURCES.
* | cmTarget: Extract a ComputeLinkImplementationLanguages method.Stephen Kelly2014-02-241-0/+1
| |
* | cmTarget: Change GetTransitivePropertyLinkLibraries to output targets.Stephen Kelly2014-02-241-2/+2
| | | | | | | | | | | | | | The callers already skip non-targets, so unify the target search. Change supporting functions to accept a container of targets instead of strings where possible.
* | cmTarget: Find source files on request.Stephen Kelly2014-02-241-5/+0
| | | | | | | | | | | | In a follow-up, the list of sources will become dependent on the config, so check for existence in cmTarget::GetSourceFiles instead of up-front with cmGlobalGenerator::CheckTargets().
* | cmTarget: Move SourceFileFlags to cmGeneratorTarget.Stephen Kelly2014-02-241-29/+0
|/
* cmTarget: Clean up the InsertCompileDefinition implementation.Stephen Kelly2014-02-021-2/+1
| | | | | | | It accepts a before parameter but is never called with before=true. compile definitions are sorted by std::set, so it wouldn't make sense to allow user sorting.
* AddDependencies: new policy requires dependencies to existNils Gladitz2014-01-121-1/+3
| | | | | Added new policy CMP0046 which requires dependencies added by add_dependencies() to actually exist.
* cmTarget: Make GetSourceFiles populate an out-vector parameter.Stephen Kelly2014-01-091-1/+1
| | | | | In a future patch, this will also be populated with extra sources from the linked dependencies.
* cmTarget: Fix system include annotation propagation.Stephen Kelly2014-01-061-2/+0
| | | | | | | | | | | | Direct users of IMPORTED targets treat INTERFACE_INCLUDE_DIRECTORIES as SYSTEM, after commit a63fcbcb (Always consider includes from IMPORTED targets to be SYSTEM., 2013-08-29). It was intended that transitive use of an IMPORTED target would have the same behavior, but that did not work. The implementation processed only direct dependencies in cmTarget::FinalizeSystemIncludeDirectories. Implement transitive evaluation of dependencies by traversing the link interface of each target in the link implementation.
* Merge topic 'rpath-default'Brad King2014-01-021-2/+6
|\ | | | | | | | | d25ad48 OS X: Add CMP0042 to enable MACOSX_RPATH by default
| * OS X: Add CMP0042 to enable MACOSX_RPATH by defaultClinton Stimpson2014-01-021-2/+6
| | | | | | | | | | Also adding documentation for CMAKE_MACOSX_RPATH, and improving documentation for MACOSX_RPATH.
* | Constify handling of target dependencies.Stephen Kelly2013-12-111-1/+1
|/
* cmTarget: Require a compatible INTERFACE_AUTOUIC_OPTIONS from dependencies.Stephen Kelly2013-12-081-1/+0
| | | | | | | | | Revert the origin-tracking infrastructure from commit 98093c45 (QtAutoUic: Add INTERFACE_AUTOUIC_OPTIONS target property., 2013-11-20). Use the compatibility-tracking for compatible strings instead. If two different dependencies require different AUTOUIC_OPTIONS, cmake will now appropriately issue an error.
* cmTarget: Report origin of COMPATIBLE_INTERFACE properties.Stephen Kelly2013-12-081-0/+6
|
* Merge topic 'INTERFACE_AUTOUIC_OPTIONS'Brad King2013-12-021-0/+3
|\ | | | | | | | | | | | | | | 98093c4 QtAutoUic: Add INTERFACE_AUTOUIC_OPTIONS target property. 02542b4 QtAutoUic: Handle new -include command line parameter. 1242f4e Genex: Add {UPPER,LOWER}_CASE and MAKE_C_IDENTIFIER. 754b321 QtAutogen: Use config without prefix in map key.
| * QtAutoUic: Add INTERFACE_AUTOUIC_OPTIONS target property.Stephen Kelly2013-11-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Transitively consume the property from linked dependents. Implement configuration-specific support by following the pattern set out for compile definitions and includes in cmQtAutoGenerators. Implement support for origin-tracking with CMAKE_DEBUG_TARGET_PROPERTIES. This is motivated by the needs of KDE, which provides a separate translation system based on gettext instead of the Qt linguist translation system. The Qt uic tool provides command line options for configuring the method used to translate text, and to add an include directive to the generated file to provide the method. http://thread.gmane.org/gmane.comp.kde.devel.frameworks/7930/focus=7992 Implement the interface to provide the uic options as a usage-requirement on the KI18n target, as designed for KDE.
* | Export: Report error on relative include with genex.Stephen Kelly2013-11-261-1/+2
|/ | | | | | | | | | | | Diagnostics which check the sanity of exported include paths previously skipped over any path containing a generator expression. Introduce a policy to issue an error message in such cases. The export files created in the OLD behavior are not usable, because they contain relative paths or paths to the source or build location which are not suitable for use on installation. CMake will report an error on import.
* cmTarget: Trivially make more API const.Stephen Kelly2013-11-191-14/+15
|
* cmTarget: Make GetExportMacro const.Stephen Kelly2013-11-191-2/+2
| | | | The std::string member is only used for memory management.
* cmTarget: Make NameResolvesToFramework const.Stephen Kelly2013-11-191-1/+1
|
* cmTarget: Make GetInterfaceLinkLibraries const.Stephen Kelly2013-11-191-1/+1
|
* cmTarget: Make GetTargetSourceFileFlags const.Stephen Kelly2013-11-191-2/+3
|
* cmTarget: Make custom command accessors API const.Stephen Kelly2013-11-191-3/+9
| | | | Add specific mutators instead of providing non-const refs.
* Make accessors for compile-related information const.Stephen Kelly2013-11-091-6/+6
| | | | These can be moved to cmGeneratorTarget in CMake 4.0.
* cmTarget: Make some accessors const.Stephen Kelly2013-11-031-7/+7
|
* Merge topic 'constify'Brad King2013-11-011-78/+85
|\ | | | | | | | | | | c4373b3 cmTarget: Make GetProperty() const. cfb6661 Don't call SetProperty from GetProperty.
| * cmTarget: Make GetProperty() const.Stephen Kelly2013-10-311-78/+85
| | | | | | | | | | | | This has follow-on effects for other methods and classes. Further work on making the use of const cmTarget pointers common can be done, particularly with a view to generate-time methods.
* | Move TraceDependencies to cmGeneratorTarget.Stephen Kelly2013-10-301-9/+4
|/
* Remove the Location member from cmTarget.Stephen Kelly2013-10-291-1/+0
| | | | | | | It is never used. Presumably it only exists so that a const char * can be returned from GetLocation. However, that is getting in the way now, so use a static std::string instead, which is already a common pattern in cmake.
* Move GenerateTargetManifest to cmGeneratorTarget.Stephen Kelly2013-10-271-3/+0
|
* cmTarget: Add interface for compatible numeric propertiesStephen Kelly2013-10-241-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using the boost MPL library, one can set a define to increase the limit of how many variadic elements should be supported. The default for BOOST_MPL_LIMIT_VECTOR_SIZE is 20: http://www.boost.org/doc/libs/1_36_0/libs/mpl/doc/refmanual/limit-vector-size.html If the foo library requires that to be set to 30, and the independent bar library requires it to be set to 40, consumers of both need to set it to 40. add_library(foo INTERFACE) set_property(TARGET foo PROPERTY INTERFACE_boost_mpl_vector_size 30) set_property(TARGET foo PROPERTY COMPATIBLE_INTERFACE_NUMBER_MAX boost_mpl_vector_size) target_compile_definitions(foo INTERFACE BOOST_MPL_LIMIT_VECTOR_SIZE=$<TARGET_PROPERTY:boost_mpl_vector_size>) add_library(bar INTERFACE) set_property(TARGET bar PROPERTY INTERFACE_boost_mpl_vector_size 40) # Technically the next two lines are redundant, but as foo and bar are # independent, they both set these interfaces. set_property(TARGET bar PROPERTY COMPATIBLE_INTERFACE_NUMBER_MAX boost_mpl_vector_size) target_compile_definitions(bar INTERFACE BOOST_MPL_LIMIT_VECTOR_SIZE=$<TARGET_PROPERTY:boost_mpl_vector_size>) add_executable(user) target_link_libraries(user foo bar) Because the TARGET_PROPERTY reads the boost_mpl_vector_size property from the HEAD of the dependency graph (the user target), and because that property appears in the COMPATIBLE_INTERFACE_NUMBER_MAX of the dependencies of the user target, the maximum value for it is chosen for the compile definition, ie, 40. There are also use-cases for choosing the minimum value of a number. In Qt, deprecated API can be disabled by version. Setting the definition QT_DISABLE_DEPRECATED_BEFORE=0 disables no deprecated API. Setting it to 0x501000 disables API which was deprecated before Qt 5.1 etc. If two dependencies require the use of API which was deprecated in different Qt versions, then COMPATIBLE_INTERFACE_NUMBER_MIN can be used to ensure that both can compile.
* Create make rules for INTERFACE_LIBRARY targets.Stephen Kelly2013-10-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The result is that the depends of the target are created. So, add_library(somelib foo.cpp) add_library(anotherlib EXCLUDE_FROM_ALL foo.cpp) add_library(extra EXCLUDE_FROM_ALL foo.cpp) target_link_libraries(anotherlib extra) add_library(iface INTERFACE) target_link_libraries(iface INTERFACE anotherlib) Executing 'make iface' will result in the anotherlib and extra targets being made. Adding a regular executable to the INTERFACE of an INTERFACE_LIBRARY will not result in the executable being built with 'make iface' because of the logic in cmComputeTargetDepends::AddTargetDepend. So far, this is implemented only for the Makefile generator. Other generators will follow if this feature is possible for them. Make INTERFACE_LIBRARY targets part of the all target by default. Test this by building the all target and making the expected library EXCLUDE_FROM_ALL.
* cmTarget: Deprecate the LOCATION target property with a policy.Stephen Kelly2013-10-111-0/+2
| | | | | | | | | | | | The final location and name of a build-target is not determined until generate-time. However, reading the LOCATION property from a target is currently allowed at configure time. Apart from creating possibly-erroneous results, this has an impact on the implementation of cmake itself, and prevents some major cleanups from being made. Disallow reading LOCATION from build-targets with a policy. Port some existing uses of it in CMake itself to use the TARGET_FILE generator expression.