Commit Graph

14968 Commits

Author SHA1 Message Date
Kitware Robot 6ed8504ea5 CMake Nightly Date Stamp 2013-09-27 00:01:08 -04:00
Kitware Robot b89cedd112 CMake Nightly Date Stamp 2013-09-26 00:01:16 -04:00
Kitware Robot 5f8eefa301 CMake Nightly Date Stamp 2013-09-25 00:01:11 -04:00
Stephen Kelly a63fcbcb9f Always consider includes from IMPORTED targets to be SYSTEM.
Introduce a target property to control this behavior variable
to set the default value for the target property.

This does not affect try_compile runs.
2013-09-24 20:00:31 +02:00
Stephen Kelly 0ad2a1c181 Export: Never treat private link libraries as public package dependencies.
Multiple libraries in a single buildsystem can be exported to multiple
export-sets.

If a library from one export set depends on a library from
another export set, the export logic generates a check in the targets
file to verify that the target in the other export set is found. That
check is executed at downstream-find_package-time.

However, a target may depend privately on a target in another export
set. In that case, the depend used to also be listed in the required
targets in the targets file. Change the export logic to ignore the
private link entries instead.
2013-09-24 15:06:56 +02:00
Eric NOULARD e507bf28c2 CPack: Fix clang -Wdocumentation warnings 2013-09-24 14:29:24 +02:00
Kitware Robot e5538f323e CMake Nightly Date Stamp 2013-09-24 00:01:07 -04:00
Kitware Robot 475635ec0f CMake Nightly Date Stamp 2013-09-23 00:01:05 -04:00
Kitware Robot fe5e193020 CMake Nightly Date Stamp 2013-09-22 00:01:06 -04:00
Kitware Robot ee6b7a8a18 CMake Nightly Date Stamp 2013-09-21 00:01:05 -04:00
Brad King 027a0201b2 Merge branch 'test-property-genex' into generate-modern-style
Resolve conflict in Source/cmTestGenerator.cxx by taking "their" side
(test-property-genex).  It already accounts for the lower-case change in
"our" side (generate-modern-style).
2013-09-20 08:20:01 -04:00
Ben Boeckel 6a47c37ccf add_test: Mention generator expressions in old-style add_test docs
The old-style add_test() call does not support generator expressions at
all. This also applies to the properties for the test, but it is not
mentioned at all.
2013-09-20 08:18:22 -04:00
Ben Boeckel d331292c12 cmTestGenerator: Evaluate generator expressions in test properties
This is useful for cases like:

  add_test(NAME mytest COMMAND mydriver $<TARGET_FILE:myexe>)
  set_tests_properties(mytest PROPERTIES
    REQUIRED_FILES "$<TARGET_FILE:myexe>"
    WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/$<CONFIGURATION>"
    )

In this example we require the actual test executable to exist to
run the test in addition to the test driver at argv[0].  Also the
$<CONFIGURATION> expression improves over \${CTEST_CONFIGURATION_TYPE}
because the latter is not normalized for case-sensitive filesystems.
2013-09-20 08:18:22 -04:00
Brad King 6fe5c4afc0 cmTestGenerator: Separate test properties for each configuration
Move property generation from GenerateScriptConfigs to separate copies
in GenerateOldStyle and GenerateScriptForConfig.  This causes the
per-config tests generated for the add_test(NAME) signature to each get
their own test properties.  This will allow us to later change the
property values based on the test configuration.

While at it, generate lower-case CMake code (e.g. set_tests_properties).

