Commit Graph

22942 Commits

Author SHA1 Message Date
Brad King
ae44496e2b VS: Fix GenerateDebugInformation values for v140 and v141 toolsets
When VS 2015 was first released, its new v140 toolset came with a
`link.xml` file that changed the `GenerateDebugInformation` boolean
(`false` and `true`) value from earlier toolsets to an enumeration
consisting of the possible values `No`, `Debug`, and `DebugFastLink`.

We first adapted to this in commit v3.4.2~2^2 (VS: Fix VS 2015 .vcxproj
file value for GenerateDebugInformation, 2016-01-08), but that broke
older toolsets that still expected the boolean.  Then commit
v3.6.0-rc1~295^2~1 (VS: Fix VS 2015 .vcxproj debug setting for older
toolsets, 2016-02-24) added a hack to fix up the value based on the
toolset in use.  Several follow-up commits fixed this for more older
toolsets because our flag table was at the time based on the generator
in use rather than the toolset in use.

Since commit v3.8.0-rc1~396^2 (VS: Choose flag map based on the toolset
name, 2016-10-17) we use a flag table based on the toolset, so the fixup
hack should not be needed.  We had to keep it around only due to our
default value for GenerateDebugInformation (`false` or `No`) still being
based on the generator instead of the toolset.

A VS 2015 update was released that changed the v140 toolset `link.xml`
file back to using `false` and `true` for the `GenerateDebugInformation`
enumeration variants previously known as `No` and `Debug`.  In order to
know which pair to use, we need to parse the `link.xml` file for the
current toolset.

Switch back to using `false` and `true` unconditionally in our
`GenerateDebugInformation` flag table entries and default value.  With
that plus the toolset-based flag table, we now get incorrect values for
`GenerateDebugInformation` only when using a v140 toolset from an older
VS 2015 installation.  Detect this case by parsing `link.xml` and add
special logic to convert `false` and `true` to `No` and `Debug` to
satisfy the older toolset specification.

Inspired-by: Ian Hojnicki <nullref@live.com>
Fixes: #17020
2017-06-28 08:55:40 -04:00
Ian Hojnicki
27bef1609b VS: Fix GenerateDebugInformation flag map text for v141 toolsets
Update the help text to match that from v141's link.xml file.
2017-06-28 08:55:40 -04:00
Ian Hojnicki
17a397c22a VS: Split link flag table between v140 and v141 toolsets 2017-06-28 08:55:40 -04:00
Brad King
372de3f803 CMake 3.9.0-rc5 2017-06-27 10:59:58 -04:00
Brad King
fd771df773 Merge branch 'fix-crash-on-non-enabled-language-features' into release-3.9 2017-06-27 09:14:31 -04:00
Brad King
1d86103846 Merge branch 'vs-cuda-fix-flags' into release-3.9 2017-06-27 09:14:26 -04:00
Brad King
bbc1f3642c VS: Fix support for nvcc flags not in our flag table
The change in commit v3.9.0-rc4~3^2 (VS: Improve workaround for CUDA
-Xcompiler placement bug, 2017-06-21) accidentally appended to the
`AdditionalOptions` as if it were a `;`-separated list, but it is
actually a command-line string.  Append with a space instead.

While at it, fix the same problem for the `AdditionalOptions` added to
`CudaLink` by commit v3.9.0-rc3~1^2 (CUDA: When linking device code
suppress CUDA 8.0+ deprecation warnings, 2017-06-09).

Fixes: #17008
2017-06-27 09:08:50 -04:00
Brad King
e03a1b3b61 target_compile_features: Do not crash on non-enabled language
Fixes: #17011
2017-06-26 13:54:20 -04:00
Brad King
8fe54172fc CMake 3.9.0-rc4 2017-06-22 10:15:07 -04:00
Brad King
c8ee5dbc0c Merge branch 'vs-rc-flags' into release-3.9 2017-06-22 09:52:28 -04:00
Brad King
974f43338b VS: Fix support for rc /nologo flag in per-source COMPILE_FLAGS
Since commit v3.9.0-rc1~160^2 (VS: Use tool-specific flag table for
COMPILE_FLAGS parsing, 2017-05-03) we now correctly use the `rc` flag
table to process the COMPILE_FLAGS flags of `.rc` source files instead
of incorrectly using the `cl` flag table as before.  However, our `rc`
flag table is not complete.  The `/nologo` flag was working before only
by accident because the `cl` flag table entry for it happened to match.
Add the proper entry to the `rc` flag table.

