Commit Graph

28893 Commits

Author SHA1 Message Date
Brad King b54280beb7 Merge topic 'cuda-default-runtime'
d8eee80e30 Merge branch 'backport-cuda-default-runtime' into cuda-default-runtime
e55b21e24e CUDA: Compute CMAKE_CUDA_RUNTIME_LIBRARY default from toolchain
1086e930dc CUDA: Propagate CMAKE_CUDA_RUNTIME_LIBRARY state to try_compile
a4ea293153 Help: Correct CMAKE_CUDA_RUNTIME_LIBRARY applicability

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4762
2020-05-22 06:55:37 -04:00
Brad King d8eee80e30 Merge branch 'backport-cuda-default-runtime' into cuda-default-runtime 2020-05-22 06:50:19 -04:00
Kitware Robot 23acffe5dd CMake Nightly Date Stamp 2020-05-22 00:01:13 -04:00
Brad King 9ec09f22ff Merge topic 'multi-ninja-pch-msvc'
f6cb1e646c Multi-Ninja: Fix PCHs for Visual C++

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4771
2020-05-21 11:52:12 -04:00
Brad King 3c5d52579b Merge topic 'cmake_command_invoke_expand_function_name'
aa55587094 cmake_command: Expand INVOKE function name argument

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4750
2020-05-21 11:38:32 -04:00
Kitware Robot 8351a349f7 CMake Nightly Date Stamp 2020-05-21 00:01:14 -04:00
Robert Maynard 1086e930dc CUDA: Propagate CMAKE_CUDA_RUNTIME_LIBRARY state to try_compile 2020-05-20 14:36:55 -04:00
Brad King f60ca6b464 Merge topic 'ccmake-check-width'
3aede31cfc ccmake: Check that getmaxyx result width is non-negative

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4770
2020-05-20 09:12:22 -04:00
Brad King 00d6e41a07 Merge topic 'ctest-log-environment'
a1612af749 CTest: Log environment variables as a test measurement

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4760
2020-05-20 09:11:03 -04:00
Brad King e4b095268b Merge topic 'update-kwsys'
ef215b0851 cmFileCommand: Log cmsys::Glob warnings
ef4d992b54 Merge branch 'upstream-KWSys' into update-kwsys
8fd4c19e1b KWSys 2020-05-18 (146f6b36)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4758
2020-05-20 09:07:50 -04:00
Brad King bceca2fb47 Merge topic 'export-cmake-policy-version-range'
ca24b70d31 Export: Specify a policy range in exported files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4755
2020-05-20 09:06:17 -04:00
Brad King 1174efb6f9 Merge topic 'vs-sln-version' into release-3.17
88ad02f1ec VS: Restore .sln support for VS Version Selector

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4765
2020-05-20 09:03:23 -04:00
Brad King 4dfc7846f4 Merge topic 'vs-sln-version'
88ad02f1ec VS: Restore .sln support for VS Version Selector

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4765
2020-05-20 09:03:23 -04:00
Cristian Adam f6cb1e646c Multi-Ninja: Fix PCHs for Visual C++
Fixes: #20711
2020-05-20 11:20:38 +02:00
Kitware Robot c8fdc54a3b CMake Nightly Date Stamp 2020-05-20 00:01:14 -04:00
Brad King 3aede31cfc ccmake: Check that getmaxyx result width is non-negative
Otherwise GCC 10.1 issues a `-Wstringop-overflow=` diagnostic when
we use the width for indexing.
2020-05-19 15:43:12 -04:00
Cristian Adam aa55587094 cmake_command: Expand INVOKE function name argument
Fixes: #20707
2020-05-19 19:14:10 +02:00
Kyle Edwards a1612af749 CTest: Log environment variables as a test measurement 2020-05-19 10:26:57 -04:00
Brad King 2f3a356ea8 Merge topic 'src-named-for-config'
70c85c1d6f Tests: Add case for source files named with CONFIG genex
3b547e2e4b VS: Simplify logic adding source file C/C++ language flag to MSVC
27ead9d4b7 VS: Compute managed type from an existing configuration
1222327c89 VS: Write custom commands for sources from all configurations
65fe58a4b4 cmVisualStudio10TargetGenerator: Adopt Windows Store and Phone infrastructure
3fa3b7a402 cmGeneratorTarget: Remove default config from Get* methods
d6a88d2158 cmTarget: Replace "perConfig" constructor boolean with enum

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4761
2020-05-19 09:56:48 -04:00
Brad King e14894c4f7 Merge topic 'simplify_cmPropertyDefinitionMap'
6728f0fa85 cmPropertyDefinitionMap: simplify and shorten

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4753
2020-05-19 09:54:39 -04:00
Brad King 80e93984c7 Merge topic 'add_test-special-chars-in-name'
f84af8e270 add_test: Allow special characters in test name

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4754
2020-05-19 09:48:38 -04:00
Dmitry Kalinkin ef215b0851 cmFileCommand: Log cmsys::Glob warnings 2020-05-19 09:42:16 -04:00
Brad King 88ad02f1ec VS: Restore .sln support for VS Version Selector
Since commit 3b51343ea1 (VS: Emit UTF-8 BOM for generated solution files,
2019-08-19, v3.16.0-rc1~237^2) the `.sln` file does not work with the
VS Version Selector.  Add a newline after the BOM to restore support.

