Commit Graph

15431 Commits

Author SHA1 Message Date
Kitware Robot a0ce1e36b6 CMake Nightly Date Stamp 2013-12-20 00:01:24 -05:00
Stephen Kelly b51b6e97a2 Export: Skip INTERFACE libraries when generating -config files.
The properties object has just been created, so is always empty,
which means the if block is never entered. The following lines do
not have any effect because an INTERFACE library has no LOCATION.
At the end, no code is generated for INTERFACE libraries in
config-specific exported files, so skip them early.
2013-12-20 00:56:17 +01:00
Brad King 2a943d9264 Merge branch 'upstream-kwsys' into update-kwsys 2013-12-19 10:44:29 -05:00
Stephen Kelly cad5c79e6c cmTarget: Fix typo
'a ALIAS' -> 'an ALIAS'
2013-12-19 16:17:59 +01:00
Stephen Kelly 08e72a34e9 Automoc: Fix style
Insert whitespace before operators.
2013-12-19 16:17:59 +01:00
Stephen Kelly 2eda924389 Genex: Use case-sensitive comparison in PLATFORM_ID. 2013-12-19 16:17:59 +01:00
Stephen Kelly 9436353f94 Genex: Always return immediately on error. 2013-12-19 16:17:59 +01:00
Stephen Kelly 20a06d01f7 Export: Clean up comment.
Introduced in commit a4263c9f (export(): Handle multiple dependent export
sets., 2013-10-10)
2013-12-19 16:17:59 +01:00
Stephen Kelly f4d9466130 Genex: Accept arbitrary content in *_CASE and MAKE_C_IDENTIFIER. 2013-12-19 16:17:59 +01:00
Stephen Kelly d36b489401 Genex: Allow single param expressions to accept arbirary input.
Existing single-parameter expressions work due to special casing
which assumes that if there is only one parameter, and the node
accepts arbitrary content, then the result is the input.

This is true for the existing expressions matching that
pattern - namely the "1" and "TARGET_NAME" expressions. However,
the LOWER_CASE, and UPPER_CASE expressions should also accept
arbitrary content, and in their case, the result is not the input.

Refactor the cmGeneratorExpressionEvaluator to allow that extension.
Actually evaluate the "1" and "0" nodes.
2013-12-19 16:17:59 +01:00
Stephen Kelly 218ad35f96 Constify cmStrCmp. 2013-12-19 16:17:58 +01:00
Brad King eb20fab736 Merge topic 'wix-fragment-injection'
8632233 CPackWiX: allow customization of generated WiX sources
2013-12-19 10:13:47 -05:00
Brad King 0845aaddc5 Merge topic 'minor-cleanup'
e2cb3e7 Help: Note that COMPATIBLE_INTERFACE_ properties may be origin-debugged.
41e48c4 Avoid certain actions on IMPORTED targets.
2013-12-19 10:13:29 -05:00
Brad King 2e075b48e8 Merge topic 'constify'
c62cd3e Constify autogen handling.
035b690 Autogen: Split AutoRcc handling into two methods
2fcafbf cmLocalGenerator: Constify target definitions access
a54eedd Constify cmGeneratorTarget access.
9edee62 Constify handling of link targets.
ef25ba8 Constify handling of target dependencies.
2013-12-19 10:13:18 -05:00
Brad King d42e0d552c Merge topic 'remove-INTERFACE-build-targets'
97fae68 Remove INTERFACE build targets.
2013-12-19 10:12:57 -05:00
Brad King 33498bba9c Merge topic 'KateFixNinja'
c3d20c2 kate: fix ninja support
1eaf2f2 kate: remove unused function
2013-12-19 10:12:49 -05:00
Brad King a1e58db675 Merge topic 'fix-INTERFACE-mapped-config'
3b8e56a Don't search for IMPORTED_LOCATION of INTERFACE_LIBRARY (14636)
2013-12-19 10:12:42 -05:00
Alex Neundorf c3d20c2ac9 kate: fix ninja support
ninja needs to be run from the toplevel build dir,
not from the target dir, as make

