25208 Commits

Author SHA1 Message Date
Brad King
05a2ca7f87 CMake 3.13.0 2018-11-20 09:31:28 -05:00
Brad King
e593161bd5 Merge branch 'backport-configure_file-canonical-deps' into release-3.13
Merge-request: !2635
2018-11-19 10:14:26 -05:00
Frank Benkstein
57701227d6 configure_file: canonicalize input and output path in dependencies
Represent the input file path internally in canonical form.  Otherwise
multiple `configure_file` calls that share the same input file but specify
it relative to different directories (e.g. via `../`) result in multiple
copies of the dependency on the rule to re-run CMake.  This causes the
Ninja generator to emit duplicate phony build statements for these
dependencies, which generates an error with `-w dupbuild=err`, which
will be default in Ninja 1.9.

Also canonicalize the output path for consistency.

Add a test case.

Fixes: #18584
2018-11-19 10:11:12 -05:00
Brad King
86e8315482 CTest: Restore inheritance of stdin by test processes
Since commit v3.11.0-rc1~117^2 (CTest: Re-implement test process
handling using libuv, 2017-12-10) we do not give the child test
processes any stdin.  Prior to that change we let the child test
processes inherit stdin from ctest itself.  Tests that run serially
might be able to use the real stdin meaningfully, so restore that
behavior and add a test case.

Fixes: #18591
2018-11-15 08:08:56 -05:00
Brad King
8d70ed5a10 CMake 3.13.0-rc3 2018-11-07 07:50:43 -05:00
Brad King
47255060e7 Merge branch 'rename-cpack-ext-generator' into release-3.13
Merge-request: !2566
2018-11-06 11:27:41 -05:00
Craig Scott
20d5e77a27 CPack: Rename Ext generator to External
Ext and External were used inconsistently in the code and the
docs. This change converts all uses of Ext to External, including
within variable names used by the generator.
2018-11-05 07:56:03 -05:00
Brad King
36280e6157 Merge branch 'custom-command-work-dir-genex' into release-3.13
Merge-request: !2559
2018-11-05 07:48:39 -05:00
Brad King
98d59417b0 add_custom_{command,target}: Fix WORKING_DIRECTORY leading genex
Since commit v3.13.0-rc1~39^2 (add_custom_{command,target}:
WORKING_DIRECTORY generator expressions, 2018-09-22) the
`WORKING_DIRECTORY` option accepts generator expressions.
Fix support for the case of a leading generator expression
by deferring conversion to an absolute path until after
evaluation of the generator expression.

Fixes: #18543
2018-11-03 08:39:45 -04:00
Brad King
a567f533db Merge branch 'server-file-monitor-check' into release-3.13
Merge-request: !2556
2018-11-01 09:02:41 -04:00
Vladimir Penev
eb52529ff4 server: Fix assertion failure on directory paths in file monitor
Fixes: #18532
2018-11-01 07:25:17 -04:00
Brad King
3065a8a793 Merge branch 'fix-custom-target-with-csharp' into release-3.13
Merge-request: !2549
2018-10-31 09:36:38 -04:00
Brad King
a56edad6d6 CSharp: Fix regression in VS project type selection for custom target
A target created by `add_custom_target` should always be a `.vcxproj`
file even if it has `.cs` sources involved in custom commands and such.
The latter case was broken by refactoring in commit v3.12.0-rc1~160^2~7
(remove TargetIsCSharpOnly() and use methods from cmGeneratorTarget,
2018-03-19).  The reason is that the `HasLanguage` method added by
commit v3.12.0-rc1~239^2~6 (cmGeneratorTarget: add HasLanguage() as
wrapper for GetLanguages(), 2018-03-19) does not check the target type
and so is not a suitable check for deciding the project file extension.

The `HasLanguage` method was an attempt at an abstraction that turns
out not to work very well.  Replace it with a dedicated `IsCSharpOnly`
method that considers the target type, sources, and non-transitive
`LINKER_LANGUAGE`.

Fixes: #18515
2018-10-31 09:13:19 -04:00
Brad King
f366228c80 Merge branch 'cuda-filter-device-link-libs' into release-3.13
Merge-request: !2536
2018-10-29 12:02:46 -04:00
Robert Maynard
3c31ec7a0a CUDA: Filter out non-static libraries during device linking
Since commit v3.12.0-rc1~278^2 (CUDA: Pass more link libraries to device
linking, 2018-03-27) we consider every link library during device
linking and use `-Xnvlink` to pass those that do not end in `.a`.
However, nvlink breaks on versioned shared library names such as
`.so.1`.  Work around this problem by not passing library paths that do
not end in `.a` or `.lib`.  nvlink would not find device symbols in them
anyway.

