Commit Graph

25298 Commits

Author SHA1 Message Date
Sebastian Holtermann
b5e895b5d4 Autogen: Add (CMAKE_)AUTOGEN_ORIGIN_DEPENDS support
This adds

- the variable ``CMAKE_AUTOGEN_ORIGIN_DEPENDS`` which initializes
- the target property ``AUTOGEN_ORIGIN_DEPENDS``

which controls whether or not the origin target dependencies
should be forwarded to the corresponding ``_autogen`` target.

The default value of ``CMAKE_AUTOGEN_ORIGIN_DEPENDS`` is ``ON``
which corresponds to the behavior that is in place since CMake 3.9.

Closes: #18493
2018-11-03 12:14:40 +01:00
Kitware Robot
443c574a7c CMake Nightly Date Stamp 2018-11-03 00:01:09 -04:00
Brad King
a052479a5c Merge topic 'msvc-custom-rc-mt'
bd9bfc6449 MSVC: Respect CMAKE_RC_COMPILER and CMAKE_MT in vs_link_{dll,exe}
0033676796 CUDA: Enable RC language on Windows
02f566a559 MSVC: Factor out enable_language(RC) call into helper macro
b601bb6f1c CUDA: Find CMAKE_LINKER on Windows
3eebe28ef4 cmLocalNinjaGenerator: Simplify CreateRulePlaceholderExpander

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2424
2018-11-02 07:57:06 -04:00
Brad King
9578c3f0d1 Merge topic 'check-keywords-only-if-used'
4babc9058a cmTargetPropCommandBase: check keywords after parsing
45a49ae58a cmTargetPropCommandBase: simplify code path
9f64974f5e cmTargetPropCommandBase: skip property setting if there's nothing to add
4201a11c2b Tests: add tests for empty-value keyword arguments in target_*

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2514
2018-11-02 07:55:14 -04:00
Brad King
c384fc3ca4 Merge topic 'server-file-monitor-check'
eb52529ff4 server: Fix assertion failure on directory paths in file monitor

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2556
2018-11-02 07:48:34 -04:00
Kitware Robot
fa5e5550f3 CMake Nightly Date Stamp 2018-11-02 00:01:13 -04:00
Brad King
d955b4f753 Merge topic 'fix-custom-target-with-csharp'
9040df31e2 Merge branch 'backport-fix-custom-target-with-csharp'
1acd1c2b50 CSharp: Fix regression in VS project type selection for custom target
a56edad6d6 CSharp: Fix regression in VS project type selection for custom target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2549
2018-11-01 07:36:39 -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
Kitware Robot
75b85133d8 CMake Nightly Date Stamp 2018-11-01 00:01:09 -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
Kitware Robot
69aaf0d076 CMake Nightly Date Stamp 2018-10-31 00:01:12 -04:00
Brad King
1d4b1a5853 Merge topic 'cuda_device_linking_drop_dynamic_libs'
e8cc8d22d8 Merge branch 'backport-cuda-filter-device-link-libs'
3f5bfb425a CUDA: Filter out non-static libraries during device linking
3c31ec7a0a CUDA: Filter out non-static libraries during device linking

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Daniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Merge-request: !2536
2018-10-30 11:03:03 -04:00
Brad King
87dfd53b27 Merge topic 'set_directory_properties-script-mode'
50572d638b set_directory_properties: Restore in script mode

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2544
2018-10-30 11:01:36 -04:00
Kitware Robot
9330afea04 CMake Nightly Date Stamp 2018-10-30 00:01:08 -04:00
Mateusz Zych
bd9bfc6449 MSVC: Respect CMAKE_RC_COMPILER and CMAKE_MT in vs_link_{dll,exe}
CMake commands vs_link_dll and vs_link_exe, performing linking on MSVC,
are responsible for calling resource compiler and manifest tool.

Before this commit, both of these tools were called directly, with the
expectation that they are available in the `PATH`. This has been fixed
by respecting CMake variables `CMAKE_RC_COMPILER` and `CMAKE_MT`
defining paths to these tools.

Fixes: #17804
2018-10-29 13:40:47 -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
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
bcd61da350 Merge topic 'graphviz-fix-alias'
50c4dec072 graphviz: dereference ALIAS targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2521
2018-10-29 09:56:25 -04:00
Brad King
4eb77958d2 Merge topic 'minusCparse'
379e5f93a9 Tests: Add cases for -{C,D,U} without a source tree
5873815fef cmake: distinguish '-Cpath' from '-C path' in source dir parsing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2517
2018-10-29 09:29:34 -04:00
Brad King
0f84db3af4 Merge topic 'appdef-stdstring'
b2c85cb698 cmLocalGenerator::AppendDefines: Remove const char* overloads

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2533
2018-10-29 09:27:23 -04:00
Kitware Robot
01c6f99c2d CMake Nightly Date Stamp 2018-10-29 00:01:16 -04:00
Kitware Robot
7523c1dcd9 CMake Nightly Date Stamp 2018-10-28 00:01:07 -04:00
Kitware Robot
bae85447b8 CMake Nightly Date Stamp 2018-10-27 00:01:11 -04:00
Ben Boeckel
4babc9058a cmTargetPropCommandBase: check keywords after parsing
The following was disallowed:

   add_library(iface INTERFACE)
   target_link_libraries(iface PUBLIC)