Fixes: #16991
2017-06-22 09:45:42 -04:00
Brad King
3d99244477 Merge branch 'vs-cuda-fix-flags' into release-3.9 2017-06-21 14:24:23 -04:00
Brad King
3b75421515 VS: Improve workaround for CUDA -Xcompiler placement bug
In commit v3.9.0-rc1~431^2~6 (VS: Place CUDA host compiler options in
proper project file fields, 2017-03-07) we worked around a bug in the
CUDA VS integration by dropping `AdditionalCompilerOptions`.  However,
this silently drops `-Xcompiler=` options given by the user that don't
map to one of CudaCompile's dedicated settings.  Improve the workaround
to instead put the remaining `AdditionalCompilerOptions` into the
`AdditionalOptions` field behind `-Xcompiler=` ourselves.
2017-06-21 14:24:11 -04:00
Brad King
f2059585e6 VS: Fix target_compile_options for CUDA
Fix the VS generator to honor `COMPILE_OPTIONS` for CUDA.  The exclusion
added by commit v3.9.0-rc1~431^2~7 (VS: Do not pass CUDA compile options
to C compiler, 2017-03-07) was correct but we need additional logic to
pass the CUDA compile options to the CUDA compiler.  Also we should
still pass the CXX or C options to MSVC (ClCompile) when those languages
are enabled even if the link language is CUDA.
2017-06-21 14:23:46 -04:00
Michael Stürmer
51865fc67e Vs: allow CSharp targets to be linked to CXX targets
Fixes: #16755
2017-06-21 08:37:15 +02:00
Brad King
61c1848cdc Merge branch 'ipo-per-lang' into release-3.9 2017-06-14 15:10:39 -04:00
Brad King
8e32bebd8d Merge branch 'libuv-restore-fmode' into release-3.9 2017-06-14 15:10:20 -04:00
Brad King
871adefce9 cmake: Fix default file translate mode when using libuv
On Windows, libuv's one-time initialization changes the C runtime
library's  `_fmode` setting to `_O_BINARY`, thus causing files to open
as binary after that instead of the default `_O_TEXT` mode.  See
upstream libuv issue 840.  Work around the problem by performing libuv
initialization early and then restoring `_fmode`.

In particular, this currently affects server mode.  Without this fix,
the `_fmode` setting changes when the server mode initializes libuv.

Fixes: #16962
2017-06-14 12:46:03 -04:00
Brad King
ba247ccaba IPO: Consider support for each language separately
We only define `INTERPROCEDURAL_OPTIMIZATION` behavior for C, CXX, and
Fortran languages.  Do not try to enable support for other languages.
Furthermore, each language builds with a different compiler, so check
for support by CMake and the compiler for each language independently.

Fixes: #16944
2017-06-14 10:36:57 -04:00
Brad King
c52b982da6 CMake 3.9.0-rc3 2017-06-13 09:59:27 -04:00
Brad King
fb99b0b87b Merge branch 'cuda-dlink-no-deprecated-gpu' into release-3.9 2017-06-13 09:17:06 -04:00
Robert Maynard
7368ade250 CUDA: When linking device code suppress CUDA 8.0+ deprecation warnings
The CUDA compiler automatic deprecation warnings are pure noise when
doing device linking, and should be suppressed to reduce the amount of
confusion from users.
2017-06-13 09:15:19 -04:00
Brad King
43dae64597 Merge branch 'improve-msvc-feature-checks' into release-3.9 2017-06-08 09:23:05 -04:00
Brad King
f44d9bcc8f C++ feature checks: Improve exclusion of "0 Warning(s)"
Simply matching "0 Warning" may match "10 Warning(s)".  Instead remove
the entire `    0 Warning(s)` content from the MSBuild output before
searching it for warnings.

Issue: #16942
2017-06-08 09:22:09 -04:00
Brad King
010b50fda7 CMake 3.9.0-rc2 2017-06-07 13:05:16 -04:00
Brad King
b9d411eb25 Merge branch 'autogen-no-vs-per-config' into release-3.9 2017-06-07 10:01:18 -04:00
Brad King
cc1b513df1 Autogen: Do not use per-config file suffixes with VS yet
The change in commit v3.9.0-rc1~42^2~1 (Autogen: Per-config file
suffixes, 2017-05-15) broke Visual Studio builds because the generators
do not yet fully support per-config sources.  Disable the behavior on
Visual Studio generators for now.

