21759 Commits

Author SHA1 Message Date
Zsolt Parragi
1e4bb35894 Add generator expression support to per-source COMPILE_FLAGS
This allows users to specify different genex-based compile flags for
each file in a target, e.g. compiling just a single file with `Od/Ox` in
release builds on Visual Studio.
2016-10-28 11:18:03 -04:00
Brad King
a316f5fd6d Merge branch 'cmake-server-handshake-improvements' into release 2016-10-28 08:27:21 -04:00
Brad King
18a966c80f Merge topic 'cmake-server-handshake-improvements'
42ccbee1 server-mode: Handle generator toolset and platform in handshake
d792491c cmake-server: Better error reporting during handshake
2016-10-28 08:26:49 -04:00
Tobias Hunger
42ccbee11c server-mode: Handle generator toolset and platform in handshake 2016-10-28 13:46:15 +02:00
Kitware Robot
891711aaff CMake Nightly Date Stamp 2016-10-28 00:01:03 -04:00
Tobias Hunger
d792491c40 cmake-server: Better error reporting during handshake
Catch more problematic input during handshake and report failure.

These were caught before when trying to configure, but it is way better
to get these reports early.
2016-10-27 14:18:42 -04:00
Bruno Pedrosa
95805d725d Sublime: Add option to specify env vars for the .sublime-project
Create a `CMAKE_SUBLIME_TEXT_2_ENV_SETTINGS` variable to control
addition of env vars in the `.sublime-project`.

Closes: #16387
2016-10-27 14:07:18 -04:00
Brad King
c6c8c24908 Merge topic 'include-what-you-use'
e81c323d Include necessary headers in commands
2016-10-27 11:17:14 -04:00
Brad King
402b133d7b Merge topic 'consoleBuf'
335a29cb Enable Unicode output to Windows consoles
2016-10-27 11:17:12 -04:00
Brad King
fe03a86eb3 Merge topic 'vs-fix-no-toolset'
0caca40f VS: Fix use of `Windows7.1SDK` 64-bit toolset with VS 2010 Express
2016-10-27 11:17:01 -04:00
Brad King
0caca40fcc VS: Fix use of Windows7.1SDK 64-bit toolset with VS 2010 Express
Refactoring in commit 584ab528 (VS: Add internal API to get platform
toolset as string, 2016-10-18) accidentally changed the semantics of the
original `cmGlobalVisualStudio10Generator::GetPlatformToolset`
implementation to return a pointer to an empty string instead of
`nullptr` when no toolset is configured.  This broke cases that tested
for `nullptr` to detect the lack of any specific toolset, such as the
call in `Find64BitTools`.  Restore the `nullptr` return in this case.
2016-10-27 10:42:36 -04:00
Kitware Robot
5448f0068c CMake Nightly Date Stamp 2016-10-27 00:01:05 -04:00
Dāvis Mosāns
335a29cb07 Enable Unicode output to Windows consoles
Use KWSys ConsoleBuf to replace the `streambuf` on `std::cout` and
`std::cerr` so that process output can be encoded correctly for display
in a Windows console.
2016-10-26 17:02:37 +03:00
Brad King
fdd0ce915c Merge topic 'vs-toolset-options'
69fc7bf8 VS: Choose flag map based on the toolset name
e2ed9a70 VS: Move toolset flag table lookup to global generator
584ab528 VS: Add internal API to get platform toolset as string
2016-10-26 09:28:19 -04:00
Brad King
fa15858a7e Merge topic 'update-kwsys'
51cfba8c Merge branch 'upstream-KWSys' into update-kwsys
53862f04 KWSys 2016-10-23 (b630d2f5)
2016-10-26 09:28:16 -04:00
Daniel Pfeifer
e81c323da9 Include necessary headers in commands 2016-10-26 09:02:44 +02:00
Kitware Robot
9d203c0051 CMake Nightly Date Stamp 2016-10-26 00:01:03 -04:00
Don Olmstead
69fc7bf87d VS: Choose flag map based on the toolset name
MSBuild interprets the `.vcxproj` content based on the `PlatformToolset`
setting, so our reverse mapping needs to be based on that setting too.
For VS 2010 and above, choose the flag map to match the toolset name
rather than the generator VS version.

