Commit Graph

21657 Commits

Author SHA1 Message Date
Brad King 8da09f6ee1 Merge topic 'cmake-syntax'
9040ec9 Do not warn about left paren not separated by a space
2013-08-15 10:52:45 -04:00
Brad King d4daaa54e8 Merge topic 'osx-sysroot-default'
335a127 OS X: Do not default to non-existent deployment target SDK
2013-08-15 10:52:41 -04:00
Brad King 9040ec9117 Do not warn about left paren not separated by a space
Since commit 58e52416 (Warn about arguments not separated by whitespace,
2013-02-16) we warn about arguments not separated by spaces.  Loosen the
warning to not complain about left parens not separated by spaces from
the preceding token.  This is common in code like "if(NOT(X))".

Teach the RunCMake.Syntax test to cover cases of left parens not
separated by spaces and check that no warning appears.
2013-08-15 09:00:34 -04:00
Kitware Robot b4e5ba1717 CMake Nightly Date Stamp 2013-08-15 00:01:05 -04:00
Brad King 335a1278eb OS X: Do not default to non-existent deployment target SDK
Since commit 95f78e08 (OS X: Search for SDK based on deployment target,
2013-08-02) we select the default OS X SDK path to match the deployment
target.  Fix this behavior in the case that the matching SDK does not
exist and fall back to the SDK for the current host OS X version.
2013-08-14 19:16:42 -04:00
Brad King d7c1dfb8f8 Merge topic 'fix-new-policy-versions'
07c16ee Update version introducing CMP0021, CMP0022, and CMP0023
2013-08-14 11:20:44 -04:00
Brad King 07c16eece5 Update version introducing CMP0021, CMP0022, and CMP0023
These policies will be first released in 2.8.12.
2013-08-14 09:44:00 -04:00
Brad King dd29191ad9 Merge topic 'cygwin-RunCMake-tests'
d05a9bd Cygwin: Avoid legacy warnings in RunCMake.* tests
2013-08-14 08:48:18 -04:00
Brad King 3c61aec950 Merge topic 'fix-genex-segfault'
36eef30 Genex: Fix segfault when parsing ends with parameter expectation.
2013-08-14 08:48:14 -04:00
Kitware Robot 5353165a6c CMake Nightly Date Stamp 2013-08-14 00:01:14 -04:00
Brad King d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests
Set the minimum required version of CMake high enough to avoid the
warning for CMAKE_LEGACY_CYGWIN_WIN32.  The warning appears on stderr
and breaks the expected output matching.
2013-08-13 09:50:15 -04:00
Stephen Kelly 36eef302c0 Genex: Fix segfault when parsing ends with parameter expectation.
The extendResult method expects a non-empty parameters vector, as
assured by the normal case. Avoid calling the method when the parser
finds an incomplete generator expression, but has already entered
the state of expecting to find parameters.
2013-08-13 13:58:39 +02:00
Kitware Robot b26f0e034a CMake Nightly Date Stamp 2013-08-13 00:01:05 -04:00
Kitware Robot 9ea7130630 CMake Nightly Date Stamp 2013-08-12 00:01:05 -04:00
Kitware Robot aeeda4852d CMake Nightly Date Stamp 2013-08-11 00:01:05 -04:00
Kitware Robot 4bc8b7abab CMake Nightly Date Stamp 2013-08-10 00:01:09 -04:00
Brad King 93eec2ecd1 Merge topic 'revert-COMPILER_TARGET-feature'
b33c984 Revert "Add compiler target compile options."
2013-08-09 10:52:08 -04:00
Stephen Kelly b33c9844fa Revert "Add compiler target compile options."
This reverts commit 2d9ec1dadf.
2013-08-09 14:28:43 +02:00
Kitware Robot 702f630db8 CMake Nightly Date Stamp 2013-08-09 00:01:06 -04:00
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 ec5c9af2bc Merge topic 'borland-no-CTestLimitDashJ'
cd345aa Skip CTestLimitDashJ test on Borland
2013-08-08 13:55:10 -04:00
Brad King 4408382f19 Merge topic 'wince800'
0416a0e VS11: Add support for Windows CE SDKs
8fcf0ab Add support for new Windows CE compiler
2013-08-08 13:55:07 -04:00
Brad King a4529584ab Merge topic 'update-kwsys'
09b147b Merge branch 'upstream-kwsys' into update-kwsys
ce6eac8 KWSys 2013-08-06 (deec6b8a)
2013-08-08 13:55:02 -04:00
Brad King f181f27cd1 Merge topic 'fix-lexer-include-order'
ae6a5ea Include cmMakefile.h before cm*Lexer.h to get stdint.h first
2013-08-08 13:54:58 -04:00
Brad King cedf4550be Merge topic 'cmake-gui-qt5-win'
8120e13 cmake-gui: Fix build rules for Qt5 on Windows
2013-08-08 13:54:54 -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
Ben Boeckel b86e37c84f variable_watch: Check newValue for NULL
On read access, newValue can be NULL since there is no new value, so use
the empty string instead.
2013-08-08 13:31:10 -04:00
Ben Boeckel f9bb20fe2b variable_watch: Don't share memory for callbacks
The command itself is owned by the cmMakefile class, but the
cmVariableWatch which holds a pointer to the cmVariableWatchCommand via
the client_data for the callback outlives the cmMakefile class in the Qt
GUI. This means that when the cmMakefile is destroyed, the variable
watch is still in effect, but with a stale pointer.

