Commit Graph

21630 Commits

Author SHA1 Message Date
Brad King
1d1f1eeb6a cmTarget: Refactor GetMappedConfig to choose location property up front
Store the `IMPORTED_LOCATION` property name in a variable up front
to avoid duplicating the string literal.
2016-11-03 16:10:35 -04:00
Brad King
479932fa32 cmTarget: Add comment clarifying interface library special case 2016-11-03 16:02:49 -04:00
Brad King
925e4270fd cmTarget: Clarify comments in GetMappedConfig
Clarify comments explaining the availability of a target location
(file on disk) to distinguish this from the existence of the target.
2016-11-03 14:53:35 -04:00
Brad King
3dd99758d1 Merge topic 'remove-utf8-option'
baead1e2 Encoding: Remove option to use ANSI code page internally
2016-11-03 08:54:37 -04:00
Brad King
e106a6eafb Merge topic 'compile-features-for-language-standards'
9a8d758c Help: Document language standard meta-features
df252db1 Features: Test cycle diagnostic with language standard meta-feature
6d5fb0e0 Features: Test feature propagation with language standard meta-feature
a34b98a8 WCDH: Ignore language standard meta-features
b0996a3f Features: Add meta-features requesting awareness of a particular standard
8b6cc251 Features: Centralize per-compiler recording macros
2d23f7b2 Features: Do not record features on MSVC < 2010
2016-11-03 08:54:33 -04:00
Kitware Robot
ffe78961ad CMake Nightly Date Stamp 2016-11-03 00:01:04 -04:00
Clinton Stimpson
baead1e2a8 Encoding: Remove option to use ANSI code page internally
The switch to use UTF-8 encoding has been defaulted to on for quite some
time since commit v3.2.0-rc1~116^2 (Encoding: Switch to use UTF-8
internally by default on Windows, 2014-12-26).
2016-11-02 08:48:34 -06:00
Brad King
b0996a3fa2 Features: Add meta-features requesting awareness of a particular standard
A common use case of `target_compile_features` is simply to specify that
the compiler should be run in a mode that is aware of e.g. C++11.  Some
projects simply specify a particular C++11-only feature to request this.
Provide a first-class way to do this by naming features after the
corresponding language standard.  Record them as always available in the
corresponding standard level so that requesting them always ensures that
standard (or higher) is used.
2016-11-02 10:00:28 -04:00
Brad King
f6b93fbf3a Merge topic 'fix_compiler_arg1'
cfbf857b cmRulePlaceholderExpander: Fix CMAKE_<LANG>_COMPILER_ARG1 replacement
2016-11-02 08:35:29 -04:00
Kitware Robot
ff957bc1e1 CMake Nightly Date Stamp 2016-11-02 00:01:04 -04:00
Zack Galbreath
cfbf857b22 cmRulePlaceholderExpander: Fix CMAKE_<LANG>_COMPILER_ARG1 replacement
Refactoring in commit b29425f7 (cmLocalGenerator: Populate a container
of mappings for replacements, 2016-10-09) broke substitution of this
placeholder by storing the wrong key in the new replacement map.
Use the proper key, `CMAKE_<LANG>_COMPILER_ARG1`.
2016-11-01 10:00:24 -04:00
Brad King
505f56dc91 Merge topic 'custom-command-CROSSCOMPILING_EMULATOR'
f648b9be Tests: Check that CROSSCOMPILING_EMULATOR is not used on imported targets
e7480d67 Fix custom command target substitution with CROSSCOMPILING_EMULATOR
2016-11-01 09:14:37 -04:00
Brad King
01567fd74f Merge topic 'src-COMPILE_FLAGS-genex'
9a58517d Tests: Add case for Xcode per-config per-source COMPILE_FLAGS diagnostic
1e4bb358 Add generator expression support to per-source COMPILE_FLAGS
2016-11-01 09:14:25 -04:00
Brad King
9c6cf7fcac Merge topic 'st2-env-vars-variable'
95805d72 Sublime: Add option to specify env vars for the .sublime-project
2016-11-01 09:14:21 -04:00
Brad King
ba28e0405e Merge topic 'clang-tidy'
5214bb35 Avoid some copies
602b78aa Remove redundant c_str() calls
c58c739d Use the empty method to check for emptiness
2016-11-01 09:14:19 -04:00
Brad King
e27716bd42 Merge topic 'ninja-windows-POST_BUILD-noop'
353f6362 Ninja: Fix POST_BUILD noop on Windows
2016-11-01 09:14:12 -04:00
Kitware Robot
b9fcd348a7 CMake Nightly Date Stamp 2016-11-01 00:01:03 -04:00
Kitware Robot
098a18c476 CMake Nightly Date Stamp 2016-10-31 00:01:04 -04:00
Daniel Pfeifer
5214bb354b Avoid some copies 2016-10-30 19:50:19 +01:00
Daniel Pfeifer
602b78aa79 Remove redundant c_str() calls 2016-10-30 18:34:06 +01:00
Daniel Pfeifer
c58c739da7 Use the empty method to check for emptiness 2016-10-30 18:27:35 +01:00
Kitware Robot
6b90e2850c CMake Nightly Date Stamp 2016-10-30 00:01:08 -04:00
Kitware Robot
cc9987f1ae CMake Nightly Date Stamp 2016-10-29 00:01:03 -04:00
Brad King
353f6362ba Ninja: Fix POST_BUILD noop on Windows
Use `cd .` instead of `:` in a Windows shell.

Closes: #16393
2016-10-28 15:44:04 -04:00
Brad King
e7480d670b Fix custom command target substitution with CROSSCOMPILING_EMULATOR
In commit v3.6.0-rc1~88^2 (CustomCommandGenerator: Add support for
CROSSCOMPILING_EMULATOR, 2016-05-04) logic was introduced to substitute
a target's `CROSSCOMPILING_EMULATOR` for argv0 in a custom command.
However, it broke the case when the argv0 was a target name and now
fails to expand the target name to its location at the same time as
inserting the emulator.  Fix the latter case.

Inspired-by: Brian Maher <brian@brimworks.com>
Closes: #16288
2016-10-28 15:08:03 -04:00
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
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