Fixes: #16939
2017-06-07 09:41:49 -04:00
Brad King
56136e6315 Merge branch 'fix-vs2017-featuredetect' into release-3.9 2017-06-06 08:59:55 -04:00
Walter Gray
f4ce396254 C++ feature checks: Do not match "0 Warning(s)" as a warning
The change in commit v3.9.0-rc1~6^2~1 (C++ feature checks: check output
for '[Ww]arning', 2017-06-03) accidentally matches `0 Warning(s)` in the
output and always thinks a warning exists, thus failing all checks in
Visual Studio builds.

Fixes: #16942
2017-06-06 08:55:43 -04:00
Brad King
344f9ed96a CMake 3.9.0-rc1 version update 2017-06-05 10:32:40 -04:00
Brad King
c6ea3f01c3 Merge topic 'lint-function-args'
b1ec5dea Pass large types by const&, small types by value

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !927
2017-06-05 09:44:24 -04:00
Brad King
8a68a2ceb3 Merge topic 'cm_fallthrough'
8d7b3ef5 Provide and use CM_FALLTHROUGH
0068224f C++ feature checks: check output for '[Ww]arning'

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !924
2017-06-05 09:43:51 -04:00
Brad King
5875140c57 Merge topic 'display-ctest-disabled'
f59d729c ctest: Display disabled status when ctest -N is called

Acked-by: Kitware Robot <kwrobot@kitware.com>
Reviewed-by: Craig Scott <craig.scott@crascit.com>
Merge-request: !923
2017-06-05 09:41:53 -04:00
Kitware Robot
1fa165359f CMake Nightly Date Stamp 2017-06-05 00:01:03 -04:00
Kitware Robot
7ff29fb379 CMake Nightly Date Stamp 2017-06-04 00:01:04 -04:00
Daniel Pfeifer
b1ec5deaf1 Pass large types by const&, small types by value 2017-06-04 00:48:21 +02:00
Daniel Pfeifer
8d7b3ef5d4 Provide and use CM_FALLTHROUGH 2017-06-03 08:38:51 +02:00
Daniel Pfeifer
0068224fdd C++ feature checks: check output for '[Ww]arning' 2017-06-03 08:38:51 +02:00
Kitware Robot
422c67e4f7 CMake Nightly Date Stamp 2017-06-03 00:01:05 -04:00
Chuck Atkins
f59d729c7c ctest: Display disabled status when ctest -N is called 2017-06-02 12:56:31 -04:00
Brad King
78d1a2d0bb Merge topic 'string-npos-cleanup'
db2d46e2 Remove second arg: npos in substr usages
8b6f439e Access string npos without instance
389ed56f cmLocalUnixMakefileGenerator3: Remove unnecessary local variable
9fe4a9e2 cmParseBlanketJSCoverage: Pass unmodified parameter as const&

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !905
2017-06-02 09:19:37 -04:00
Brad King
0a082be800 Merge topic 'update-kwsys'
594a9fcf Merge branch 'upstream-KWSys' into update-kwsys
74ef363d KWSys 2017-06-01 (8243fefa)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !922
2017-06-02 09:18:41 -04:00
Kitware Robot
2088ca0ca0 CMake Nightly Date Stamp 2017-06-02 00:01:05 -04:00
Pavel Solodovnikov
db2d46e2dd Remove second arg: npos in substr usages 2017-06-01 14:19:52 -04:00
Pavel Solodovnikov
8b6f439ef2 Access string npos without instance 2017-06-01 14:19:51 -04:00
Brad King
389ed56f63 cmLocalUnixMakefileGenerator3: Remove unnecessary local variable 2017-06-01 14:18:54 -04:00
Brad King
9fe4a9e2ae cmParseBlanketJSCoverage: Pass unmodified parameter as const& 2017-06-01 14:18:54 -04:00
Brad King
594a9fcf6f Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2017-06-01 (8243fefa)
2017-06-01 14:07:35 -04:00
Brad King
6a42b9609f Merge topic 'ninja-mingw'
82badfff Ninja: Fix CMP0058 on MinGW
c5ff50fc Tests: Fix CustomCommandByproducts regex for phony rules

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !919
2017-06-01 14:00:58 -04:00
Brad King
75850db667 Merge topic 'update-kwsys'
5e9bd8a2 Merge branch 'upstream-KWSys' into update-kwsys
50988f6d KWSys 2017-05-31 (bd0bbad7)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !915
2017-06-01 13:34:11 -04:00