Issue: #16153
2016-10-25 09:46:21 -04:00
Brad King
584ab5285b VS: Add internal API to get platform toolset as string 2016-10-25 09:19:49 -04:00
Don Olmstead
e2ed9a7092 VS: Move toolset flag table lookup to global generator
Move `Get*FlagTable` methods to the global generator and have each VS
generator version pre-populate its default flag table.
2016-10-25 09:19:49 -04:00
Brad King
51cfba8c21 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2016-10-23 (b630d2f5)
2016-10-25 09:13:48 -04:00
Brad King
c9108c7b81 Merge topic 'cm_unordered_set'
c15dc197 Introduce CM_UNORDERED_SET
2016-10-25 09:09:09 -04:00
Brad King
bdc88646c1 Merge topic 'remove-cmobject'
15aa814b Remove cmObject.h and cmTypeMacro.h
2016-10-25 09:09:04 -04:00
Brad King
3062b8a046 Merge topic 'st2-fix-regex'
9f1429e2 Sublime: Update generated diagnostic matching expression for MSVC
2016-10-25 09:08:58 -04:00
Brad King
9430125511 Merge topic 'ninja-subdir-binary-dir'
87cc9bfc Merge branch 'backport-ninja-subdir-binary-dir' into ninja-subdir-binary-dir
e983bd32 Ninja: Use binary dir for `$subdir/all` targets
42db2ebc Ninja: Use binary dir for `$subdir/all` targets
2016-10-25 09:08:51 -04:00
Brad King
9a399c27a8 Merge topic 'cmake-server-message-quoting'
9b8dc79c cmake-server: Change message wrapper to avoid ambiguity with content
2016-10-25 09:08:49 -04:00
Kitware Robot
c1a520513d CMake Nightly Date Stamp 2016-10-25 00:01:04 -04:00
Daniel Pfeifer
c15dc19728 Introduce CM_UNORDERED_SET
Avoid duplicating switch among std::unordered_set, cmsys::hash_set, and
std::set.
2016-10-24 22:34:52 +02:00
Daniel Pfeifer
15aa814b85 Remove cmObject.h and cmTypeMacro.h 2016-10-24 21:49:28 +02:00
Brad King
4ec0329bf1 Merge branch 'cmake-server-message-quoting' into release 2016-10-24 14:36:50 -04:00
Brad King
9b8dc79cc8 cmake-server: Change message wrapper to avoid ambiguity with content
Change our message wrapper from

    [== CMake Server ==[ ... ]== CMake Server ==]

to

    [== "CMake Server" ==[ ... ]== "CMake Server" ==]

to guarantee that no JSON content can ever contain the ending string
(because it would be encoded as `]== \"CMake Server\" ==]`).
2016-10-24 14:36:13 -04:00
Bruno Pedrosa
9f1429e274 Sublime: Update generated diagnostic matching expression for MSVC
Update the generated `file_regex` to match MSVC-style messages in
addition to the GCC-style messages already matched.  Use non-capturing
sub-patterns to tolerate the differences in message formats while still
capturing the four pieces of information in proper group numbers (file
name, line number, column number, message).

