summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'INTERFACE_AUTOUIC_OPTIONS'Brad King2013-12-091-139/+153
|\ | | | | | | | | | | 77f3772 cmTarget: Require a compatible INTERFACE_AUTOUIC_OPTIONS from dependencies. 2e60b5f cmTarget: Report origin of COMPATIBLE_INTERFACE properties.
| * cmTarget: Require a compatible INTERFACE_AUTOUIC_OPTIONS from dependencies.Stephen Kelly2013-12-081-143/+26
| | | | | | | | | | | | | | | | | | 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-3/+134
| |
* | Don't generate self-references for system include directories.Stephen Kelly2013-12-031-1/+1
|/ | | | | | | Targets which link directly to themselves should not result in generate-time errors (reported by the DAG checker). Self-links are handled separately with policy CMP0038.
* QtAutoUic: Add INTERFACE_AUTOUIC_OPTIONS target property.Stephen Kelly2013-11-271-0/+144
| | | | | | | | | | | | | | | | | | | | 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.
* Merge topic 'ninja-compile-link-pool'Brad King2013-11-261-0/+3
|\ | | | | | | | | 7605e37 Ninja: job pool support for compiling and linking
| * Ninja: job pool support for compiling and linkingPeter Kümmel2013-11-251-0/+3
| | | | | | | | | | Could be tested by setting the environment variable NINJA_STATUS=[%r]
* | cmTarget: Add whitelist of properties on INTERFACE_LIBRARY.Stephen Kelly2013-11-251-0/+70
| |
* | INTERFACE_LIBRARY: Avoid codepaths which set unneeded properties.Stephen Kelly2013-11-251-56/+77
|/ | | | | | | | | | | | | As an INTERFACE_LIBRARY has no direct link dependencies, we can short-circuit in cmGeneratorExpressionEvaluator and in cmGlobalGenerator::CheckLocalGenerators. As they do not generate any output directly, any generate- or install- related code acn also be short-circuited. Many of the local generators already do this. Because only INTERFACE related properties make sense on INTERFACE_LIBRARY targets, avoid setting other properties, for example via defaults.
* Merge topic 'add-cmHasLiteralPrefix'Brad King2013-11-221-7/+7
|\ | | | | | | | | | | 4fe963f Use new cmHasLiteralPrefix function 7d4b2b2 cmStandardIncludes: Add new cmHasLiteralPrefix function.
| * Use new cmHasLiteralPrefix functionStephen Kelly2013-11-211-7/+7
| |
* | cmTarget: Trivially make more API const.Stephen Kelly2013-11-191-11/+11
| |
* | cmTarget: Make GetExportMacro const.Stephen Kelly2013-11-191-1/+1
| | | | | | | | The std::string member is only used for memory management.
* | cmTarget: Make NameResolvesToFramework const.Stephen Kelly2013-11-191-2/+2
| |
* | cmTarget: Make GetInterfaceLinkLibraries const.Stephen Kelly2013-11-191-1/+1
| |
* | cmTarget: Make GetTargetSourceFileFlags const.Stephen Kelly2013-11-191-4/+4
|/
* Merge topic 'constify'Brad King2013-11-121-15/+14
|\ | | | | | | | | | | | | dcac9be Make accessors for compile-related information const. 19a8a3c cmTarget: Don't finalize include directories in GetIncludeDirectories. 3305364 cmGlobalGenerator: Rename the FinalizeCompileDefinitions method.
| * Make accessors for compile-related information const.Stephen Kelly2013-11-091-13/+14
| | | | | | | | These can be moved to cmGeneratorTarget in CMake 4.0.
| * cmTarget: Don't finalize include directories in GetIncludeDirectories.Stephen Kelly2013-11-071-2/+0
| | | | | | | | Rely on that having been done by the cmGlobalGenerator.
* | Disallow link-to-self (#13947).Stephen Kelly2013-11-071-7/+38
|/
* Merge topic 'policy-CMP0022-fixes-for-master'Brad King2013-11-041-140/+112
|\ | | | | | | | | | | | | | | | | | | | | | | b51696f CMP0022: Update target_link_libraries plain signature documentation 25b7f87 Merge branch 'policy-CMP0022-fixes' into policy-CMP0022-fixes-for-master 0a561a0 CMP0022: Warn about a given target at most once 23d21b7 Do not export INTERFACE_LINK_LIBRARIES from non-linkable targets ef10b87 CMP0022: Plain target_link_libraries must populate link interface 0e06788 CMP0022: Add test for target_link_libraries plain signature c0f4a61 CMP0022: Add unit test for null pointer check and message. 4b0cfa7 Merge branch 'output-CMP0022-entries' into policy-CMP0022-fixes
| * Merge branch 'policy-CMP0022-fixes' into policy-CMP0022-fixes-for-masterBrad King2013-11-031-140/+112
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve conflict in Source/cmTarget.cxx by integrating the changes to the internal copy constructor from both sides. Also resolve a logical conflict by dropping the special case for INTERFACE_LIBRARY targets. Since cmTarget::SetMakefile already forces CMP0022 to NEW for such targets we need no special handling. Resolve conflict in Source/cmTargetLinkLibrariesCommand.h by dropping the documentation change. We will make the same change in the new location of the same documentation in a separate commit. Resolve conflicts in Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt Tests/RunCMake/CMP0022/RunCMakeTest.cmake by taking the side from the 'policy-CMP0022-fixes' branch.
| | * CMP0022: Warn about a given target at most onceBrad King2013-11-031-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since cmTarget::ComputeLinkInterface is called separately for each "head" target that links a target, the warning we produce when CMP0022 is not set could be repeated. Add explicit logic to allow the warning to appear at most once. Multiple copies of the warning for the same target are almost always identical and therefore redundant. In the rare case that two copies of the warning are different, the second can appear in a future run after the first is fixed.
| | * CMP0022: Plain target_link_libraries must populate link interfaceBrad King2013-11-021-135/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CMP0022 NEW behavior is that the INTERFACE_LINK_LIBRARIES property exactly defines the link interface. The plain target_link_libraries signature says linking is transitive by default, so it should populate the property. Teach the target_link_libraries plain signature to populate the INTERFACE_LINK_LIBRARIES regardless of the CMP0022 setting. Refactor the cmTarget::ComputeLinkInterface checks that warn when the policy is not set to compare the new property to either the explicitly set old link interface properties or the link implementation fallback for all linkable target types, not just static libraries. This fixes a regression in 2.8.12.0 that caused target_link_libraries to not implement transitive linking in the plain signature once the policy CMP0022 is set to NEW.
| | * Merge branch 'output-CMP0022-entries' into policy-CMP0022-fixesBrad King2013-11-021-1/+26
| | |\
* | | | cmTarget: Make some accessors const.Stephen Kelly2013-11-031-7/+7
|/ / /
* | | Merge topic 'constify'Brad King2013-11-011-99/+112
|\ \ \ | | | | | | | | | | | | | | | | | | | | c4373b3 cmTarget: Make GetProperty() const. cfb6661 Don't call SetProperty from GetProperty.
| * | | cmTarget: Make GetProperty() const.Stephen Kelly2013-10-311-95/+102
| | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | Don't call SetProperty from GetProperty.Stephen Kelly2013-10-301-4/+10
| | | | | | | | | | | | | | | | Memoize with the internal container directly instead.
* | | | Merge topic 'use-generator-target'Brad King2013-10-311-307/+3
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | 07f5788 Move TraceDependencies to cmGeneratorTarget. fa03777 Do not populate SourceEntries in AddSourceFile.
| * | | Move TraceDependencies to cmGeneratorTarget.Stephen Kelly2013-10-301-303/+1
| | | |
| * | | Do not populate SourceEntries in AddSourceFile.Stephen Kelly2013-10-301-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It only generates a default constructed SourceEntry for each cmSourceFile. this->Internal->SourceEntries[sf]; in cmTargetTraceDependencies::Trace has the same effect, and is called early in generation-time for each source file anyway.
* | | | Merge topic 'use-generator-target'Brad King2013-10-301-82/+19
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | 638843a Remove the Location member from cmTarget. 90ef1cf Move GenerateTargetManifest to cmGeneratorTarget. 25f1df3 Split CreateGeneratorTargets into two methods.
| * | | Remove the Location member from cmTarget.Stephen Kelly2013-10-291-12/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-70/+0
| | | |
* | | | Merge topic 'Qt-auto-generators'Brad King2013-10-281-0/+4
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9c87d9c Add automatic rcc invocation for Qt. 84218e1 Add automatic uic invocation for Qt. 94a0ca6 Record which files are skipped by automoc. 18fb758 Run the main executable created in the autogen tests. e485ba1 Rename the QtAutomoc tests to QtAutogen. 7ce65c3 Add extra checks for the AUTOMOC target property. 32771fc Update output messages for generic use. f371ab5 Rename RunAutomoc to RunAutogen. 85b3d6e Extract an SetupAutoMocTarget method. ca124a1 Rename the AutomocInfo.cmake file to be more generic. a342c9f Move some makefile definitions up away from moc-specific code. 98632ef Add the AUTOGEN_TARGETS_FOLDER and obsolete AUTOMOC_TARGETS_FOLDER. 63378ba Rename some variables to reflect broader scope. 97f1aa3 Rename method to reflect generic use. 4abb111 Rename local variable to reflect generic use. 03878c9 Move variable set to where it is used. ...
| * | | Add automatic rcc invocation for Qt.Stephen Kelly2013-10-241-0/+2
| | | | | | | | | | | | | | | | | | | | This replaces the need to invoke qt4_add_resources by allowing adding the source .qrc file directly to the target sources.
| * | | Add automatic uic invocation for Qt.Stephen Kelly2013-10-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The source files are already processed by cmQtAutomoc to look for moc includes, so extend that to also look for ui_ includes and find corresponding .ui files to process. This replaces the need to invoke qt4_wrap_ui(). As the ui files are not likely to be part of the SOURCES of the target, store the options associated with them separately in the cmMakefile for querying during the autogen run.
* | | | Merge topic 'compatible-interface-numbers'Brad King2013-10-261-33/+286
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ff6c401 cmTarget: Add interface for compatible numeric properties e4e20c1 cmTarget: Add enumeration for consistency to expect from properties. 9877769 cmTarget: Assign consistent content back to the property being evaluated. 816b4a8 cmTarget: Make consistentProperty return consistent content. 030800a cmTarget: Add a template to create correct implied content.
| * | | | cmTarget: Add interface for compatible numeric propertiesStephen Kelly2013-10-241-13/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | cmTarget: Add enumeration for consistency to expect from properties.Stephen Kelly2013-10-241-18/+57
| | | | | | | | | | | | | | | | | | | | | | | | | The type of consistency to be expected will be extended to cover numeric minimum and maximum.
| * | | | cmTarget: Assign consistent content back to the property being evaluated.Stephen Kelly2013-10-241-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, 'consistent' means the same or not set. Soon though, it will be possible to choose a minimum number from an interface for example.
| * | | | cmTarget: Make consistentProperty return consistent content.Stephen Kelly2013-10-241-6/+14
| | | | | | | | | | | | | | | | | | | | Upcoming features will make use of that.
| * | | | cmTarget: Add a template to create correct implied content.Stephen Kelly2013-10-241-0/+14
| |/ / / | | | | | | | | | | | | | | | | | | | | Otherwise, in the string case, we would get a null pointer instead of the implied empty string. That will become relevant when the comparison result is used.
* | | | Merge topic 'remove-pre-2.4-compatibility'Brad King2013-10-261-3/+1
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | 7d47c69 Drop compatibility with CMake < 2.4 c7c44fc CTestTest*: Update minimum required CMake to 2.4
| * | | | Drop compatibility with CMake < 2.4Brad King2013-10-231-3/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop all behavior activated by setting CMAKE_BACKWARDS_COMPATIBILITY to a value lower than 2.4, and generate an error when projects or the user attempt to do so. In the error suggest using a CMake 2.8.x release. Teach cmake_minimum_required to warn about projects that do not require at least CMake 2.4. They are not supported by CMake >= 3.0. Replace the documentation of CMAKE_BACKWARDS_COMPATIBILITY with a reference to policy CMP0001.
* | | | Merge topic 'fix-tll-static-private'Brad King2013-10-261-5/+10
|\ \ \ \ | |/ / / |/| / / | |/ / | | | 239b0c6 Don't add invalid content to static lib INTERFACE_LINK_LIBRARIES.
| * | Don't add invalid content to static lib INTERFACE_LINK_LIBRARIES.Stephen Kelly2013-10-261-5/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only valid target names or generator expressions may appear in the target field of a LINK_ONLY expression. Other content like link flags should still be added to that property (wrapped in config-specific generator expressions), but not wrapped in LINK_ONLY. Otherwise undue warnings would be issued for the policy CMP0022. The LINK_ONLY expression only has an effect for actual target names anyway, so there is no logical deficit.
* | | Merge topic 'output-CMP0022-entries'Brad King2013-10-231-1/+26
|\ \ \ | | |/ | |/| | | | | | | 0b3b336 CMP0022: Output link interface mismatch for static library warning
| * | CMP0022: Output link interface mismatch for static library warningStephen Kelly2013-10-231-1/+26
| |/ | | | | | | | | | | Other warnings for the same policy already have similar output since commit 81d2793e (Add differing target property content to policy CMP0022 warning, 2013-09-11).