Commit Graph

14787 Commits

Author SHA1 Message Date
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
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
Kitware Robot 150bc7da3d CMake Nightly Date Stamp 2013-08-28 00:01:05 -04: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
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
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 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
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