Commit Graph

20752 Commits

Author SHA1 Message Date
Stephen Kelly 0b92602b81 Add the $<LINKED:...> generator expression.
This is both a short form of using a TARGET_DEFINED expression
together with a TARGET_PROPERTY definition, and a way to strip
non-target content from interface properties when exporting.
2013-01-31 17:34:20 +01:00
Stephen Kelly 0fa7f69c0e Add API to check if we're reading a includes or defines property.
This will allow the implementation of the LINKED generator expression.
2013-01-31 17:30:49 +01:00
Stephen Kelly 2c3654c3de Add a way to exclude INTERFACE properties from exported targets.
Projects set interface requirements upstream, and existing
downstreams use of target_link_libraries will consume those interfaces.

This can create a backward compatibility concern as the result may
be changing the order of include directories of downstreams, or another
side-effect of using the INTERFACE properties.

Provide a way for them to emulate the behavior of a version-based
policy in the config file.
2013-01-31 17:29:04 +01:00
Stephen Kelly d4297d5697 Export targets to a targets file, not a Config file. 2013-01-31 17:27:06 +01:00
Stephen Kelly df4d2b28b2 Make it an error for INSTALL_PREFIX to be evaluated.
An empty string is not likely going to produce expected results
in any evaluation context. It is replaced by preprocessing
currently.
2013-01-31 17:27:06 +01:00
Brad King 9397270d73 Fix use of cmTypeMacro in new command classes
Both commit 8a37ebec (Add the target_include_directories command,
2013-01-01) and commit fc61a7a7 (Add the target_compile_definitions
command, 2013-01-08) added command implementations deriving from the new
cmTargetPropCommandBase class.  Fix cmTypeMacro declarations of the
inheritance relationship.
2013-01-31 11:08:40 -05:00
Brad King 19f3208a06 Tests: Avoid CTestLimitDashJ crash on Borland 5.8 builds
The test added by commit e378ba5f (Add CTestLimitDashJ test, 2012-12-26)
crashes with CTest compiled by Borland 5.8.  There seems to be interaction
among the large number of internal ctest runs.  It is probably related to
the undiscovered underlying issue mentioned in commit 32478069 (CTest:
Prevent creation of unbounded number of tests in ctest, 2012-12-18) when
fixing the symptom covered by the CTestLimitDashJ test.

Add --force-new-ctest-process to avoid the crash.  Further investigation
will still be needed to identify the true problem.
2013-01-31 10:58:16 -05:00
Brad King 118c32f8f2 Merge branch 'xcode-duplicate-flags-13354' into generator-toolset 2013-01-31 09:58:50 -05:00
Brad King cf8645e82d Tests: Run ctest custom commands with VERBATIM 2013-01-31 09:58:05 -05:00
Brad King 5b2fba5d40 ExternalProject: Simplify CMake command line generation
Append the source directory to the command line option in a separate
step instead of duplicating it with each possible generator.
2013-01-31 09:58:05 -05:00
Stephen Kelly 7ceeba992b Advance more when preprocessing exported strings.
When evaluating TARGET_PROPERTY here, we can skip to the comma
location. We need to calculate it though as the string may have
just been changed.
2013-01-31 11:18:52 +01:00
Stephen Kelly 30268b46f8 Handle reading empty properties defined by the link interface.
This was segfaulting before.
2013-01-31 11:18:49 +01:00
Kitware Robot fc2638f0b4 CMake Nightly Date Stamp 2013-01-31 00:01:16 -05:00
Brad King e2e0d2e3c7 ExternalData: Collapse ../ components in DATA{} paths
Relative path components need to be normalized out even if they appear
in the middle of a caller-supplied string.
2013-01-30 14:55:12 -05:00
Brad King ee2abfdc89 ExternalData: Add support for SHA 1 and 2 hash algorithms
Update the Module.ExternalData and RunCMake.ExternalData tests to cover
some of them.
2013-01-30 10:05:07 -05:00
Brad King aa8b2288d3 ExternalData: Generalize hash algo/ext handling
Use private global variables _ExternalData_REGEX_(ALGO|EXT) to match the
possible hash algorithm names and extensions in regular expressions.
Use "file(<algo>)" instead of "cmake -E md5sum" to compute hashes
without a child process and to support more hash algorithms.
2013-01-30 10:05:07 -05:00
Brad King 9e518a8169 ExternalData: Allow DATA{} syntax to reference directories
Use a trailing slash to reference a directory.  Require that a list
of associated files be specified to select from within the directory.
One may simply use DATA{Dir/,REGEX:.*} to reference all files but
get a directory passed on the command line.
2013-01-30 10:05:07 -05:00
Brad King 175ed02207 ExternalData: Allow ()-groups in series match regex
Refactor use of the ExternalData_SERIES_MATCH value to avoid assuming
that it has no ()-groups that interfere with group indexing.