To fix this, each callback is now a separate entity completely and
doesn't rely on the command which spawned it at all.

An example CMakeLists.txt which demonstrates the issue (only displayed
in cmake-gui, so no tests can be written for it):

    set(var 0)
    variable_watch(var)
2013-08-08 13:31:10 -04:00
Ben Boeckel 05dad99f5a variable_watch: Fix a typo in the error message
There was no space between "callback" and the quoted command name.
2013-08-08 13:31:10 -04:00
Ben Boeckel 00ce12a334 variable_watch: Prevent making extra entries in the watch map
When removing a watch on a variable, using the operator [] on the
internal map will create an empty watch if the variable doesn't have any
existing watches. Rather than creating this empty structure in the map,
return if there isn't a watch on the variable already.
2013-08-08 13:31:09 -04:00
Ben Boeckel 34b397e8de variable_watch: Allow specifying the data to match in RemoveWatch
Now that watches are dependent on their client_data when adding, it also
makes sense to allow matching the data for removal.
2013-08-08 13:31:09 -04:00
Ben Boeckel e43e207c7b variable_watch: Match client_data when finding duplicates
If a callback has the same data as another call, we don't want to delete
the old callback. This is because if the client_data is the same, it
might get deleted causing the new client_data to be bogus. Now, AddWatch
will return true if it will use the watch, false otherwise. Callers
should check the return value to know whether client_data was adopted by
the watch or not.
2013-08-08 13:31:09 -04:00
Ben Boeckel 0d6acb1df8 variable_watch: Add a deleter for the client data
The client data is arbitrary and the callback may be called an
unspecified number of times, so the cmVariableWatch must be the one to
delete the client data in the end (if it is needed at all).
2013-08-08 13:31:09 -04:00
Ben Boeckel fc7c3b4dc8 variable_watch: Store client data as pointers
The STL containers create extra copies which makes keeping track of the
owner of the client data much messier.
2013-08-08 13:31:09 -04:00
Brad King c50f7ede20 cmListFileLexer: Modify flex output to avoid Borland warning
Remove the "yyscanner = NULL" assignment from the end of the
yylex_destroy function because Borland warns that the value is never
used.
2013-08-08 13:26:28 -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 e75b69f55b cmListFileCache: Convert CMake language parser to class
Refactor the parser implementation into a class to make
it easier to extend.
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 0546484e4b cmListFileArgument: Generalize 'Quoted' bool to 'Delimeter' enum
Replace the boolean value that indicates whether an argument is unquoted
or quoted with a generalized enumeration of possible argument types.
For now "Quoted" and "Unquoted" remain the only types.
2013-08-08 13:26:27 -04:00
Brad King 28685ade7a cmListFileLexer: Split normal and legacy unquoted arguments
Match legacy arguments separately.  Add macros to simplify and clarify
matching rules.
2013-08-08 13:26:26 -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
Kitware Robot 48539259ef CMake Nightly Date Stamp 2013-08-08 00:01:07 -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
Patrick Gansterer 0416a0e6d8 VS11: Add support for Windows CE SDKs
Allow additional generator platforms for the installed WinCE SDKs.
2013-08-07 10:28:30 -04:00