Fixes: #20725
2020-05-19 08:24:37 -04:00
Kitware Robot cc79253fa4 CMake Nightly Date Stamp 2020-05-19 00:01:13 -04:00
Craig Scott ca24b70d31 Export: Specify a policy range in exported files
This should reduce policy-related warnings coming from the
generated files, but in a way that doesn't increase the minimum
CMake version for consumers.

Relates: #20561
2020-05-19 08:36:57 +10:00
Brad King 3b547e2e4b VS: Simplify logic adding source file C/C++ language flag to MSVC
Do not add a target-wide language flag.  We need a flag on an individual
source file to explicitly specify the C or C++ language if and only if
the source file extension does not imply it.
2020-05-18 15:34:17 -04:00
Brad King 27ead9d4b7 VS: Compute managed type from an existing configuration
It is not clear how multiple configurations should be handled here, but
using an existing configuration is at least better than the empty
configuration.
2020-05-18 15:34:15 -04:00
Brad King 1222327c89 VS: Write custom commands for sources from all configurations 2020-05-18 15:33:16 -04:00
Brad King 65fe58a4b4 cmVisualStudio10TargetGenerator: Adopt Windows Store and Phone infrastructure
Move support for Resx, Xaml, Certificate, and AppManifest file handling
out of cmGeneratorTarget.
2020-05-18 12:56:56 -04:00
Brad King 3fa3b7a402 cmGeneratorTarget: Remove default config from Get* methods
Ensure all call sites pass an explicit configuration.
2020-05-18 12:56:56 -04:00
Brad King d6a88d2158 cmTarget: Replace "perConfig" constructor boolean with enum 2020-05-18 12:56:55 -04:00
Brad King b246dee7db Merge topic 'cuda-clang'
a653ca9504 Tests: Update CUDA tests to work with Clang
5df21adf46 CUDA: Add support for Clang compiler
dc2eae1f91 FindCUDAToolkit: Factor out discovery code into a separate file
70be10cbf4 CUDA: Remove toolkit include dirs from implicit include dirs only with NVIDIA

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Artem Belevich <tra@google.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Acked-by: Axel Huebl <axel.huebl@plasma.ninja>
Acked-by: friendnick <ikoval67@gmail.com>
Acked-by: Patrik Huber <patrikhuber@gmail.com>
Merge-request: !4442
2020-05-18 12:29:44 -04:00
Brad King ab0a092e13 Merge topic 'fix-ClearSourcesCache'
a9f4f58f0c cmGeneratorTarget: Clear AllConfigSources in ClearSourcesCache

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4751
2020-05-18 12:23:41 -04:00
Brad King 00949be941 Merge topic 'fix-ClearSourcesCache' into release-3.17
a9f4f58f0c cmGeneratorTarget: Clear AllConfigSources in ClearSourcesCache

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4751
2020-05-18 12:23:40 -04:00
Brad King ca699e9d69 Merge topic 'fix-CheckTargetsForMissingSources'
25995b2b30 cmGlobalGenerator: Fix CheckTargetsForMissingSources after refactoring

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4747
2020-05-18 12:20:50 -04:00
Brad King ef4d992b54 Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
  KWSys 2020-05-18 (146f6b36)
2020-05-18 08:51:33 -04:00
Kitware Robot 6c4bfb6e7f CMake Nightly Date Stamp 2020-05-18 00:01:10 -04:00
Deniz Bahadir f84af8e270 add_test: Allow special characters in test name
Fixes: #19391
2020-05-17 10:53:14 +02:00
Kitware Robot deffd54250 CMake Nightly Date Stamp 2020-05-17 00:01:11 -04:00
Kitware Robot 135b5835a4 CMake Nightly Date Stamp 2020-05-16 00:01:17 -04:00
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
Tushar Maheshwari 6728f0fa85 cmPropertyDefinitionMap: simplify and shorten 2020-05-15 18:58:02 +05:30
Brad King a9f4f58f0c cmGeneratorTarget: Clear AllConfigSources in ClearSourcesCache
In commit 40aa6c059c (cmGeneratorTarget: Add method to collect all
sources for all configs, 2017-04-10, v3.9.0-rc1~268^2~5) we forgot to
update `ClearSourcesCache` to also clear `AllConfigSources`.  This leads
to subtle cases where code paths like PCH handling that add sources
during generation break depending on ordering.

Suggested-by: Christian Fersch
Fixes: #20712, #20702
2020-05-15 08:26:43 -04:00
Brad King 25995b2b30 cmGlobalGenerator: Fix CheckTargetsForMissingSources after refactoring
Refactoring in commit 01b2d6ab74 (Modernize: Use ranged for-loops when
possible, 2019-02-07, v3.15.0-rc1~575^2) accidentally changed a loop
condition in this method from "keep iterating if srcs.empty()" to
"stop iterating if srcs.empty()".  Switch it back.

The bug could only manifest in very subtle conditions in a multi-config
generator.  Add one such case to the test suite.

Fixes: #20706
2020-05-15 05:39:25 -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