Extend the Module.ExternalData test to cover this case.
2013-01-30 10:05:07 -05:00
Brad King 4befecc77c ExternalData: Add tests covering interfaces and errors
Add a Module.ExternalData test to verify data retrieval and test
argument DATA{} references.

Add a RunCMake.ExternalData test to verify error handling and automatic
transformation of a raw data to a content link and staged object.
2013-01-30 10:04:54 -05:00
Brad King da2b0245a3 Merge topic 'fix-target-property-commands'
7bf490e Make subclasses responsible for joining content.
f6b16d4 Don't allow targets args in the new target commands.
b3a7e19 Make the Property name protected so that subclasses can use it.
2013-01-30 09:38:52 -05:00
Kitware Robot 7462a8a8c3 CMake Nightly Date Stamp 2013-01-30 00:01:21 -05:00
Brad King bcd25808ac ExternalData: Improve series matching using an explicit syntax
Automatic series recognition can generate false positives too easily
when the default series configuration is flexible enough to handle
common cases.  Avoid false positives by requiring an explicit syntax to
activate series recognition.  Choose the syntax DATA{<name>,:} to be
short, simple, and look like a vertical ellipsis.

This allows us to improve the default series match configuration.  Allow
series references to contain one of the numbered file names.  Allow '-'
as a separator in addition to '.' and '_'.  Document what the default
configuration matches.  Also provide more options to configure series
<name> parsing.
2013-01-29 15:23:00 -05:00
Brad King 2eb7cee117 Merge topic 'fix-TARGET_PROPERTY-extraction'
5daaa5c Fix TARGET_PROPERTY target extractions.
2013-01-29 14:52:34 -05:00
Brad King 7931d35193 Merge topic 'FindGTK2-lib-order'
399c3b8 FindGTK2: Fix GTK2_LIBRARIES order for static gtk libraries
2013-01-29 14:52:27 -05:00
Brad King 32b9e67057 Merge topic 'DocumentRelativePathHandling'
a7d6ebb documentation: handling of relative paths by include- and link_directories()
2013-01-29 14:52:22 -05:00
Brad King 5f78d2057f Merge topic 'fix-relocatable-include-dirs'
34d1ade Add the INSTALL_PREFIX genex.
3a17197 Generate the _IMPORT_PREFIX in the non-config export file.
2013-01-29 14:52:19 -05:00
Brad King 3e7bba3fb2 Merge topic 'fix-automoc-compile-defs'
429e369 Process COMPILE_DEFINITIONS as generator expressions in QtAutomoc.
0e10782 Move GetCompileDefinitions to cmTarget.
2013-01-29 14:52:13 -05:00
Brad King c42deac744 Merge topic 'PackageConfigHelper_UsrMove'
4cad848 configure_package_config_file(): extend documentation
37c4bc1 configure_package_config_file(): fix indentation
d477414 configure_package_config_file: force absolute paths for usr-move
2013-01-29 14:52:09 -05:00
Stephen Kelly 429e369974 Process COMPILE_DEFINITIONS as generator expressions in QtAutomoc.
Fixes #13493.
2013-01-29 14:11:49 -05:00
Stephen Kelly 0e10782ba7 Move GetCompileDefinitions to cmTarget. 2013-01-29 14:11:49 -05:00
Stephen Kelly 7bf490e9bb Make subclasses responsible for joining content.
This way we can add handling of relative/absolute paths and of
-D in compile definitions.
2013-01-29 19:34:04 +01:00
Stephen Kelly f6b16d4b06 Don't allow targets args in the new target commands. 2013-01-29 18:44:54 +01:00
Stephen Kelly b3a7e19ee4 Make the Property name protected so that subclasses can use it.
Makes subclasses more dry in upcoming patches.
2013-01-29 17:20:45 +01:00
Stephen Kelly 5daaa5c48d Fix TARGET_PROPERTY target extractions.
We need to make sure we can export targets which have content such
as $<0:$<TARGET_PROPERTY:not_a_target,INTERFACE_INCLUDE_DIRECTORIES>