Fixes: #18504
2018-10-29 11:57:29 -04:00
Brad King
44cef5fd92 Merge branch 'set_directory_properties-script-mode' into release-3.13
Merge-request: !2544
2018-10-29 11:45:49 -04:00
Brad King
50572d638b set_directory_properties: Restore in script mode
Since commit v3.10.0-rc1~391^2~3 (Add directory property 'LABELS' and
CMAKE_DIRECTORY_LABELS variable, 2017-06-23) this command was
accidentally not allowed in script mode.  It was dropped because
`ctest -S` mode needs to start with CMake's normal script mode and
then replace the `set_directory_properties` implementation.  Restore
the normal `set_directory_properties` in script mode and then add
special logic to replace it in ctest.  Also add a test case.

Fixes: #18523
2018-10-29 11:37:32 -04:00
Brad King
44cc305ac1 CMake 3.13.0-rc2 2018-10-25 07:52:24 -04:00
Brad King
82db7cbed8 Merge branch 'cmake-gui-vs-open-space' into release-3.13
Merge-request: !2524
2018-10-25 07:34:57 -04:00
Brad King
e178bd46cb cmake-gui: Fix "Open Project" for VS IDE with space in path
Do not encode the path for a shell until after we check that it exists.

Fixes: #18501
2018-10-25 07:32:26 -04:00
Brad King
d81c4db489 Merge branch 'cuda-thread-flags' into release-3.13
Merge-request: !2512
2018-10-24 10:52:46 -04:00
Brad King
5d481919d4 Merge branch 'tar-warnings' into release-3.13
Merge-request: !2519
2018-10-24 10:52:37 -04:00
Brad King
95c8a03f00 cmake: Distinguish '-E tar' warnings from errors copying data
The logic added by commit v3.12.0-rc1~62^2 (cmake: Teach '-E tar' to
report errors copying data, 2018-05-16) incorrectly reports failure
in the case of ARCHIVE_WARN.  Convert this case to a warning.

Fixes: #18496
2018-10-24 10:51:11 -04:00
Brad King
cf92fd9ae9 Merge branch 'cuda-filter-device-link-items' into cuda-thread-flags 2018-10-24 10:14:32 -04:00
Robert Maynard
e768d96c74 CUDA: Filter out host link flags during device linking
Since commit v3.12.0-rc1~278^2 (CUDA: Pass more link libraries to device
linking, 2018-03-27) we consider every link item during device linking.
However, items that start in `-` may be host-specific link flags that
nvcc will not understand during device linking.  Filter such items using
a white list.

In particular, this allows `-pthread` to be used for host linking while
not polluting the device link line.

Issue: #18008
2018-10-24 09:54:25 -04:00
Brad King
f87d5f13c2 Merge branch 'vs-csharp-win32-flags' into release-3.13
Merge-request: !2516
2018-10-23 11:06:52 -04:00
Brad King
35fe47bd5d Merge branch 'vs-csharp-in-custom-target' into release-3.13
Merge-request: !2515
2018-10-23 11:06:44 -04:00
Brad King
8e56e8b283 VS: Fix CSharp support for win32res: and win32icon: flags
Add a missing `:` to these entries in the flag table.  The user
value is always required and must come after the `:`.

Fixes: #18486
2018-10-23 11:03:42 -04:00
Brad King
d004d8c59a VS: Fix crash on CSharp sources in a custom target
The target generator does not compute ClOptions for custom targets,
so we should not use them either.

Fixes: #18377, #18485
2018-10-23 10:58:42 -04:00
Brad King
de1dec7052 Merge branch 'update-kwsys' into release-3.13
Merge-request: !2506
2018-10-19 10:29:07 -04:00
Brad King
a833c24ceb Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2018-10-19 (c2f29d2e)
2018-10-19 10:03:25 -04:00
Brad King
fc675057e4 Merge branch 'revert-server-iface-sources' into release-3.13
Merge-request: !2495
2018-10-18 07:38:57 -04:00
Brad King
284a38e42f cmake-server: Revert "Support codemodel filegroups for INTERFACE_SOURCES"
Revert commit v3.13.0-rc1~144^2 (cmake-server: Support codemodel
filegroups for INTERFACE_SOURCES, 2018-08-10).  The changes activate
code paths not meant to be used with interface libraries.  Another
approach will be needed to expose this information later.

This revert has to be done by hand because the code in question has been
changed somewhat since the changes were made, and was also factored out
to another source file.

Fixes: #18463
2018-10-17 14:02:39 -04:00
Brad King
d26f5b6889 Merge branch 'backport-revert-install-code-script-genex' into release-3.13
Merge-request: !2474
2018-10-11 08:11:21 -04:00
Brad King
0f48fbaa72 install: Revert CODE,SCRIPT support for generator expressions
Revert commit v3.13.0-rc1~441^2 (install: Teach CODE,SCRIPT modes to
evaluate generator expressions, 2018-05-29).  Unfortunately it has
been found to break existing code in a real project, e.g.

    install(CODE [[
        message("$<FOOBAR>")
    ]])