Alex
2013-12-19 10:04:00 -05:00
Alex Neundorf 1eaf2f263b kate: remove unused function
Alex
2013-12-19 10:03:34 -05:00
Kitware Robot 2f0ff16418 CMake Nightly Date Stamp 2013-12-19 00:01:06 -05:00
Kitware Robot 2a384e08cc CMake Nightly Date Stamp 2013-12-18 00:01:09 -05:00
Nils Gladitz 8632233a2f CPackWiX: allow customization of generated WiX sources
Added a new variable CPACK_WIX_PATCH_FILE that users can point at an
XML patch file. Fragments defined within the patch file will be inserted
at supported insertion points (currently Component, File and Directory).
2013-12-17 14:14:42 +01:00
Kitware Robot 400ce73e0f CMake Nightly Date Stamp 2013-12-17 00:01:05 -05:00
Kitware Robot b4fdbba55a CMake Nightly Date Stamp 2013-12-16 00:01:07 -05:00
Kitware Robot 5cd2e0fc44 CMake Nightly Date Stamp 2013-12-15 00:01:08 -05:00
Kitware Robot c9ca4a7142 CMake Nightly Date Stamp 2013-12-14 00:01:09 -05:00
Kitware Robot 5e43d6d3d0 CMake Nightly Date Stamp 2013-12-13 00:01:07 -05:00
Kitware Robot edaef237bf CMake Nightly Date Stamp 2013-12-12 00:01:08 -05:00
Stephen Kelly c62cd3e2ae Constify autogen handling. 2013-12-11 15:30:12 +01:00
Stephen Kelly 035b690882 Autogen: Split AutoRcc handling into two methods
The initialize method changes the target, whereas the setup method
does not.
2013-12-11 15:30:12 +01:00
Stephen Kelly 2fcafbf613 cmLocalGenerator: Constify target definitions access 2013-12-11 15:30:12 +01:00
Stephen Kelly a54eeddaae Constify cmGeneratorTarget access. 2013-12-11 15:30:11 +01:00
Stephen Kelly 9edee62f28 Constify handling of link targets. 2013-12-11 15:30:11 +01:00
Stephen Kelly ef25ba8d06 Constify handling of target dependencies. 2013-12-11 15:30:11 +01:00
Stephen Kelly 41e48c45e8 Avoid certain actions on IMPORTED targets.
As we're iterating over IMPORTED targets now, handle them in
the loop body. The existing behavior is harmless because generally
nothing is done anyway for IMPORTED targets in these code paths,
because they do not have sources for example.
2013-12-11 14:23:09 +01:00
Kitware Robot 62b90453d7 CMake Nightly Date Stamp 2013-12-11 00:01:08 -05:00
Stephen Kelly 97fae68b81 Remove INTERFACE build targets.
Commit b04f3b9a (Create make rules for INTERFACE_LIBRARY
targets., 2013-08-21) extended the makefile generator to create
build targets for INTERFACE_LIBRARY targets. No other generators
were extended with this feature.