That means making not finding a target non-fatal here.
2013-01-29 10:56:09 -05:00
Kitware Robot 61d641dccb CMake Nightly Date Stamp 2013-01-29 00:01:18 -05:00
Brad King c0cebcb19a ExternalData: Remove unused private interface
The 'store' action was part of an older design and is no longer needed.
Remove it.
2013-01-28 15:31:31 -05:00
Brad King 52759930bd ExternalData: Cleanup stray TODO and typo in comments
Remove an outdated TODO line left from earlier designs.
Also fix a typo.
2013-01-28 15:31:31 -05:00
Brad King 7bb8344d50 ExternalData: Do not match directory names when resolving DATA{}
Our content link and object download infrastructure supports only
blobs (files), not trees (directories).  Do not allow references
to end in a slash.
2013-01-28 15:31:02 -05:00
Rodolfo Schulz de Lima 399c3b8e54 FindGTK2: Fix GTK2_LIBRARIES order for static gtk libraries
Before this, when creating GTK2_LIBRARIES, FindGTK2 added the GTK
dependencies in wrong order into GTK2_LIBRARIES.  With dynamic libraries
this is not a major problem, but when linking to static gtk libraries,
the linker outputs a lot of undefined symbols.  Reorder the calls that
append libraries to GTK2_LIBRARIES to respect dependency order.
2013-01-28 08:48:36 -05:00
Kitware Robot e2afc40d06 CMake Nightly Date Stamp 2013-01-28 00:01:18 -05:00
Alex Neundorf a7d6ebb01b documentation: handling of relative paths by include- and link_directories()
Alex
2013-01-27 18:00:14 +01:00
Stephen Kelly 34d1ade048 Add the INSTALL_PREFIX genex. 2013-01-27 09:59:26 +01:00
Stephen Kelly 3a1719793f Generate the _IMPORT_PREFIX in the non-config export file. 2013-01-27 09:42:54 +01:00
Kitware Robot 00ba2545fa CMake Nightly Date Stamp 2013-01-27 00:01:25 -05:00
Kitware Robot f7db6d115d CMake Nightly Date Stamp 2013-01-26 00:01:18 -05:00
Brad King 48ab5050de Merge topic 'debug-ProcessorCount'
4d0e2e8 ProcessorCount test: require SystemInformation process to work
e03f83f ProcessorCount test: fix path to cmsysTestsCxx executable
2013-01-25 13:38:17 -05:00
Brad King aa6ad9c903 Merge topic 'generator-expression-lf'
6c57c31 doc: fix linebreaks in generator expression documentation
2013-01-25 13:38:13 -05:00
Brad King c29dd4fa76 Merge topic 'doc-link-interface'
f032fb9 target_link_libraries: Document that new sigs privatize old (#13876)
2013-01-25 13:38:10 -05:00
Brad King 2046de2a39 Merge topic 'compatible-interface-strings'
2fb2c32 Add the COMPATIBLE_INTERFACE_STRING property.
cd66b91 Make calculation of link-interface-dependent properties type-sensitive.
2013-01-25 13:38:06 -05:00
Kitware Robot a4eb27fbab CMake Nightly Date Stamp 2013-01-25 00:01:19 -05:00