Commit Graph

48169 Commits

Author SHA1 Message Date
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 4acf31d681 Merge topic 'compile_opts'
448e2d7a9d Help: Provide cross-references between compiler settings
1f697b3991 Help: COMPILE_OPTIONS: bundle cross refs, add example

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4749
2020-05-18 12:27:31 -04:00
Brad King 9039e1f80d Merge branch 'release-3.16' 2020-05-18 12:26:34 -04:00
Brad King e7b47589b2 Merge branch 'release-3.17' 2020-05-18 12:23:41 -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 31252bd335 Merge topic 'FindOpenSSL-applink'
7b83ca816a FindOpenSSL: add target OpenSSL::applink to support OpenSSL's applink feature

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4737
2020-05-18 12:22:24 -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
Craig Scott 6d9bc2d8cf Merge topic 'find-doxygen-parallel-tests'
cb8f7e3aad FindDoxygen: Prevent tests from interfering with each other

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4756
2020-05-18 08:15:54 -04:00
Kitware Robot 6c4bfb6e7f CMake Nightly Date Stamp 2020-05-18 00:01:10 -04: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
Craig Scott cb8f7e3aad FindDoxygen: Prevent tests from interfering with each other
When doing something like ctest -j8, the FindDoxygen.SimpleTest
test case would execute multiple doxygen sub-tests that then try
to create/write to the same output directory.
2020-05-16 12:20:36 +10:00
Raul Tambre a653ca9504 Tests: Update CUDA tests to work with Clang 2020-05-15 18:12:39 +03:00
Brad King ec1b3992db Merge branch 'release-3.16' 2020-05-15 11:10:07 -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
Raul Tambre dc2eae1f91 FindCUDAToolkit: Factor out discovery code into a separate file
This allows for re-use in other parts of the code, that require the CUDA
toolkit location, but can't or may not want to use the full
`FindCUDAToolkit`.
2020-05-15 17:46:51 +03:00
Brad King 70be10cbf4 CUDA: Remove toolkit include dirs from implicit include dirs only with NVIDIA
The special case added by commit 87df637078 (CUDA: Do not treat CUDA
toolkit include directories as implicit, 2020-02-02, v3.17.0-rc1~31^2)
breaks CMake's protections against changing the compiler's implicit
include directory order.  Do this only for the NVIDIA compiler where it
is needed as a workaround to another problem.  That compiler does not
put the host compiler's implicit include directories in `-I` paths so we
do not detect them as `CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES` anyway.
2020-05-15 17:46:51 +03:00
Brad King 1bdbd4651a Merge branch 'release-3.17' 2020-05-15 10:32:50 -04:00
Brad King 4d85ad8c98 Merge topic 'backport-3.16-FindPkgConfig-isystem' into release-3.17
3719ddd3f3 Help: Add 3.16.7 release note for FindPkgConfig '-isystem' fix

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4752
2020-05-15 10:32:49 -04:00
Brad King ffd41f81c2 Merge topic 'backport-3.16-FindPkgConfig-isystem'
3719ddd3f3 Help: Add 3.16.7 release note for FindPkgConfig '-isystem' fix

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4752
2020-05-15 10:32:49 -04: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
Brad King 36599e2a7a Merge branch 'fix-ClearSourcesCache' into release-3.16
Merge-request: !4751
2020-05-15 09:53:05 -04:00
Brad King 481100ecbc Merge branch 'backport-3.16-FindPkgConfig-isystem' into release-3.16
Merge-request: !4752
2020-05-15 09:48:51 -04:00
Brad King 3719ddd3f3 Help: Add 3.16.7 release note for FindPkgConfig '-isystem' fix
Add a release note for the change in commit 4d446c68d1 (FindPkgConfig:
also handle "-isystem" prefixes for include directories, 2020-04-30).
2020-05-15 09:46:06 -04:00
Brad King e2f61e875f Merge branch 'release-3.17' 2020-05-15 09:44:54 -04:00
Brad King e6175e03c7 Merge branch 'release-3.16' into release-3.17 2020-05-15 09:44:01 -04:00
Brad King 1cc4bc4191 Merge branch 'release-3.16' 2020-05-15 09:16:58 -04:00
Brad King 784e665e1e Merge topic 'objc-env-vars' into release-3.17
13ea190725 Help: Add 3.17.3 release note for Objective C/C++ compiler selection
16bf978e0c Merge branch 'backport-3.16-objc-env-vars' into objc-env-vars
67b9f55d46 Objective C/C++: Honor CC and CXX env vars to select compiler
ab9be6662f Help: Document OBJC and OBJCXX env vars for Objective C/C++ compilers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4746
2020-05-15 09:15:46 -04:00
Brad King 2c2db0fc02 Merge branch 'release-3.17' 2020-05-15 09:15:46 -04:00
Brad King a9559ccba5 Merge topic 'objc-env-vars'
13ea190725 Help: Add 3.17.3 release note for Objective C/C++ compiler selection
16bf978e0c Merge branch 'backport-3.16-objc-env-vars' into objc-env-vars
67b9f55d46 Objective C/C++: Honor CC and CXX env vars to select compiler
ab9be6662f Help: Document OBJC and OBJCXX env vars for Objective C/C++ compilers

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4746
2020-05-15 09:15:46 -04:00
Brad King 96b6bafd17 Merge topic 'FindSquish-add_test'
2137384202 FindSquish: Make squish_add_test work with any Squish version

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4648
2020-05-15 09:14:36 -04:00
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
gnaggnoyil 7b83ca816a FindOpenSSL: add target OpenSSL::applink to support OpenSSL's applink feature
Fixes: #20701
2020-05-15 15:50:10 +08:00
Kitware Robot 5208b8c853 CMake Nightly Date Stamp 2020-05-15 00:01:17 -04:00
Joachim Wuttke (h) 448e2d7a9d Help: Provide cross-references between compiler settings 2020-05-14 22:17:10 +02:00
Joachim Wuttke (h) 1f697b3991 Help: COMPILE_OPTIONS: bundle cross refs, add example 2020-05-14 22:05:30 +02: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 ae9614a22d Merge topic 'tests-Wstrict-prototypes'
4150a18910 Tests: Fix -Wstrict-prototypes warnings in some C sources

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4744
2020-05-14 08:08:45 -04: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
Brad King 165da10680 Merge topic 'squish_windows_ext'
c587b8d026 FindSquish: Fix target app name on windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4742
2020-05-14 07:46:59 -04:00
Brad King b1a3131cc6 Merge branch 'backport-3.16-objc-env-vars' into release-3.16 2020-05-14 07:31:32 -04:00
Brad King 13ea190725 Help: Add 3.17.3 release note for Objective C/C++ compiler selection
Port the 3.16.7 release note for 3.17.3 too.
2020-05-14 07:28:46 -04:00
Brad King 16bf978e0c Merge branch 'backport-3.16-objc-env-vars' into objc-env-vars 2020-05-14 07:27:24 -04:00
Brad King 67b9f55d46 Objective C/C++: Honor CC and CXX env vars to select compiler
If the `OBJC` or `OBJCXX` environment variable is not set to specify an
Objective C or C++ compiler, check `CC` or `CXX` too.

Fixes: #20703
2020-05-14 07:17:48 -04:00
Brad King ab9be6662f Help: Document OBJC and OBJCXX env vars for Objective C/C++ compilers 2020-05-14 07:10:06 -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