Inspired-by: Ben Boeckel <mathstuf@gmail.com>
2013-09-20 08:18:10 -04:00
Kitware Robot 45b182180c CMake Nightly Date Stamp 2013-09-20 00:01:10 -04:00
Brad King 1bdac7d5a6 add_dependencies: Clarify direction of dependency in docs (#14424)
State explicitly that the dependencies will build before the target.
Drop wording that may imply the opposite.

Suggested-by: Rob Stewart <robert.stewart@sig.com>
2013-09-19 14:10:23 -04:00
Kitware Robot 5e2b499485 CMake Nightly Date Stamp 2013-09-19 00:01:05 -04:00
Kitware Robot 9bcf6adc38 CMake Nightly Date Stamp 2013-09-18 00:01:06 -04:00
Brad King ad3d5c59b3 cmListFileLexer: Fix leak on error before EOF
Teach cmListFileLexerDestroy to call cmListFileLexerSetToken with a NULL
token to free the token string buffer.  Without this, if an error occurs
before the token cleanup happens when EOF is reached, then the token
string buffer may leak.
2013-09-17 10:27:08 -04:00
Brad King b78bc33311 Cleanup some variable documentation names
Remove trailing whitespace after property names.
Remove duplicate CMAKE_<LANG>_LINK_EXECUTABLE definition.
Rename "[Project name]" placeholder to "<PROJECT-NAME>".
2013-09-17 09:10:58 -04:00
Brad King bbfff5233d Remove redundant cmake::GetIsPropertyDefined method
We already have cmake::IsPropertyDefined for the same reason.
2013-09-17 09:10:31 -04:00
Rolf Eike Beer 8cff5e4474 mark_as_advanced: improve documentation syntax
Only one argument is required. Also avoid using the same variable name twice in
the input list and follow the convention used elsewhere for optional arguments.
2013-09-17 08:19:29 +02:00
Kitware Robot abfd574d05 CMake Nightly Date Stamp 2013-09-17 00:01:06 -04:00
Brad King 237aaafe80 Merge topic 'fix-genex-preprocessing-incomplete'
70089d0 genex: Fix preprocessing with incomplete content (#14410).
2013-09-16 08:55:21 -04:00
Kitware Robot c1122e1ecb CMake Nightly Date Stamp 2013-09-16 00:01:06 -04:00
Kitware Robot 3cc8a78403 CMake Nightly Date Stamp 2013-09-15 00:01:05 -04:00
Kitware Robot 396dfafa59 CMake Nightly Date Stamp 2013-09-14 00:01:07 -04:00
Stephen Kelly 70089d0769 genex: Fix preprocessing with incomplete content (#14410).
Similar incomplete generator expressions are already tested
in the GeneratorExpression unit test, but those are executed
with add_custom_target. The generator expressions in the include
directories are run through the preprocessor, whereas the ones
run through add_custom_target are not.
2013-09-13 18:21:37 +02:00
Brad King b434b0510a Merge topic 'print-CMP0022-content-conflict'
271bf10 Fix CMP0022 warning when no old-style property is set
2013-09-13 11:37:53 -04:00
Stephen Kelly 271bf10263 Fix CMP0022 warning when no old-style property is set
The string could be null at this point.
2013-09-13 11:34:08 -04:00
Kitware Robot 1fef29e4c6 CMake Nightly Date Stamp 2013-09-13 00:01:06 -04:00
Stephen Kelly 693199999a VS6: Add some delimiting between error message and content. 2013-09-12 17:04:00 +02:00
Stephen Kelly d1a5f1241d cmTarget: Fix typo in comment.
compatiblity -> compatibility
2013-09-12 16:43:05 +02:00
Brad King 4c4bafdeab Merge topic 'print-CMP0022-content-conflict'
81d2793 Add differing target property content to policy CMP0022 warning
2013-09-12 08:46:44 -04:00
Brad King 00e44b6f0d Merge topic 'vs-intel-version'
cd90a0e VS: Future-proof Intel project format selection
2013-09-12 08:46:30 -04:00
Kitware Robot 85e35a3aed CMake Nightly Date Stamp 2013-09-12 00:01:09 -04:00
Stephen Kelly 81d2793e92 Add differing target property content to policy CMP0022 warning
List the contents of the INTERFACE_LINK_LIBRARIES and the old-style
property.
2013-09-11 22:28:32 +02:00
Stephen Kelly 961c0bae89 Fix comments to match the code. 2013-09-11 15:05:05 +02:00
Stephen Kelly 7cca50cb2f Remove unused include. 2013-09-11 10:07:22 +02:00
Kitware Robot 7c7cdf7073 CMake Nightly Date Stamp 2013-09-11 00:01:05 -04:00
Clinton Stimpson 81ea3637b4 cmake-gui: save and restore the geometry and window state between sessions. 2013-09-10 14:35:11 -06:00
Brad King cd90a0eadd VS: Future-proof Intel project format selection
The version of Intel Fortran that actually uses 9.10 as a project format
is very old.  Default to the latest format version (11.0) and use the
older format only when known to be necessary.

Suggested-by: Dick Munroe <munroe@csworks.com>
2013-09-10 13:44:10 -04:00
Kitware Robot b2ce2f5e48 CMake Nightly Date Stamp 2013-09-10 00:01:10 -04:00
Stephen Kelly f01dc72c58 Use one authorative source of the LINK_LIBRARIES property.
We populate and maintain a vector of structs to keep track of
backtraces already, so no need to populate the Properties container
additionally.

For completeness, it is necessary to remove the condition for
populating the vector for only valid library names and generator
expressions. That condition is now determined when evaluating the
generator expressions.
2013-09-09 21:08:34 +02:00
Robert Maynard 323f0b5acc CMake 2.8.12-rc3 2013-09-09 13:42:48 -04:00
Robert Maynard 03c3fa68ea Merge branch 'release' 2013-09-09 13:41:05 -04:00
Brad King 1e11708a56 Merge topic 'no_track_configured_files'
38571f2 cmMakefile: Do not track CMake temporary files.
2013-09-09 11:01:56 -04:00
Robert Maynard 38571f2c94 cmMakefile: Do not track CMake temporary files.
Since commit ad502502 (cmMakefile: Track configured files so we can
regenerate them, 2013-06-18) cmMakefile::ConfigureFile records the
configured file as an output file generated by CMake.  The intention is
that for make and ninja we can re-run CMake when one of the files it
generates goes missing.  However, files configured temporarily in
CMakeTmp directories by Check* modules do not live past the CMake
invocation.

We have to also track input files to the configure command.  In theory
the input to a configure command could it self be a file that is going
to be deleted later (output from a custom command or configure_file).
2013-09-09 10:58:21 -04:00
Kitware Robot 92cc653979 CMake Nightly Date Stamp 2013-09-09 00:01:03 -04:00
Kitware Robot bbfa1b2bc5 CMake Nightly Date Stamp 2013-09-08 00:01:04 -04:00
Kitware Robot 7d2adde2af CMake Nightly Date Stamp 2013-09-07 00:01:11 -04:00
Kitware Robot 8ff2b5548c CMake Nightly Date Stamp 2013-09-06 00:01:05 -04:00
Kitware Robot e5f6bf587d CMake Nightly Date Stamp 2013-09-05 00:01:12 -04:00
Kitware Robot 0fcdef5e4d CMake Nightly Date Stamp 2013-09-04 00:01:09 -04:00
Kitware Robot dccc2b84a7 CMake Nightly Date Stamp 2013-09-03 00:01:05 -04:00
Kitware Robot 5ce44295c6 CMake Nightly Date Stamp 2013-09-02 00:01:10 -04:00
Kitware Robot b91655585e CMake Nightly Date Stamp 2013-09-01 00:01:15 -04:00
Kitware Robot ce6c7366f7 CMake Nightly Date Stamp 2013-08-31 00:01:11 -04:00
Robert Maynard ab9c7e36e5 CMake 2.8.12-rc2 2013-08-30 11:52:13 -04:00
Robert Maynard 90b51230d9 Merge branch 'release' 2013-08-30 09:27:35 -04:00
Brad King 452882ebeb Merge topic 'ctest-gtm-coverage-fileoffset-bug'
782eba3 CTest: Fix GTM coverage parsing line offset bug
2013-08-30 08:10:35 -04:00
Brad King b62042dbfb Merge topic 'normalize-system-includes-check'
5e15f39 Normalize system directories from the interface target property
2013-08-30 08:09:39 -04:00
Kitware Robot b6fe422a4c CMake Nightly Date Stamp 2013-08-30 00:01:08 -04:00
Stephen Kelly cfae430133 Genex: Rename cmGeneratorExpression::NeedsParsing to NeedsEvaluation 2013-08-29 17:53:31 +02:00
Stephen Kelly 6cf55644ef Generate graphviz files at generate time, not configure time.
The feature needs access to all link libraries. In the future that
will only be possible to calculate at generate-time.

Even when the files were generated at configure time, they were
generated after user code in CMakeLists files were generated. No
policy is needed to handle manipulation of the files from CMake
code, because that was never possible.
2013-08-29 17:18:02 +02:00
Brad King 549b95f115 Merge topic 'fix-docs-whitespace'
3580b9f Fix some whitespace errors in docs.
2013-08-29 10:43:42 -04:00
Zack Galbreath 782eba3a0c CTest: Fix GTM coverage parsing line offset bug
In cmParseGTMCoverage::ReadMCovFile, initialize the lineoffset variable.
Also set lastoffset only if the function is found (thanks to Bill
Hoffman).
2013-08-29 10:43:40 -04:00
Brad King ddff7ae0ce Merge topic 'no_track_configured_files'
0264eec cmMakefile: Do not track configured files known to be temporary
2013-08-29 10:39:10 -04:00
Stephen Kelly 5e15f39886 Normalize system directories from the interface target property
The input dir being tested is normalized, so ensure that the entries
in the vector are normalized too (eg no trailing slash).
2013-08-29 10:28:52 +02:00
Kitware Robot 4e7a4a0453 CMake Nightly Date Stamp 2013-08-29 00:01:07 -04:00
Robert Maynard 0264eec9d3 cmMakefile: Do not track configured files known to be temporary
Since commit ad502502 (cmMakefile: Track configured files so we can
regenerate them, 2013-06-18) cmMakefile::ConfigureFile records the
configured file as an output file generated by CMake.  The intention is
that for make and ninja we can re-run CMake when one of the files it
generates goes missing.  However, files configured temporarily in
CMakeTmp directories by Check* modules do not live past the CMake
invocation.

Teach cmMakefile::FinalPass to stop tracking files that don't
exist after we are finished generation.
2013-08-28 12:49:53 -04:00
Stephen Kelly 5916645064 Fix some indentation problems in cmPolicies. 2013-08-28 18:06:27 +02:00
Stephen Kelly fb1294c3a9 cmTarget: Add initializer for MAP_IMPORTED_CONFIG_<CONFIG> 2013-08-28 17:41:18 +02:00
Brad King b6f6802b3d Merge topic 'fix-MAP_IMPORTED_CONFIG-evaluation'
15d98a4 Genex: Fix evaluation of MAP_IMPORTED_CONFIG_<CONFIG>
2013-08-28 09:11:04 -04:00
Brad King e478f03469 VS: Fix CMAKE_SUPPRESS_REGENERATION bad ZERO_CHECK dependency (#14378)
When CMAKE_SUPPRESS_REGENERATION tells us not to create the ZERO_CHECK
target we should not add dependencies on it from other targets either.

Reviewed-by: Mateusz Loskot <mateusz@loskot.net>
2013-08-28 08:57:12 -04:00
Stephen Kelly dcc00ece4b Genex: Add the PLATFORM_ID expression. 2013-08-28 10:23:20 +02:00
Stephen Kelly 3580b9f338 Fix some whitespace errors in docs.
Remove trailing whitespace and add additional whitespace where
necessary.
2013-08-28 10:21:15 +02:00
Stephen Kelly d4937da71b Search for the Q_GADGET macro for running automoc too. 2013-08-28 10:18:11 +02:00
Kitware Robot 150bc7da3d CMake Nightly Date Stamp 2013-08-28 00:01:05 -04:00
Stephen Kelly d26594f390 Genex: Evaluate genexes for additional make clean files.
This is necessary because custom commands and targets may create
custom files whose names are determined by generator expressions.

For example, clang should be using $<TARGET_FILE> and $<TARGET_FILE_DIR>
instead of reverse engineering the output file name:

 http://thread.gmane.org/gmane.comp.compilers.clang.scm/80523

However, that can only be done when ADDITIONAL_MAKE_CLEAN_FILES
also accepts and evaluates generator expressions.

Similarly, KDE uses the LOCATION property where $<TARGET_FILE>
would also be better in KDE4_HANDLE_RPATH_FOR_EXECUTABLE but
also appends the result to ADDITIONAL_MAKE_CLEAN_FILES.

After this patch, both can be ported to generator expressions.
2013-08-28 00:49:29 +02:00
Stephen Kelly 15d98a42fd Genex: Fix evaluation of MAP_IMPORTED_CONFIG_<CONFIG>
Commit 10a069b5 (Genex: Fix $<CONFIG> with IMPORTED targets and
multiple locations., 2013-07-15) changed the logic here to include
handling of the MAP_IMPORTED_CONFIG_<CONFIG> target property, but
it was buggy in several ways.

Uppercase the configs in all cases, and compare the mapped configs
with the parameter to the CONFIG genex, instead of with the key of
the mapping.
2013-08-27 15:36:57 +02:00
Brad King b15ad0d1de Merge topic 'fix-install-destinations'
df62f64 Clean up install rules of CMake itself (#14371)
2013-08-27 09:13:57 -04:00
Kitware Robot 9b2940875e CMake Nightly Date Stamp 2013-08-27 00:01:06 -04:00
Brad King df62f64db7 Clean up install rules of CMake itself (#14371)
Ensure CMAKE_DATA_DIR, CMAKE_DOC_DIR, and CMAKE_MAN_DIR are always
relative paths in CMake code, and set defaults accordingly.  Use the
install() command instead of install_files() and install_targets().
This is more modern and also avoids stripping of the first character
from user-specified destinations.

While at it, fix the default destinations reported in the bootstrap
help.
2013-08-26 11:54:07 -04:00
Brad King c5baca7804 Merge topic 'find-IMPORTED-targets-for-try_compile'
cc8f796 try_compile: Extract IMPORTED targets from INTERFACE_LINK_LIBRARIES
fd4fb9e try_compile: Extract IMPORTED targets from LINK_DEPENDENT_LIBRARIES
2013-08-26 11:39:08 -04:00
Stephen Kelly cc8f79670e try_compile: Extract IMPORTED targets from INTERFACE_LINK_LIBRARIES 2013-08-26 11:37:00 -04:00
Stephen Kelly fd4fb9ef04 try_compile: Extract IMPORTED targets from LINK_DEPENDENT_LIBRARIES 2013-08-26 11:36:57 -04:00
Brad King 4d5d8df0cd Merge topic 'vs2013_toolset_14369'
3064f80 VS: Generate ToolsVersion matching each VS version
2013-08-26 10:28:52 -04:00
Brad King 757de2bb78 Merge topic 'doc-CPack-typo'
807a564 CPack: Fix a typo in documentation
2013-08-26 10:28:32 -04:00
Brad King 4923c6c724 Merge topic 'rpath-on-mac'
78cd884 OSX: Allow an empty INSTALL_NAME_DIR to override MACOSX_RPATH.
2013-08-26 10:28:10 -04:00
Brad King 32ea090a70 Merge topic 'fix-OLD-CMP0021'
eef6df5 Fix OLD behavior of CMP0021.
2013-08-26 10:27:29 -04:00
Robert Maynard 3064f80d25 VS: Generate ToolsVersion matching each VS version
The MSBuild version for each Visual Studio generator isn't 4.0.  With
Visual Studo 2013 the ToolsVersion moved from being tied to the .NET
framework and now has its own version number.
2013-08-26 10:21:16 -04:00
Kitware Robot 464456646f CMake Nightly Date Stamp 2013-08-26 00:01:04 -04:00
Kitware Robot beffeb1ffe CMake Nightly Date Stamp 2013-08-25 00:01:11 -04:00
Stephen Kelly eef6df5c7d Fix OLD behavior of CMP0021.
Exclude Ninja and Xcode from the CMP0021 test

They do not behave the same as the makefile generator with
relative paths.

Don't overwrite the header file for in-source builds.
2013-08-24 15:14:56 +02:00
Kitware Robot 898d920d54 CMake Nightly Date Stamp 2013-08-24 00:01:10 -04:00
Kitware Robot b864a5396a CMake Nightly Date Stamp 2013-08-23 00:01:05 -04:00
Stephen Kelly 33055c405e Generate modern-style cmake code.
The commits 9db31162 (Remove CMake-language block-end command
arguments, 2012-08-13) and 77543bde (Convert CMake-language
commands to lower case, 2012-08-13) changed most cmake code
to use lowercase commands and no parameters in termination
commands. However, those changes excluded cmake code generated
in c++ by cmake.

Make a similar style change to code generated by cmake.
2013-08-22 12:06:58 +02:00
Kitware Robot 374af6529a CMake Nightly Date Stamp 2013-08-22 00:01:05 -04:00
Clinton Stimpson 78cd884296 OSX: Allow an empty INSTALL_NAME_DIR to override MACOSX_RPATH.
With this, projects can enable MACOSX_RPATH by default, but still have
a way to install libraries with no install name dirs into locations
such as /usr/local/lib by setting INSTALL_NAME_DIR="".
2013-08-21 21:09:51 -06:00
Kitware Robot 7324eb896e CMake Nightly Date Stamp 2013-08-21 00:01:09 -04:00
Kitware Robot d7c9d60d9f CMake Nightly Date Stamp 2013-08-20 00:01:06 -04:00
Stephen Kelly 8b2a2db073 Fix resetting the compiler on the command line (#14366).
Convert the incoming value to a path in the same way that the
already-cached value was converted before comparison.

Do the actual comparison only one time, after both values are
normalized.
2013-08-19 14:35:14 +02:00
Kitware Robot 56cf74e734 CMake Nightly Date Stamp 2013-08-19 00:01:06 -04:00
Kitware Robot 79af005cf8 CMake Nightly Date Stamp 2013-08-18 00:01:06 -04:00
Kitware Robot 10ad7e458c CMake Nightly Date Stamp 2013-08-17 00:01:07 -04:00
Kitware Robot 31719643c5 CMake Nightly Date Stamp 2013-08-16 00:01:18 -04:00
Yury G. Kudryashov 807a564e7a CPack: Fix a typo in documentation 2013-08-15 13:11:57 -04:00
Brad King 330db97e64 CMake 2.8.12-rc1 2013-08-15 10:53:16 -04:00
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 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
Rolf Eike Beer 2a7fecc409 remove unused local typedef
Fixes this warning from g++ 4.8:

CMake/Source/cmDocumentation.cxx:835:23: warning: typedef 'sdoc_t' locally defined but not used [-Wunused-local-typedefs]
         SDOC_UNKNOWN} sdoc_t;
                       ^
2013-08-14 20:28:28 +02: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 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
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
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 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 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 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
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
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
Brad King ae6a5ea5a2 Include cmMakefile.h before cm*Lexer.h to get stdint.h first
Some generated cm*Lexer.h headers define preprocessor macros normally
provided by <stdint.h>.  The latter is included indrectly by cmMakefile.h
since commit 2268c41a (Optimize custom command full-path dependency
lookup, 2013-08-06).  Adjust the order to avoid redefinition warnings.
2013-08-07 10:19:40 -04:00
Brad King 8120e13f40 cmake-gui: Fix build rules for Qt5 on Windows
Set policy CMP0020 to NEW to get WinMain from Qt.  Fix the documentation
custom command PATH for cmake-gui to find the Qt5 DLLs.
2013-08-07 09:59:33 -04:00
Brad King 7c9f0c664f Merge topic 'optimize-custom-command-dependencies'
2268c41 Optimize custom command full-path dependency lookup
eccb39d VS 6,7: Refactor local generators to avoid GetSourceFileWithOutput
2013-08-07 08:21:31 -04:00
Brad King 09b147b3a7 Merge branch 'upstream-kwsys' into update-kwsys 2013-08-07 08:18:32 -04:00
Kitware Robot 726fa61b59 CMake Nightly Date Stamp 2013-08-07 00:01:08 -04:00
Brad King a3b86cf711 Merge topic 'wince-entrypoint'
34969cf Fix setting of the entry point symbol for Windows CE (#14088)
5e0252c Improve const-correctness in cmVisualStudioGeneratorOptions
2013-08-06 16:55:22 -04:00
Brad King 1ed726a46c Merge topic 'vs-masm'
28e770c VS10: Add support for assembler code (#11536)
2013-08-06 16:55:10 -04:00
Brad King dba225db33 Merge topic 'vs-cleanup'
c90151b VS: Unify how the name of the generator is specified
3873d29 Fix detection of WinCE SDKs with 64bit verion of CMake
40a4302 VS12: Remove duplicated overload of UseFolderProperty()
b02f09d VS: Replace ArchitectureId with PlatformName
4b15dc8 VS: Set CMAKE_VS_PLATFORM_NAME for VS7 and VS71 too
60e568c VS10: Do not set the TargetMachine when detecting the compiler
dfbfe6f VS6: Hardcode id_machine_6 for compiler detection
2013-08-06 16:54:54 -04:00
Nicolas Despres 2268c41a05 Optimize custom command full-path dependency lookup
In the common case of custom command dependencies specified via full
path optimize the implementation of GetSourceFileWithOutput using a
(hash) map.  This is significantly faster than the existing linear
search.  In the non-full-path case fall back to the existing linear
suffix search.
2013-08-06 16:17:13 -04:00
Brad King eccb39d7f4 VS 6,7: Refactor local generators to avoid GetSourceFileWithOutput
Use the cmSourceFile returned by AddCustomCommandToOutput instead of
throwing out the return value and looking it up with
GetSourceFileWithOutput.
2013-08-06 10:20:03 -04:00
Brad King 87e0e6e497 Merge topic 'ALIAS-targets'
370bf55 Add the ALIAS target concept for libraries and executables.
2013-08-06 09:07:21 -04:00
Kitware Robot 0174133dfd CMake Nightly Date Stamp 2013-08-06 00:01:05 -04:00
Patrick Gansterer 34969cf15e Fix setting of the entry point symbol for Windows CE (#14088)
Set the EntryPointSymbol only when it has not been set before
and use the correct symbol depending on the usage of Unicode.
2013-08-05 21:24:00 +02:00
Patrick Gansterer 5e0252ce68 Improve const-correctness in cmVisualStudioGeneratorOptions
Add const qualifier to IsDebug(), UsingSBCS() and UsingUnicode().
2013-08-05 21:23:50 +02:00
Patrick Gansterer 28e770cf6e VS10: Add support for assembler code (#11536)
Use the masm BuildCustomizations, which are part of the Visual
Studio installation to allow compilation of asm files.
2013-08-05 16:34:10 +02:00
Patrick Gansterer c90151bd82 VS: Unify how the name of the generator is specified
Use the value of the provided argument instead of using a fixed
character buffer. This aligns VS10+VS11+VS12 with VS8+VS9.
2013-08-05 13:38:32 +02:00
Patrick Gansterer 3873d29d9e Fix detection of WinCE SDKs with 64bit verion of CMake
Use cmSystemTools::KeyWOW64_32 instead of KeyWOW64_Default to
make sure that the correct part of the registry is read.
2013-08-05 13:38:30 +02:00
Patrick Gansterer 40a4302414 VS12: Remove duplicated overload of UseFolderProperty()
cmGlobalVisualStudio11Generator generator already defines the same
function body, which makes the additional overload useless.
2013-08-05 13:38:28 +02:00
Patrick Gansterer b02f09d434 VS: Replace ArchitectureId with PlatformName
Since we do not need the information about the target architecture
we can use the PlatformName only to specify the this information.
This also removes setting of the MSVC_*_ARCHITECTURE_ID variable
which is not required, because this variable gets set by the
compiler detection code in CMAKE_DETERMINE_COMPILER_ID_CHECK().
2013-08-05 13:38:26 +02:00
Patrick Gansterer 4b15dc855d VS: Set CMAKE_VS_PLATFORM_NAME for VS7 and VS71 too
Move the code which sets CMAKE_VS_PLATFORM_NAME from
cmGlobalVisualStudio8Generator to cmGlobalVisualStudio7Generator.
2013-08-05 13:38:23 +02:00
Kitware Robot c359264948 CMake Nightly Date Stamp 2013-08-05 00:01:05 -04:00
Kitware Robot 7d680ca101 CMake Nightly Date Stamp 2013-08-04 00:01:05 -04:00
Kitware Robot c034b6e925 CMake Nightly Date Stamp 2013-08-03 00:01:09 -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 1e0539cd2c Merge topic 'vs10-include-dir-ampersand'
e7bcdf8 VS10: Escape include paths in XML project files (#14331)
2013-08-02 08:18:38 -04:00
Kitware Robot 70fccc91dd CMake Nightly Date Stamp 2013-08-02 00:01:12 -04:00
Brad King e7bcdf856e VS10: Escape include paths in XML project files (#14331)
Fix generation of the AdditionalIncludeDirectories element content to
escape for XML syntax.  We already escape content of other elements,
this one was simply missing by accident.
2013-08-01 15:00:28 -04: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
Brad King 0920587b1d Merge topic 'minor-cleanups'
7429941 Docs: Fix typo in CMAKE_DEBUG_TARGET_PROPERTIES
2013-08-01 08:53:45 -04:00
Brad King 75af0cbfe7 Merge topic 'vs-subsystem-order'
b64e8f2 VS10: Honor user-specified /SUBSYSTEM: flag (#14326)
2013-08-01 08:53:21 -04:00
Brad King a26e7d0782 Merge topic 'target-command-allow-no-items'
c0b8682 Allow target commands to be invoked with no items (#14325).
2013-08-01 08:52:35 -04:00
Kitware Robot f0f7ee0adf CMake Nightly Date Stamp 2013-08-01 00:01:09 -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 43558156d4 cmTarget: Add NAME property
In generator expression contexts, this can be used to determine the
name of the head target in the evaluation.
2013-08-01 00:36:11 +02:00
Stephen Kelly 7429941254 Docs: Fix typo in CMAKE_DEBUG_TARGET_PROPERTIES
Introduced in commit f10e6480 (Docs: Document existing target
property debugging options., 2013-07-26)
2013-07-31 17:13:46 +02:00
Brad King b64e8f22a4 VS10: Honor user-specified /SUBSYSTEM: flag (#14326)
Use the WIN32_EXECUTABLE target property only to set the SubSystem build
attribute default.  When user-specified flags are later parsed they may
then override it.
2013-07-31 10:17:17 -04: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 58c5dc37d3 Merge topic '13582_configured_file_regeneration'
8fbf39a cmMakefile: Do not track configured files known to be temporary
2013-07-31 08:48:57 -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
Brad King 6e2da4a4d3 Merge topic 'passthru'
2b473d2 Add option to use stdout/stderr of original terminal in cmake --build
2013-07-31 08:48:19 -04:00
Patrick Gansterer 33e6e0b9c2 VS6: Add handling of CMAKE_*_LINKER_FLAGS_<CONFIG> variables
Read the content of the config specific linker flags in the
Visual Studio 6 generator too.
2013-07-31 08:41:08 -04:00
Patrick Gansterer 20ed496b6d Add documentation for the missing CMAKE_*_LINKER_FLAGS_* variables
Add CMAKE_MODULE_LINKER_FLAGS_*, CMAKE_SHARED_LINKER_FLAGS_* and
CMAKE_STATIC_LINKER_FLAGS_* to cmDocumentVariables.cxx with a
similar documentation as CMAKE_EXE_LINKER_FLAGS_*.
2013-07-31 08:41:07 -04:00
Patrick Gansterer 2a43c306fe Add support for CMAKE_STATIC_LINKER_FLAGS
Add the content of this variable to the target specific linker flags
as we do with the other CMAKE_*_LINKER_FLAGS variables already.
2013-07-31 08:41:07 -04:00
Patrick Gansterer 14bbf8340a Unify the way the flags of a static library are read
Introduce cmLocalGenerator::GetStaticLibraryFlags() to have a central
function for getting the linker flags for a given target.
2013-07-31 08:41:07 -04:00
Kitware Robot 8e475470be CMake Nightly Date Stamp 2013-07-31 00:01:05 -04:00
Brad King 8fbf39a471 cmMakefile: Do not track configured files known to be temporary
Since commit ad502502 (cmMakefile: Track configured files so we can
regenerate them, 2013-06-18) cmMakefile::ConfigureFile records the
configured file as an output file generated by CMake.  The intention is
that for make and ninja we can re-run CMake when one of the files it
generates goes missing.  However, files configured temporarily in
CMakeTmp directories by Check* modules do not live past the CMake
invocation.

Teach cmMakefile::ConfigureFile to skip tracking files with "CMakeTmp"
in their path, just like cmCoreTryCompile::TryCompileCode does to
avoid adding dependencies on temporary source files.  In the future
we will need a more general filter to avoid recording as CMake
outputs any files that do not exist at the end of generation.
2013-07-30 14:43:59 -04:00
Kitware Robot 9181a4e3b6 CMake Nightly Date Stamp 2013-07-30 00:01:10 -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 3c683d788d Merge topic 'rpath-on-mac'
84698ab OS X: If necessary, use xcrun to help find otool used to query install names.
2013-07-29 09:55:15 -04:00