Closes: #16375
2016-10-24 14:02:52 -04:00
Alexis Murzeau
e983bd326a Ninja: Use binary dir for $subdir/all targets
The targets added by commit v3.6.0-rc1~240^2~2 (Ninja: Add `$subdir/all`
targets, 2016-03-11) use as `$subdir` the relative path from the top of
the source tree to the current source directory.  This is not correct
when using `add_subdirectory(test test_bin)`.  Instead we need to use
the relative path from the top of the binary tree to the current binary
directory as was done for related targets by commit v3.7.0-rc1~268^2
(Ninja: Add `$subdir/{test,install,package}` targets, 2016-08-05).
2016-10-24 10:30:02 -04:00
Daniel Pfeifer
c401f95888 Remove cmCommand::Enabled and all related accessors
Enabled is never set to false.  Remove the member variable and all
related getters and setters.
2016-10-24 10:19:09 -04:00
Brad King
c1b96fddf8 Merge topic 'remove-cmobject-uses'
2214011f Make cmCPackGenerator not inherit from cmObject
7f9a8d53 Make cmCPackGeneratorFactory not inherit from cmObject
fb0b087c Make cmCTestGenericHandler not inherit from cmObject
2169b0fa Make cmCPackLog not inherit from cmObject
9855ebf1 Make cmCommand not inherit from cmObject
2016-10-24 10:16:43 -04:00
Brad King
b899c0a92f Merge topic 'separate-compilation'
569509f4 Fix newly discovered clang-tidy issues
6c9b3b5c cmCommand: implement functions in cxx file
8483dab8 bootstrap: Sort source files lexicographically
4fb70919 Create all commands from a single function
608afd4f Separate compilation for commands included in cmBootstrapCommands2
64f9c282 Separate compilation for commands included in cmBootstrapCommands1
f69e768d Separate compilation for commands included in cmCommands
2016-10-24 10:16:40 -04:00
Brad King
1ae2c232b6 Merge topic 'cm_unordered_map'
1a74e719 Introduce CM_UNORDERED_MAP
2016-10-24 10:16:33 -04:00
Daniel Pfeifer
1a74e71906 Introduce CM_UNORDERED_MAP
Avoid duplicating switch among std::unordered_map, cmsys::hash_map, and
std::map.
2016-10-24 09:58:52 -04:00
Alexis Murzeau
42db2ebc75 Ninja: Use binary dir for $subdir/all targets
The targets added by commit v3.6.0-rc1~240^2~2 (Ninja: Add `$subdir/all`
targets, 2016-03-11) use as `$subdir` the relative path from the top of
the source tree to the current source directory.  This is not correct
when using `add_subdirectory(test test_bin)`.  Instead we need to use
the relative path from the top of the binary tree to the current binary
directory as was done for related targets by commit v3.7.0-rc1~268^2
(Ninja: Add `$subdir/{test,install,package}` targets, 2016-08-05).
2016-10-24 09:49:23 -04:00
Kitware Robot
9a901dc78d CMake Nightly Date Stamp 2016-10-24 00:01:13 -04:00
Kitware Robot
aae5a9feb1 CMake Nightly Date Stamp 2016-10-23 00:01:03 -04:00
Daniel Pfeifer
2214011f7b Make cmCPackGenerator not inherit from cmObject 2016-10-23 01:12:26 +02:00
Daniel Pfeifer
7f9a8d53aa Make cmCPackGeneratorFactory not inherit from cmObject 2016-10-23 01:01:34 +02:00
Daniel Pfeifer
fb0b087c4d Make cmCTestGenericHandler not inherit from cmObject 2016-10-23 00:59:55 +02:00
Daniel Pfeifer
2169b0faa4 Make cmCPackLog not inherit from cmObject 2016-10-23 00:48:09 +02:00
Daniel Pfeifer
9855ebf11a Make cmCommand not inherit from cmObject 2016-10-23 00:45:08 +02:00
Kitware Robot
af782d0213 CMake Nightly Date Stamp 2016-10-22 00:01:04 -04:00
Daniel Pfeifer
569509f4bf Fix newly discovered clang-tidy issues
Clang-tidy reports some issues only from the currently compiled source
file and its associated header file.  Separating the compilation of
commands exposed some clang-tidy issues that were not reported previously.
Fix them.
2016-10-21 21:32:43 +02:00
Daniel Pfeifer
6c9b3b5c03 cmCommand: implement functions in cxx file 2016-10-21 18:14:51 +02:00
Daniel Pfeifer
4fb70919a5 Create all commands from a single function 2016-10-21 18:14:51 +02:00