just due to the mention of the `PUBLIC` keyword. Instead, only error if
there are actually `PUBLIC` dependencies specified (and analogously for
other restrictions).

Update tests to expect this new behavior.
2018-10-26 12:09:41 -04:00
Ben Boeckel
45a49ae58a cmTargetPropCommandBase: simplify code path
The outside of the loop does the same return expression.
2018-10-26 12:08:45 -04:00
Ben Boeckel
9f64974f5e cmTargetPropCommandBase: skip property setting if there's nothing to add
Some target types don't allow setting certain properties even if there
is no value being set there. Guard against this by avoiding property
setting when there is nothing to add.
2018-10-26 12:08:16 -04:00
Mateusz Zych
3eebe28ef4 cmLocalNinjaGenerator: Simplify CreateRulePlaceholderExpander
Re-use the derived class implementation instead of duplicating it.
2018-10-26 11:31:37 -04:00
Nick Schultz
50c4dec072 graphviz: dereference ALIAS targets
Previous behavior treats ALIAS targets as external targets.
This fix de-aliases these targets to their pointed target.

Fixes: #15636
2018-10-26 11:17:49 -04:00
Paul Seyfert
5873815fef cmake: distinguish '-Cpath' from '-C path' in source dir parsing
This results in the correct source directory being picked up in calls
with

    cmake sourcedir -C settings

and in a more appropriate error message when calling

    mkdir build ; cd build ; cmake -C settings

Also fix `-D` and `-U` in the same way.
2018-10-26 09:50:00 -04:00
Brad King
6166384e3e Merge topic 'relative-rpath'
95bd6317bc RPATH: Record support for $ORIGIN on various *BSD
c9b8c79271 RPATH: Record support for $ORIGIN on Haiku and Solaris
6114d85a7d RPATH: Add option for using $ORIGIN in build tree

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2456
2018-10-26 09:31:00 -04:00
Peter Wu
6114d85a7d RPATH: Add option for using $ORIGIN in build tree
This makes binaries independent of the build directory by not embedding
the build directory via RPATH.  The tests are partially based on the
existing RuntimePath test, but with the check moved into a POST_BUILD
command such that it can be skipped when the platform lacks support.

Fixes: #18413
2018-10-26 09:25:51 -04:00
Brad King
ec4b6854c9 Merge topic 'update-kwsys'
533de8873a Merge branch 'upstream-KWSys' into update-kwsys
0bc20334bc KWSys 2018-10-25 (9e27254b)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2526
2018-10-26 09:23:42 -04:00
Vitaly Stakhovsky
b2c85cb698 cmLocalGenerator::AppendDefines: Remove const char* overloads
Accept const std::string& arguments only
2018-10-26 06:54:32 -04:00
Kitware Robot
e07f147377 CMake Nightly Date Stamp 2018-10-26 00:01:08 -04:00
Brad King
533de8873a Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2018-10-25 (9e27254b)
2018-10-25 07:53:11 -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
8cabaaf054 Merge topic 'cmake-gui-vs-open-space'
e178bd46cb cmake-gui: Fix "Open Project" for VS IDE with space in path

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2524
2018-10-25 07:34:35 -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
69275d3b6a Merge topic 'cuda-thread-flags'
2cc050b53b CUDA: Add test for device linking when host linking uses threads
83c13ca44f FindThreads: Pass -pthread to CUDA compiler through -Xcompiler
cf92fd9ae9 Merge branch 'cuda-filter-device-link-items' into cuda-thread-flags
e768d96c74 CUDA: Filter out host link flags during device linking

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kelly (KT) Thompson <kgt@lanl.gov>
Merge-request: !2512
2018-10-25 07:26:24 -04:00
Brad King
1c31eae659 Merge topic 'tar-warnings'
95c8a03f00 cmake: Distinguish '-E tar' warnings from errors copying data

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2519
2018-10-25 07:25:45 -04:00
Kitware Robot
60264705b9 CMake Nightly Date Stamp 2018-10-25 00:01:08 -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
26494d279f Merge topic 'vs-csharp-win32-flags'
8e56e8b283 VS: Fix CSharp support for win32res: and win32icon: flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2516
2018-10-24 10:41:31 -04:00
Brad King
3793bed9df Merge topic 'vs-csharp-in-custom-target'
d004d8c59a VS: Fix crash on CSharp sources in a custom target

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2515
2018-10-24 10:40:24 -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
Kitware Robot
2296ede5ad CMake Nightly Date Stamp 2018-10-24 00:01:14 -04:00