Commit Graph

28847 Commits

Author SHA1 Message Date
Raul Tambre
5df21adf46 CUDA: Add support for Clang compiler
When crosscompiling we pass the sysroot.

We need to try various architecture flags. Clang doesn't automatically
select one that works.  First try the ones that are more likely to work
for modern installations:

* <=sm_50 is deprecated since CUDA 10.2, try sm_52 first for
          future compatibility.
* <=sm_20 is removed since CUDA 9.0, try sm_30.

Otherwise fallback to Clang's current default. Currently that's `sm_20`,
the lowest it supports.

Separable compilation isn't supported yet.

Fixes: #16586
2020-05-15 17:46:51 +03:00
Brad King
eb93b50be9 Merge topic 'source_file_scopes'
3d4b70ea64 set_source_files_properties: Allow specification of directory scope

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4661
2020-05-15 09:58:03 -04:00
Kitware Robot
5208b8c853 CMake Nightly Date Stamp 2020-05-15 00:01:17 -04:00
Alexandru Croitor
3d4b70ea64 set_source_files_properties: Allow specification of directory scope
Both set_source_files_properties() and set_property(SOURCE) now accept
two new optional arguments: DIRECTORY and TARGET_DIRECTORY.

The DIRECTORY option takes a list of relative or absolute paths
pointing to processed source directories (add_subdirectory was
already called on them).

These paths specify directory scopes where the source file properties
will be set. Previously the scope was always the currently processed
source directory.

Similarly TARGET_DIRECTORY takes a list of targets, whose source
directories will be used as the list of scopes where to set the
source file properties.

get_property() and get_source_file_property() also get the same
new arguments, except only one value can be specified instead
of a list.

Fixes: #20128
2020-05-14 16:31:22 +02:00
Brad King
4d9ef146f4 Merge topic 'update-kwsys'
833ae0a63b Merge branch 'upstream-KWSys' into update-kwsys
3674f6a470 KWSys 2020-05-13 (d4da6980)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4743
2020-05-14 08:07:39 -04:00
Brad King
73be779091 Merge topic 'cmake_command_preserve_args'
549599bf32 cmake_command: Preserve arguments to INVOKE function

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4741
2020-05-14 07:54:11 -04:00
Kitware Robot
1777ee9084 CMake Nightly Date Stamp 2020-05-14 00:01:11 -04:00
Brad King
3a82b3f534 Merge topic 'interface-sources-multi-config'
6c5d4522bc INTERFACE_SOURCES: Fix per-config link libs on multi-config generators
8daa140c6a cmGeneratorTarget: Factor evaluated target prop entries into struct
fcd1a1a920 cmGeneratorTarget: Track when the set of link libs is config-dependent

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4740
2020-05-13 12:14:09 -04:00
Brad King
833ae0a63b Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2020-05-13 (d4da6980)
2020-05-13 07:08:22 -04:00
Kitware Robot
ad11526dc4 CMake Nightly Date Stamp 2020-05-13 00:01:10 -04:00
Cristian Adam
549599bf32 cmake_command: Preserve arguments to INVOKE function
Fixes: #20630
2020-05-12 22:25:29 +02:00
Brad King
6c5d4522bc INTERFACE_SOURCES: Fix per-config link libs on multi-config generators
In multi-config generators we memoize the computed set of source files
for a target to avoid repeating the computation when the set does not
depend on the configuration.  We already track whether generator
expressions in `SOURCES` or `INTERFACE_SOURCES` reference the
configuration (`$<CONFIG:...>`).  However, we previously forgot to track
whether the set of libraries whose `INTERFACE_SOURCES` are considered
depends on the configuration.  This caused multi-config generators to
use the first configuration's set of sources for all configurations
in cases such as

    target_link_libraries(tgt PRIVATE $<$<CONFIG:Debug>:iface_debug>)

where the `iface_debug` target has `INTERFACE_SOURCES`.

Fix this by also tracking config-dependence of the list of libraries for
evaluation of the list of source files.

Fixes: #20683
2020-05-12 12:44:32 -04:00
Brad King
8daa140c6a cmGeneratorTarget: Factor evaluated target prop entries into struct
This will allow storing more than just the list of entries itself.
2020-05-12 12:37:27 -04:00
Brad King
fcd1a1a920 cmGeneratorTarget: Track when the set of link libs is config-dependent
Report in `cmLinkImplementationLibraries` and `cmLinkInterfaceLibraries`
whether the list of libraries depends on a genex referencing the
configuration.  We already track whether a genex references the head
target.
2020-05-12 12:37:13 -04:00
Brad King
1fb0cb1dd3 Merge topic 'refactor_cmSetPropertiesCommands'
300bf4e94f set_*_properties: simplify and shorten implementations

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4728
2020-05-12 07:00:15 -04:00
Tushar Maheshwari
300bf4e94f set_*_properties: simplify and shorten implementations
Optimize argument copies and range traversal.
Inline the single use file static functions.
2020-05-12 06:59:00 -04:00
Brad King
eb2a554b12 Merge topic 'vs-pch-compile-opts'
6b2fb4ffd2 VS: Fix using PCH from source with COMPILE_OPTIONS

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4734
2020-05-12 06:53:41 -04:00
Kitware Robot
327e79c359 CMake Nightly Date Stamp 2020-05-12 00:01:17 -04:00
Brad King
6b2fb4ffd2 VS: Fix using PCH from source with COMPILE_OPTIONS
If a source file gets per-source flags from both PCH and custom
`COMPILE_OPTIONS`, combine them correctly.