Address this regression by reverting support for the 3.13 release
series.  Support can be restored later with a policy for compatibility.

Issue: #15785
Fixes: #18435
2018-10-11 07:05:55 -04:00
Brad King
bcfb245703 Merge branch 'vs-cuda-pdb' into release-3.13
Merge-request: !2473
2018-10-10 13:41:44 -04:00
Brad King
faf3d7d224 VS: Add workaround for CUDA compiler PDB location with space
CUDA Toolkit Visual Studio Integration for version 9.2 and above does
honor the `ClCompile.ProgramDataBaseFileName` field when telling `nvcc`
how to invoke `cl`.  Unfortunately it does not quote paths with spaces
correctly:

    -Xcompiler "... /Fd"C:\path\with space\foo.pdb" ..."

Work around this by converting the PDB location to a relative path.
Likely we could always do this, but for now make a minimal change
just for CUDA support.

Fixes: #18440
2018-10-10 13:29:47 -04:00
Brad King
592064e026 VS: Drop workaround for CUDA compiler PDB location on CUDA 9.2+
The workaround added by commit v3.12.0-rc1~227^2 (VS: Add workaround for
CUDA compiler PDB location, 2018-04-13) is not necessary on CUDA 9.2+
because the CUDA Toolkit Visual Studio Integration has fixed the
original bug and forwards the `ProgramDataBaseFileName` to the host
compiler itself.  Make the workaround conditional on the CUDA version.

Issue: #18440
2018-10-10 13:29:47 -04:00
Brad King
54f0ae5414 Merge branch 'string-TIMESTAMP-unset-TZ' into release-3.13
Merge-request: !2464
2018-10-09 07:33:56 -04:00
Jose Luis Blanco-Claraco
f23760ffac string(TIMESTAMP): Fix unset TZ
The logic added by commit v3.6.0-rc1~338^2 (CMake: Extend TIMESTAMP
sub-commands with new unix time format specifier, 2016-02-16) to restore
the `TZ` environment variable does not properly handle the case in which
the variable was originally not set.  Unset the variable in this case.

Fixes: #18431
2018-10-09 07:26:40 -04:00
Brad King
92ed3b38cc Merge branch 'vs-flag-map-Qspectre' into release-3.13
Merge-request: !2462
2018-10-09 06:28:57 -04:00
Brad King
bb60ed6e72 VS: Add flag table entry for -Qspectre
Add special logic to map this flag to a top-level build setting
instead of being in ClCompile.

Fixes: #18426
2018-10-08 14:03:39 -04:00
Brad King
c2356d60d8 Merge branch 'project-always-set-desc-url' into release-3.13
Merge-request: !2457
2018-10-08 11:21:48 -04:00
Craig Scott
f8a086a86b project(): Ensure DESCRIPTION and HOMEPAGE_URL variables are set
If a project() call does not have DESCRIPTION or HOMEPAGE_URL
options, it must still set the relevant variables or else those variables will
inherit values from an earlier project() call. That is inconsistent with how
VERSION is handled and is likely to be unexpected. The docs were also
ambiguous about what should happen in such cases.
2018-10-08 08:28:17 +11:00
Brad King
a9b442cdc7 Merge branch 'misc-typos' into release-3.13
Merge-request: !2440
2018-10-04 10:13:12 -04:00
luz.paz
6b4c5a0365 Fix misc. typos
Found via `codespell -q 3 -I ../cmake-whitelist.txt --skip="./Utilities"`
where the whitelist consists of

```
aci
ans
behaviour
buil
convertor
dum
earch
ect
emmited
emmitted
helpfull
iff
isnt
ith
lowercased
mose
nd
nknown
nto
objext
ot
pathes
pevents
splitted
substract
superceded
supercedes
te
tim
todays
uint
upto
whitespaces
```
2018-10-03 15:32:46 -04:00
Brad King
94652e8733 CMake 3.13.0-rc1 version update 2018-10-03 12:53:38 -04:00
Brad King
0b1b842e93 Merge topic 'ctest-num-width'
6d28884617 cmCTestRunTest: Avoid float/int conversions in number width logic

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2433
2018-10-03 11:38:46 -04:00
Brad King
3e5548784d CMake 3.12.3 2018-10-03 08:20:44 -04:00
Brad King
868ced8619 Merge topic 'update-kwsys'
0da3340b9c Merge branch 'upstream-KWSys' into update-kwsys
b6a689c6f8 KWSys 2018-10-03 (9d6873b1)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2437
2018-10-03 08:05:32 -04:00