Commit Graph

2491 Commits

Author SHA1 Message Date
Brad King 81aaad0c73 Merge topic 'cmake-syntax'
b93982f Merge branch 'dev/fix-variable-watch-crash' into cmake-syntax
c50f7ed cmListFileLexer: Modify flex output to avoid Borland warning
bf73264 Warn about unquoted arguments that look like long brackets
58e5241 Warn about arguments not separated by whitespace
e75b69f cmListFileCache: Convert CMake language parser to class
e945949 Add RunCMake.Syntax test cases for command invocation styles
0546484 cmListFileArgument: Generalize 'Quoted' bool to 'Delimeter' enum
28685ad cmListFileLexer: Split normal and legacy unquoted arguments
1eafa3e cmListFileLexer: Fix line number after backslash in string
f3155cd Add RunCMake.Syntax test to cover argument parsing
2013-08-08 13:55:32 -04:00
Brad King aaadc280c9 Merge topic 'dev/fix-variable-watch-crash'
6aa0c21 variable_watch: Add test for watching a variable multiple times
b86e37c variable_watch: Check newValue for NULL
f9bb20f variable_watch: Don't share memory for callbacks
05dad99 variable_watch: Fix a typo in the error message
00ce12a variable_watch: Prevent making extra entries in the watch map
34b397e variable_watch: Allow specifying the data to match in RemoveWatch
e43e207 variable_watch: Match client_data when finding duplicates
0d6acb1 variable_watch: Add a deleter for the client data
fc7c3b4 variable_watch: Store client data as pointers
2013-08-08 13:55:25 -04:00
Brad King d422ee362d Merge topic 'parallel-memcheck'
6f9aaad CTest: create one output file per memcheck (#14303)
2013-08-08 13:55:19 -04:00
Brad King b93982fb64 Merge branch 'dev/fix-variable-watch-crash' into cmake-syntax
Resolve conflict in Source/cmVariableWatchCommand.cxx by integrating the
changes from both sides.
2013-08-08 13:35:15 -04:00
Ben Boeckel 6aa0c21405 variable_watch: Add test for watching a variable multiple times 2013-08-08 13:31:10 -04:00
Brad King bf73264694 Warn about unquoted arguments that look like long brackets
In the future CMake will introduce Lua-style long bracket syntax.
Warn about unquoted arguments that in the future will be treated
as opening long brackets.

Teach the RunCMake.Syntax test to cover such cases and ensure that the
warning appears.
2013-08-08 13:26:28 -04:00
Brad King 58e524165d Warn about arguments not separated by whitespace
Teach the lexer to return tokens for whitespace.  Teach the parser to
tolerate the space tokens where whitespace is allowed.  Also teach the
parser to diagnose and warn about cases of quoted arguments followed
immediately by another argument.  This was accidentally allowed
previously, so we only warn.

Update the RunCMake.Syntax test case StringNoSpace expected stderr to
include the warnings.
2013-08-08 13:26:27 -04:00
Brad King e945949d14 Add RunCMake.Syntax test cases for command invocation styles
Cover commands with whitespace present in allowed combinations.
Also cover command error cases such as two on one line.
2013-08-08 13:26:27 -04:00
Brad King 1eafa3edaf cmListFileLexer: Fix line number after backslash in string
If a line inside a string ends in a backslash count the following
newline character as a line increment.  Add a test covering this case to
verify that subsequent line numbers are correct.
2013-08-08 13:26:26 -04:00
Brad King f3155cd62a Add RunCMake.Syntax test to cover argument parsing
Test basic unquoted and quoted argument parsing cases including failure
on an unterminated string and an unterminated command invocation.  Also
cover arguments not separated by any spaces, which is accidentally
allowed by the current parser.
2013-08-08 13:26:26 -04:00
Rolf Eike Beer 6f9aaad150 CTest: create one output file per memcheck (#14303)
The output file used for memory checker runs must be unique for every test run
in parallel, so simply make them unique for every test run. Simply use the test
index to avoid collisions.
2013-08-07 22:25:48 +02:00
Brad King cd345aa77d Skip CTestLimitDashJ test on Borland
The Borland-built CTest binary has trouble running many instances of
itself in parallel, making the test unreliable.  No particular recent
change appears to be the culprit and the failure is not reliably
reproducible.  Just silence the failure for now by skipping the test.
2013-08-07 10:41:06 -04:00
Stephen Kelly 370bf55415 Add the ALIAS target concept for libraries and executables.
* The ALIAS name must match a validity regex.
* Executables and libraries may be aliased.
* An ALIAS acts immutable. It can not be used as the lhs
  of target_link_libraries or other commands.
* An ALIAS can be used with add_custom_command, add_custom_target,
  and add_test in the same way regular targets can.
* The target of an ALIAS can be retrieved with the ALIASED_TARGET
  target property.
* An ALIAS does not appear in the generated buildsystem. It
  is kept separate from cmMakefile::Targets for that reason.
* A target may have multiple aliases.
* An ALIAS target may not itself have an alias.
* An IMPORTED target may not have an alias.
* An ALIAS may not be exported or imported.
2013-08-02 15:21:00 +02:00
Brad King b341bf2178 Merge topic 'INCLUDES-DESTINATION-no-config'
80e652f Export: Process generator expressions from INCLUDES DESTINATION.
4355815 cmTarget: Add NAME property
2013-08-01 08:54:15 -04:00
Stephen Kelly 80e652f5cc Export: Process generator expressions from INCLUDES DESTINATION.
Configuration sensitive expressions are not permitted.
2013-08-01 00:37:25 +02:00
Stephen Kelly c0b8682200 Allow target commands to be invoked with no items (#14325).
Code such as

 target_include_directories(foo PRIVATE ${items})

should not work or break based on whether items is defined or not.
2013-07-31 16:06:34 +02:00
Brad King e3b6ab92db Merge topic 'static_library_flags'
33e6e0b VS6: Add handling of CMAKE_*_LINKER_FLAGS_<CONFIG> variables
152dfda Add additonal tests for the linker flags
20ed496 Add documentation for the missing CMAKE_*_LINKER_FLAGS_* variables
54f7019 Add CMAKE_STATIC_LINKER_FLAGS to CMakeCommonLanguageInclude
2a43c30 Add support for CMAKE_STATIC_LINKER_FLAGS
14bbf83 Unify the way the flags of a static library are read
2013-07-31 08:49:01 -04:00
Brad King 4e3675ae91 Merge topic 'ninja_bad_cmcldeps_paths'
d12459f VS 6: Tell BuildDepends test to tolerate ninjadep failure
2013-07-31 08:48:52 -04:00
Brad King b728ec3c31 Merge topic 'install-interface-includes'
72d13ff install: Remove error condition using INCLUDES DESTINATION without EXPORT.
2013-07-31 08:48:36 -04:00
Patrick Gansterer 152dfdab11 Add additonal tests for the linker flags
Extend Tests/LinkFlags to test libraries of the type MODULE and
the content of the CMAKE_*_LINKER_FLAGS_* variables.
2013-07-31 08:41:08 -04:00
Brad King d12459f79e VS 6: Tell BuildDepends test to tolerate ninjadep failure
The VS 6 IDE does not want to recompile a particular source after
a particular header it includes is modified, even by hand.  For
now just silence the failure and document it with a comment.
2013-07-30 09:41:46 -04:00
Brad King c18117a129 Merge topic 'fix-export-includes-crash'
f868e47 Fix crash on export of target with empty INTERFACE_INCLUDE_DIRECTORIES.
2013-07-29 09:59:29 -04:00
Brad King 63728df6e5 Merge topic 'memcheck_pre_post_args'
c0756b6 Revert "CTest: fix pre and post test commands with spaces" (#13887)
2013-07-29 09:55:27 -04:00
Brad King 50c5eb508c Merge topic 'ninja_bad_cmcldeps_paths'
9275554 Ninja: Update BuildDepends test to verify cmcldeps depfiles.
6fa9d0a Ninja: Make cmcldeps depfile output more consistent with 'ninja -t msvc'
2013-07-29 09:54:48 -04:00
Brad King 3dace78c2c Merge topic 'minor-cleanups'
b8dc7fa Genex: Disallow LINKER_LANGUAGE only when used on a static library.
c8a10ba cmTarget: Fix iface libraries and languages for static libraries.
f94bdb3 cmTarget: Remove duplicates when printing traces of tll signatures
ff3d5fa Export: Fix typo of LINK_INTERFACE_LIBRARIES.
79a7a81 Docs: Document variables for default visibility values.
6f6391b Docs: Generalize and de-duplicate VISIBILITY_PREFIX docs.
d8cb47f Docs: Trim trailing whitespace in generated doc.
f10e648 Docs: Document existing target property debugging options.
4f4d69f Qt4Macros: Simplify some variable population.
a413a40 Qt4Macros: Remove undefined varible use.
b60a29e Qt4Macros: Remove unneeded generate CONDITION.
e454cba Docs: Document file(GENERATE) CONDITION as optional.
2013-07-29 09:54:34 -04:00
Stephen Kelly f868e47236 Fix crash on export of target with empty INTERFACE_INCLUDE_DIRECTORIES.
The new feature of install(TARGETS ... INCLUDES DESTINATION) introduced
in commit 650e61f8 (Add a convenient way to add the includes install
dir to the INTERFACE., 2013-01-05) introduced this crash. If the
new feature is used with a target which has no
INTERFACE_INCLUDE_DIRECTORIES, a segfault occurred.
2013-07-29 15:50:24 +02:00
Stephen Kelly 72d13ff482 install: Remove error condition using INCLUDES DESTINATION without EXPORT.
Commit 650e61f8 (Add a convenient way to add the includes install
dir to the INTERFACE., 2013-01-05) introduced an error case for
using the install(TARGETS) command with specified INCLUDES DESTINATION,
but no specified EXPORT set.

It is convenient to use a variable to set the various destinations
for different outputs (as KDE does), and some targets such as
executables are installed but not exported. This was triggering
the error case, but as it is a common case, remove the error.
2013-07-29 15:16:15 +02:00
Rolf Eike Beer c0756b6dd6 Revert "CTest: fix pre and post test commands with spaces" (#13887)
This reverts commit 6187876dea.

It was actually possible before to have paths with spaces in them, the spaces
just need to be quoted. This way spaces will work as argument separators.
2013-07-27 22:05:47 +02:00
Stephen Kelly b8dc7fad23 Genex: Disallow LINKER_LANGUAGE only when used on a static library.
For shared libraries and executables, the linker_language is
indepenedent of the linked libraries.
2013-07-26 16:58:25 +02:00
Robert Maynard 9275554496 Ninja: Update BuildDepends test to verify cmcldeps depfiles. 2013-07-26 10:12:03 -04:00
Stephen Kelly c8a10ba9ad cmTarget: Fix iface libraries and languages for static libraries. 2013-07-26 15:15:42 +02:00
Brad King dda6e93666 Merge topic 'install-interface-relative'
d777b8e Genex: Allow relative paths in INSTALL_INTERFACE.
2013-07-26 09:01:19 -04:00
Brad King c82b1cbe83 Merge topic 'install-interface-includes'
650e61f Add a convenient way to add the includes install dir to the INTERFACE.
2013-07-26 09:01:06 -04:00
Stephen Kelly ff3d5fae5d Export: Fix typo of LINK_INTERFACE_LIBRARIES.
Refer correctly to the old property, not the new one.
2013-07-26 13:10:06 +02:00
Brad King 10e54cd6c9 Merge topic 'dev/export-target-without-language'
5837f19 export: Error when exporting a target without a language
2013-07-25 08:47:49 -04:00
Brad King 17fb435b21 Merge topic 'doc-RunCMake-strips-expected'
c80a4f9 Tests/RunCMake: Document stripping of expected output
2013-07-25 08:47:17 -04:00
Ben Boeckel 5837f19690 export: Error when exporting a target without a language
First, it prevents a NULL dereference and second it reiterates that
targets without languages are not supported by CMake.

Add a RunCMake.ExportWithoutLanguage test exporting a library without a
languages.
2013-07-25 08:44:57 -04:00
Ben Boeckel c80a4f92ce Tests/RunCMake: Document stripping of expected output
Document that trailing newlines are stripped from the -stdout.txt
and -stderr.txt content before using as a regular expression.
2013-07-25 08:38:53 -04:00
Brad King 2f8dace125 Merge topic 'tll-new-signatures'
b655865 target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signature
2013-07-25 08:37:16 -04:00
Brad King 9f8fcdd2d8 Merge topic 'compile-defs-debugging'
a43e5e0 Test COMPILE_DEFINITIONS target property get/set/get round-trip
2013-07-25 08:37:13 -04:00
Stephen Kelly d777b8e716 Genex: Allow relative paths in INSTALL_INTERFACE.
These paths can be prepended with the ${_IMPORT_PREFIX} generated
in the export file.

Such relative paths were previously an error.
2013-07-25 14:31:22 +02:00
Brad King a43e5e0ad5 Test COMPILE_DEFINITIONS target property get/set/get round-trip
Teach the Preprocess test to get, set, and then get the same value for
the COMPILE_DEFINITIONS target property and verify that the value is not
changed.  This ensures the internal structured storage of the property
value can reproduce the original string value.
2013-07-24 13:25:47 -04:00
Stephen Kelly b655865bbf target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signature
Add a new signature to help populate INTERFACE_LINK_LIBRARIES and
LINK_LIBRARIES cleanly in a single call.  Add policy CMP0023 to control
whether the keyword signatures can be mixed with uses of the plain
signatures on the same target.
2013-07-24 11:52:44 -04:00
Brad King 828ddb6813 Merge topic 'framework-interface-includes'
f5ca872 Use linked frameworks as a source of include directories.
2013-07-24 11:50:49 -04:00
Stephen Kelly f5ca872e8b Use linked frameworks as a source of include directories. 2013-07-24 11:49:06 -04:00
Stephen Kelly 650e61f833 Add a convenient way to add the includes install dir to the INTERFACE.
Export the INCLUDES DESTINATION without appending to the
INTERFACE_INCLUDE_DIRECTORIES of the target itself. That way, a target
can be exported multiple times with different INCLUDES DESTINATION
without unintended cross-pollution of export sets.
2013-07-24 17:32:58 +02:00
Brad King e31c4bd9a6 Merge topic 'dev/property-append-with-empty-string'
31bd83e set_property: Do not remove a property when APPENDing nothing
2013-07-24 11:02:44 -04:00
Brad King 571d050415 Merge topic 'fix-mapped-config-genex'
10a069b Genex: Fix $<CONFIG> with IMPORTED targets and multiple locations.
2013-07-24 11:02:19 -04:00
Brad King 6077847edc Merge topic 'remove-LINK_LANGUAGE-genex'
4f6bd70 Remove the LINK_LANGUAGE generator expression.
2013-07-24 11:02:14 -04:00
Ben Boeckel 31bd83e9fc set_property: Do not remove a property when APPENDing nothing 2013-07-24 10:50:15 -04:00