Fixes: #20694, #20456
2020-05-11 11:58:41 -04:00
Brad King
d4b1d3d4f0 Merge topic 'source_group_forward_slashes'
faf44a8cdb source_group: Support forward slashes in group hierarchy

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4727
2020-05-11 10:14:24 -04:00
Brad King
cee7eb8b3a Merge topic 'unity_explicit_groups'
9f4eb352fe Unity Builds: Support explicit specification of sources to groups
b00585adcc Unity: Refactor implementation to make it easier to extend

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4716
2020-05-11 10:08:12 -04:00
Kitware Robot
c2460c0e63 CMake Nightly Date Stamp 2020-05-11 00:01:15 -04:00
Craig Scott
faf44a8cdb source_group: Support forward slashes in group hierarchy
Fixes: #18076
2020-05-11 08:15:25 +10:00
Kitware Robot
edbbd67461 CMake Nightly Date Stamp 2020-05-10 00:01:10 -04:00
Kitware Robot
d59e65ecc0 CMake Nightly Date Stamp 2020-05-09 00:01:18 -04:00
Brad King
171bf5fa92 Merge topic 'third-parties-layout'
2faa3f6c55 Refactoring: Third-parties public headers are under cm3p prefix
75e87e3db4 bootstrap: update list of problematic files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4705
2020-05-08 08:18:17 -04:00
Brad King
195090f9f0 Merge topic 'pch-reuse-multi'
a2ee941aba Merge branch 'backport-pch-reuse-multi' into pch-reuse-multi
605d6c65c9 PCH: Fix REUSE_FROM in multi-config generators
7a1c7736cb PCH: Fix REUSE_FROM in multi-config generators

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4717
2020-05-08 08:03:44 -04:00
Kitware Robot
b9350813f3 CMake Nightly Date Stamp 2020-05-08 00:01:13 -04:00
Robert Maynard
9f4eb352fe Unity Builds: Support explicit specification of sources to groups
Instead of having CMake determine which files should go into each
unity file, the user can now use explicitly state the mapping.
2020-05-07 11:13:34 -04:00
Andreas Schönle
605d6c65c9 PCH: Fix REUSE_FROM in multi-config generators
Since commit a55df20499 (Multi-Ninja: Add precompile headers support,
2020-01-10, v3.17.0-rc1~136^2) the re-used PCH file object is added
once for each configuration to flags used for all configurations.
Put it in the flags for only the corresponding configuration instead.

Fixes: #20680
2020-05-07 09:58:44 -04:00
Craig Scott
b743ffbfa2 Merge topic 'script-mode-and-arbitrary-args'
e4f1b301fe cmake: Allow arbitrary args passed to CMake script

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4707
2020-05-07 09:09:52 -04:00
Marc Chevrier
2faa3f6c55 Refactoring: Third-parties public headers are under cm3p prefix
Fixes: #20666
2020-05-07 12:06:08 +02:00
Kitware Robot
51d82407fc CMake Nightly Date Stamp 2020-05-07 00:01:12 -04:00
Robert Maynard
b00585adcc Unity: Refactor implementation to make it easier to extend 2020-05-06 15:56:16 -04:00
Alex Turbov
e4f1b301fe cmake: Allow arbitrary args passed to CMake script 2020-05-06 21:40:36 +10:00
Kitware Robot
00065e2087 CMake Nightly Date Stamp 2020-05-06 00:01:16 -04:00
Brad King
d3d53eefee Merge topic 'remove_cli__symbols'
be75622e49 bindexplib: Do not export symbols from managed code

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4692
2020-05-05 09:07:25 -04:00
Kitware Robot
671daf1998 CMake Nightly Date Stamp 2020-05-05 00:01:15 -04:00
Brad King
8541628e27 Merge topic 'patch-7'
086c20e9a6 OpenWatcom: Enable 16-bit targets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4665
2020-05-04 11:04:28 -04:00
Brad King
aa45f3f25f Merge topic 'gcc8-unused-function'
1b4ab323fd Fix build warnings for unused functions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4697
2020-05-04 11:02:01 -04:00
Markus Mayer
be75622e49 bindexplib: Do not export symbols from managed code
Fixes: #20653
2020-05-04 09:58:09 +02:00
Kitware Robot
4add453f96 CMake Nightly Date Stamp 2020-05-04 00:01:12 -04:00
Kitware Robot
e177e7dbec CMake Nightly Date Stamp 2020-05-03 00:01:12 -04:00
Kitware Robot
ef5409100d CMake Nightly Date Stamp 2020-05-02 00:01:14 -04:00
Brad King
9026ef003d Merge topic 'cpack-deb-windows-newline'
3ffd2741c1 CPack: Fix newline output in .deb generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4695
2020-05-01 08:32:34 -04:00
Brad King
0b08c1279c Merge topic 'cmprop-state'
e267c3fddf cmState::GetInitializedCacheValue: return cmProp

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4696
2020-05-01 08:31:32 -04:00
Brad King
255c95163a Merge topic 'stdstring-getsafeprop'
53675adbcf GetSafeProperty: return std::string const&

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4683
2020-05-01 08:30:20 -04:00
Brad King
68a59ab288 Merge topic 'stl-support'
8d4a9ee398 Refactoring: rename "cm_static_string_view.hxx" as <cmext/string_view>

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4689
2020-05-01 08:27:37 -04:00
Brad King
e776ff0582 Merge topic 'cm_cxx_features-icpc-10121'
231637eae2 cm_cxx_features: Filter out 'icpc: command line warning #10121'

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4698
2020-05-01 08:24:21 -04:00
Wouter Klouwen
1b4ab323fd Fix build warnings for unused functions
This commit addresses two sources of build errors when using the warning
flag -Werror=unused-function for GCC in the default compiler flags.

The affected functions are not used when building in bootstrap
mode and therefore should be ifdefed out.

No functional changes.
2020-05-01 12:54:21 +01:00