This conflicts with the feature of whitelisting of target properties
read from INTERFACE_LIBRARY targets. The INTERFACE_* properties
of the INTERFACE_LIBRARY may legitimately contain TARGET_PROPERTY
generator expressions for reading properties from the 'head target'.
The 'head target' would be the INTERFACE_LIBRARY itself when creating
the build rules for it, which means that non-whitelisted properties
would be read.
2013-12-10 17:58:36 +01:00
Kitware Robot a2489ce49c CMake Nightly Date Stamp 2013-12-10 00:01:08 -05:00
Stephen Kelly 3b8e56a50f Don't search for IMPORTED_LOCATION of INTERFACE_LIBRARY (14636)
The INTERFACE_LIBRARY type does not have any LOCATION at all, so
return early from GetMappedConfig. GetMappedConfig is called from
two locations, one of which already pre-checks the INTERFACE_LIBRARY
case. Remove that pre-check and handle that case inside the method
instead.
2013-12-09 20:52:52 +01:00
Brad King 5026696fcc Merge topic 'INTERFACE_AUTOUIC_OPTIONS'
77f3772 cmTarget: Require a compatible INTERFACE_AUTOUIC_OPTIONS from dependencies.
2e60b5f cmTarget: Report origin of COMPATIBLE_INTERFACE properties.
2013-12-09 10:33:30 -05:00
Brad King 1ab140ef8f Merge topic 'unicode-win32-apis'
0b9906c Windows: Use wide-character system APIs
2013-12-09 10:33:24 -05:00
Clinton Stimpson 0b9906c2fb Windows: Use wide-character system APIs
Make CMake compile with -DUNICODE.  Make it possible for the 8 bit
encoding to eventually be UTF-8 instead ANSI.
2013-12-09 10:29:43 -05:00
Kitware Robot 0ea589fdfc CMake Nightly Date Stamp 2013-12-09 00:01:09 -05:00
Stephen Kelly 77f3772784 cmTarget: Require a compatible INTERFACE_AUTOUIC_OPTIONS from dependencies.
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.
2013-12-08 07:03:29 +01:00
Stephen Kelly 2e60b5fcf7 cmTarget: Report origin of COMPATIBLE_INTERFACE properties. 2013-12-08 07:03:29 +01:00
Kitware Robot 68963b0469 CMake Nightly Date Stamp 2013-12-08 00:01:06 -05:00
Kitware Robot 6f6eec1ff6 CMake Nightly Date Stamp 2013-12-07 00:01:10 -05:00
Kitware Robot ce598cc838 CMake Nightly Date Stamp 2013-12-06 00:01:09 -05:00
Brad King 998d7c8f4a Merge topic 'minor-cleanups'
259bf09 Make the cmStrictTargetComparison operate on const cmTarget*.
8cc3cdb Help: Fix up the VISIBILITY_INLINES_HIDDEN docs.
1396ab8 Don't generate self-references for system include directories.
2013-12-05 09:25:34 -05:00
Brad King 520ead7200 Merge topic 'cleanup-build-commands'
e420124 CMakeDetermineCompilerId: Use CMAKE_VS_(DEVENV|MSBUILD|MSDEV)_COMMAND
0c55729 VS: Add CMAKE_VS_(DEVENV|MSBUILD|MSDEV)_COMMAND variables
2013-12-05 09:24:59 -05:00
Kitware Robot 7974dbb0ff CMake Nightly Date Stamp 2013-12-05 00:01:08 -05:00
Brad King 0c55729c13 VS: Add CMAKE_VS_(DEVENV|MSBUILD|MSDEV)_COMMAND variables
Since commit 5f5c92b9 (VS: Add internal APIs to find MSBuild,
devenv/VCExpress, and msdev, 2013-11-13) the VS generators have
known how to lookup the locations of their build tools directly.
Expose this information to CMake language code by defining new
variables to hold the paths to these tools.
2013-12-04 11:05:05 -05:00
Brad King a5c3f059ff Merge topic 'fix-export-segfault'
1cd1430 export(): Check targets exist at configure-time (#14608)
2013-12-04 08:33:36 -05:00
Stephen Kelly 1cd1430b1f export(): Check targets exist at configure-time (#14608)
Commit 66b290e7 (export(): Process the export() command at generate
time., 2012-10-06 ) refactored export() so that it could evaluate
strings at generate-time. This was intended for evaluating target
properties, but that commit also removed a check for target
existence at configure-time. Restore that check and add a test for
this case.
2013-12-04 08:30:26 -05:00
Stephen Kelly 259bf0918c Make the cmStrictTargetComparison operate on const cmTarget*. 2013-12-04 13:43:30 +01:00
Kitware Robot f1ec923d1a CMake Nightly Date Stamp 2013-12-04 00:01:09 -05:00
Brad King 07528f78d7 Merge topic 'filter-showincludes-in-launcher'
e5e3f3d CTest: filter /showIncludes output from ninja compile launcher
2013-12-03 09:48:09 -05:00
Brad King 8a891b1ecc Merge topic 'cmake-mt-return-value'
d384b5a cmake: Fix mt return value when hosted on posix (#14605)
2013-12-03 09:30:23 -05:00
Brad King c1612dbd23 Merge topic 'xcode-folder-dedup'
2dcb1dc Xcode: Fix duplicate target subfolders (#14133)
2013-12-03 09:30:14 -05:00
Nils Gladitz e5e3f3d4ff CTest: filter /showIncludes output from ninja compile launcher
Teach "ctest --launch" a new "--filter-prefix" option.  Set it using
the CMAKE_CL_SHOWINCLUDES_PREFIX value with the Ninja generator.
2013-12-03 09:25:53 -05:00
Stephen Kelly 1396ab8009 Don't generate self-references for system include directories.
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.
2013-12-03 11:13:42 +01:00
Kitware Robot b92dc10428 CMake Nightly Date Stamp 2013-12-03 00:01:08 -05:00
Brad King fab69a3db9 Merge topic 'use-generator-target'
02a545c Don't generate subdir convenience rules for IMPORTED targets.
2013-12-02 12:07:41 -05:00
Brad King ea8d1a9cca Merge topic 'INTERFACE_AUTOUIC_OPTIONS'
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.
2013-12-02 12:07:31 -05:00
Brad King ed1de30da0 Merge topic 'wix-components'
7b390f7 CPackWiX: add CPack component support
2013-12-02 12:07:24 -05:00
Brad King 9d51c764f7 Merge topic 'export-includes'
5838aba Export: Report error on relative include with genex.
7a3e45b Export: Prefix relative items with genexes in INSTALL_INTERFACE.
f088a32 Export: Process INSTALL_INTERFACE in INCLUDES DESTINATION.
9eedc85 Export: Process relative includes after genex evaluation.
80790f3 Export: Test existing behavior of exporting includes with genexes.
38afc82 target_include_directories: Allow relative path with genex
2013-12-02 12:06:43 -05:00
Brad King 9c56366250 Merge topic 'KateProjectGenerator2'
b54c336 kate: add some documentation
9414217 kate: insert build targets
644e012 kate: add project generator for the Kate project plugin
2013-12-02 12:06:27 -05:00
Flynn Marquardt d384b5aa7b cmake: Fix mt return value when hosted on posix (#14605)
On posix platforms return values are limited to a range from 0 to 255.
Cross compiling/linking with MSVC on linux/wine leads to a
misinterpretation of the return value 1090650113 of mt.exe.
2013-12-02 10:17:31 -05:00
Stephan Tolksdorf 2dcb1dc9ca Xcode: Fix duplicate target subfolders (#14133)
Fix logic introduced by commit eeeeca10 (XCode: Support target folders
on XCode, 2011-02-20) to avoid duplicate subfolders.  The problem was
that no slash was appended to the curr_tgt_folder string on the it !=
this->TargetGroup.end() path.
2013-12-02 09:09:22 -05:00
Kitware Robot f282a0bf83 CMake Nightly Date Stamp 2013-12-02 00:01:07 -05:00
Kitware Robot 845cdbc60e CMake Nightly Date Stamp 2013-12-01 00:01:07 -05:00
Kitware Robot b4285ac7a9 CMake Nightly Date Stamp 2013-11-30 00:01:07 -05:00
Stephen Kelly 02a545c534 Don't generate subdir convenience rules for IMPORTED targets.
This was missing from commit c34968a9 (Port some of the generator
API to cmGeneratorTarget., 2012-10-10). The generator targets
stored with the cmMakefile include IMPORTED targets, unlike the
accessor for resgular targets. Before this patch, rules would
be generated for Qt5::Core for example, which result in broken
makefiles.
2013-11-29 12:57:24 +01:00
Kitware Robot f0b3502a65 CMake Nightly Date Stamp 2013-11-29 00:01:07 -05:00
Kitware Robot 93d2322e89 CMake Nightly Date Stamp 2013-11-28 00:01:09 -05:00
Stephen Kelly 98093c45db QtAutoUic: Add INTERFACE_AUTOUIC_OPTIONS target property.
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.
2013-11-27 19:06:12 +01:00
Stephen Kelly 02542b4cc7 QtAutoUic: Handle new -include command line parameter. 2013-11-27 19:06:12 +01:00
Stephen Kelly 1242f4e569 Genex: Add {UPPER,LOWER}_CASE and MAKE_C_IDENTIFIER. 2013-11-27 19:06:12 +01:00
Stephen Kelly 754b321272 QtAutogen: Use config without prefix in map key.
This is used by IDE generators to select config-specific includes
and defines.
2013-11-27 19:06:12 +01:00
Kitware Robot d05e0aa845 CMake Nightly Date Stamp 2013-11-27 00:01:12 -05:00
Nils Gladitz 7b390f75e8 CPackWiX: add CPack component support
Creates a hierarchy of WiX features from CPack components and component groups.
Switch to the FeatureTree UI in case components have been defined.
Handles the component REQUIRE and HIDDEN options
and the component group EXPANDED option.
2013-11-26 22:15:57 +01:00
Brad King b80ef72b4d Merge topic 'ninja-compile-link-pool'
7605e37 Ninja: job pool support for compiling and linking
2013-11-26 09:52:35 -05:00
Brad King 3eca31f81a Merge topic 'autogen-depends'
1320e07 cmQtAutogen: Allow specifying depends for autogen targets.
2013-11-26 09:38:40 -05:00
Brad King 235c2d26dc Merge topic 'use-generator-target'
a60cd3d cmGeneratorTarget: Use the output directory to order cmTargets.
2013-11-26 09:38:18 -05:00
Brad King 9498344c9d Merge topic 'watcom-no-prompt'
abd2b36 Watcom: Suppress WMake interactive prompt on error
2013-11-26 09:37:52 -05:00
Brad King 3ad5f9a075 Merge topic 'update-kwsys'
2ba2c43 bootstrap: Add KWSys Encoding and FStream
f668112 Merge branch 'upstream-kwsys' into update-kwsys
704ab3d KWSys 2013-11-21 (1010d0e3)
2013-11-26 09:37:24 -05:00
Brad King 779fd10160 Merge topic 'INTERFACE_LIBRARY-property-whitelist'
5ee9e6b cmTarget: Add whitelist of properties on INTERFACE_LIBRARY.
0bfcb45 INTERFACE_LIBRARY: Avoid codepaths which set unneeded properties.
2013-11-26 09:36:58 -05:00
Brad King 48e476c3f4 Merge topic 'ninja-quoted-cmd-commands'
b6f1142 Ninja: multiple commands must be quoted
2013-11-26 09:36:04 -05:00
Brad King e1fd64837d Merge topic 'ninja-msvc-deps-for-intel'
76a8888 Ninja: deptype msvc for Intel's compiler on Windows
2013-11-26 09:35:41 -05:00
Stephen Kelly 5838aba1aa Export: Report error on relative include with genex.
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.
2013-11-26 13:01:55 +01:00
Stephen Kelly 7a3e45b9d4 Export: Prefix relative items with genexes in INSTALL_INTERFACE.
Code such as

 target_include_directories(foo INTERFACE
   $<INSTALL_INTERFACE:include$<FOO>>
 )

should be treated as a relative directory, despite the genex, after
the INSTALL_INTERFACE is stripped away.

Previously, this would generate a relative directory on export, which
would be an error on import, so no policy is needed.
2013-11-26 13:01:53 +01:00
Stephen Kelly f088a32450 Export: Process INSTALL_INTERFACE in INCLUDES DESTINATION.
Code such as

 install(TARGETS ...
   INCLUDES DESTINATION $<INSTALL_INTERFACE:include>
 )

should behave as if the INSTALL_INTERFACE wrapper were not present.
2013-11-26 13:01:50 +01:00
Stephen Kelly 9eedc850eb Export: Process relative includes after genex evaluation.
In code such as

 install(TARGETS ...
   INCLUDES DESTINATION $<FOO>include
 )

the generator expressions are evaluated at generate-time. Delay
determining whether each entry is a relative path until after
the generator expressions are evaluated. Such relative paths
are based relative to the CMAKE_INSTALL_PREFIX.
2013-11-26 13:01:29 +01:00
Stephen Kelly 38afc82e76 target_include_directories: Allow relative path with genex
Treat paths which are relative and which contain a generator
expression which is not at the beginning as relative to the
source directory.

This matches the behavior of paths which are relative but contain
no generator expression at all.

Previously this would generate a relative path with the IMPORTED
target on export(), which would be a reported as a non-existent
path on import. If used directly in the buildsystem, it would be
reported as a relative path, which is also an error. There is no
need for a policy in this case.
2013-11-26 10:30:18 +01:00
Kitware Robot b4727858c4 CMake Nightly Date Stamp 2013-11-26 00:01:08 -05:00
Stephen Kelly 1320e0768e cmQtAutogen: Allow specifying depends for autogen targets.
Test this by generating files with a custom target, which moc
requires to be present when it is run.
2013-11-25 22:41:21 +01:00
Peter Kümmel 7605e37aab Ninja: job pool support for compiling and linking
Could be tested by setting the environment
variable NINJA_STATUS=[%r]
2013-11-25 22:23:24 +01:00
Stephen Kelly a60cd3d3c6 cmGeneratorTarget: Use the output directory to order cmTargets.
The output directory must be unique, but the source directory
of an add_subdirectory call may be re-used.
2013-11-25 21:13:10 +01:00
Brad King abd2b36089 Watcom: Suppress WMake interactive prompt on error
Add the "-e" option to build.make invocations of wmake as part of
the silencing flags.  From "wmake /?":

 -e erase files after error (no prompt)

This prevents test timeouts on error.
2013-11-25 13:14:38 -05:00
Brad King f668112039 Merge branch 'upstream-kwsys' into update-kwsys 2013-11-25 11:19:42 -05:00