Commit Graph

50444 Commits

Author SHA1 Message Date
Robert Maynard 72f6b4bfbe Modules: Rename Internal/CMake{CheckCompiler => TryCompilerOrLinker}Flag
Rename the `CheckPIESupported` helper functions so that they
don't clobber other internal functions. Also rename them to
document they can't be unified with `CheckCompilerFlag`.

Fixes: #21497
2020-11-25 11:06:15 -05:00
Brad King 9e83e77129 Merge topic 'ci-xcode-12.2' into release-3.19
5213328008 gitlab-ci: update macOS jobs to use Xcode 12.2
928ca50b6f Tests: Teach RunCMake to ignore Xcode install_name_tool signature warnings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5534
2020-11-25 08:38:56 -05:00
Brad King 90648f205e Merge topic 'test-java-default' into release-3.19
1af2d1d0ea Tests: Add CMake_TEST_Java option to control Java tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5532
2020-11-25 08:38:06 -05:00
Brad King 37add87632 Merge topic 'cuda_detect_vs_codegen' into release-3.19
20807a1882 CUDA: Fix user-set architectures during detection with Visual Studio

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5531
2020-11-25 08:35:08 -05:00
Raul Tambre 20807a1882 CUDA: Fix user-set architectures during detection with Visual Studio
If the user specifies CMAKE_CUDA_ARCHITECTURES we use those during detection
and error out if they don't work.
For Visual Studio a dummy project file is used instead of invoking the compiler
directly. NVCC would thus use its default and we'd fail if
CMAKE_CUDA_ARCHITECTURES was anything other than NVCC's default.

Use the necessary project file variable in CMakeDetermineCompilerId.cmake to
match other generators.

Fixes #21492.
2020-11-25 08:27:40 -05:00
Brad King 5213328008 gitlab-ci: update macOS jobs to use Xcode 12.2 2020-11-24 14:36:20 -05:00
Brad King 928ca50b6f Tests: Teach RunCMake to ignore Xcode install_name_tool signature warnings
The `install_name_tool` may warn:

    install_name_tool: warning: changes being made to the file will
    invalidate the code signature in: ...

Teach RunCMake to drop such incidental lines before matching against
expected output.
2020-11-24 14:33:59 -05:00
Brad King 1af2d1d0ea Tests: Add CMake_TEST_Java option to control Java tests 2020-11-24 13:29:30 -05:00
Brad King 64fb825438 CMake 3.19.1 v3.19.1 2020-11-24 08:50:26 -05:00
Brad King 1f1d705154 Merge topic 'policy-cmp0111-iface' into release-3.19
54ef732b0c cmVisualStudio10TargetGenerator: Avoid GetFullPath on INTERFACE library
f06f4b517c cmTarget: Do not enforce CMP0111 on imported INTERFACE libraries
43c95df8fb Tests: Match RunCMake.CMP0111 stderr more strictly

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5530
2020-11-24 08:43:22 -05:00
Brad King aeb0e40111 Merge topic 'fix-find-make-program' into release-3.19
ef91fb02f3 cmGlobalGenerator: FindMakeProgram() at a generator-specific time

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Frank Dana <ferdnyc@gmail.com>
Merge-request: !5529
2020-11-24 08:42:32 -05:00
Brad King 6b4bb3bf7f Merge topic 'xcode-cc-work-dir' into release-3.19
36921d2d23 Xcode: Fix custom command work-dir placeholders in "new build system"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5527
2020-11-24 08:41:23 -05:00
Brad King 2ca9016376 Merge topic 'cmFileTime-fix-overflow' into release-3.19
b4c994f69c cmFileTime: Fix overflow on time computation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5526
2020-11-24 08:40:08 -05:00
Brad King 54ef732b0c cmVisualStudio10TargetGenerator: Avoid GetFullPath on INTERFACE library
Issue: #21470
2020-11-23 15:57:05 -05:00
Brad King f06f4b517c cmTarget: Do not enforce CMP0111 on imported INTERFACE libraries
Fix logic added by commit 359c500a24 (cmTarget: Raise error if imported
target location is not set, 2020-08-08, v3.19.0-rc1~273^2) to exclude
INTERFACE libraries from the policy.  They have no location.

Fixes: #21470
2020-11-23 15:56:28 -05:00
Brad King 43c95df8fb Tests: Match RunCMake.CMP0111 stderr more strictly 2020-11-23 15:50:58 -05:00
Kyle Edwards ef91fb02f3 cmGlobalGenerator: FindMakeProgram() at a generator-specific time
d5b5c192 moved FindMakeProgram() to an earlier time, which resulted
in CMAKE_MAKE_PROGRAM not being read from the toolchain file. Change
it to only call FindMakeProgram() early in the specific cases of
Visual Studio and Xcode, and restore the old behavior for all other
generators.

Fixes: #21486
2020-11-23 14:20:08 -05:00
Brad King d1b6879ece Merge topic 'ctest_custom_versions' into release-3.19
6e7625989c Help: Fix `.. versionadded` directives for CTEST_CUSTOM_* variables

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5524
2020-11-23 11:24:22 -05:00
Brad King 92d21eae65 Merge topic 'cuda_11' into release-3.19
046e454fdd CUDA: Error if can't determine toolkit library root
440dc98b07 CUDA: Clang CUDA 11.1 support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5525
2020-11-23 11:23:02 -05:00
Brad King 20bb6f24d1 Merge topic 'FindGTest-revert-no-release' into release-3.19
64dc4efc51 FindGTest: Revert "Allow either "Debug" or "Release" configurations."

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5520
2020-11-23 11:21:53 -05:00
Brad King ed049d1678 Merge topic 'fix-compile-db-crash' into release-3.19
67e2130c96 Makefiles: Fix CMAKE_EXPORT_COMPILE_COMMANDS crash with custom compile rule

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5521
2020-11-23 11:19:58 -05:00
Brad King 36921d2d23 Xcode: Fix custom command work-dir placeholders in "new build system"
The placeholders for `CONFIGURATION` and `EFFECTIVE_PLATFORM_NAME` need
to be handled in the `WORKING_DIRECTORY` of custom commands just as we
already do for the `COMMAND`.

Fixes: #21483
2020-11-23 10:24:13 -05:00
Marc Chevrier b4c994f69c cmFileTime: Fix overflow on time computation
On Windows, time starting point is Januray, 1st of 1601.
So computing number of nanoseconds from this date exceeds 64bit
capabilities.
2020-11-23 15:03:25 +01:00
Raul Tambre 046e454fdd CUDA: Error if can't determine toolkit library root
Finding the toolkit is required for Clang and is assumed to have been correctly
found by FindCUDAToolkit if the CUDA language is found.
Error out early with an useful error instead of failing later on due to the
path not being set.
2020-11-22 11:30:01 +02:00
Raul Tambre 440dc98b07 CUDA: Clang CUDA 11.1 support
version.txt is gone from CUDA 11.1 installations, but the rest is the same.
Instead of looking for version.txt look for <CUDA path>/nvvm/libdevice, which
is the main thing that Clang requires (though it also checks for the existence
of bin and include).

Fixes #21353.
2020-11-22 11:30:01 +02:00
Nikita Nemkin 6e7625989c Help: Fix .. versionadded directives for CTEST_CUSTOM_* variables
CTEST_CUSTOM_* variables predate 3.0, but the docs were only added in 3.4.

Issue: #19715
2020-11-22 03:15:45 +05:00
Brad King 4549027a09 Merge topic 'revert-explicit-LANGUAGE-flag' into release-3.19
30aa715fac Revert "specify language flag when source LANGUAGE property is set"

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5519
2020-11-20 10:05:11 -05:00
Brad King 67e2130c96 Makefiles: Fix CMAKE_EXPORT_COMPILE_COMMANDS crash with custom compile rule
Fixes: #21471
2020-11-20 09:45:14 -05:00
Brad King 64dc4efc51 FindGTest: Revert "Allow either "Debug" or "Release" configurations."
Revert commit a064b18f85 (FindGTest: Allow either "Debug" or "Release"
configurations., 2020-06-29, v3.19.0-rc1~584^2).  If both configurations
are found then `GTEST_LIBRARY` is populated in a way that breaks
`__gtest_determine_library_type`, and the imported target is not
created correctly.

Fixes: #21473
Issue: #17799
2020-11-20 09:31:54 -05:00
Brad King 30aa715fac Revert "specify language flag when source LANGUAGE property is set"
Revert commit 74b1c9fc8e (Explicitly specify language flag when source
LANGUAGE property is set, 2020-06-01, v3.19.0-rc1~722^2) and the lookup
tables from its two immediate ancestors.  The purpose of that change was
to convert an explicit `LANGUAGE` source file property into an explicit
language specification compiler flag like `-x c`.  This seems reasonable
since the property is documented as meaning "indicate what programming
language the source file is".  It is also needed to help compilers deal
with non-standard source file extensions they don't recognize.

However, some projects have been setting `LANGUAGE C` on `.S` assembler
source files to mean "use the C compiler".  Passing `-x c` for them
breaks the build because the `.S` sources are not written in C.  These
projects should be updated to use `enable_language(ASM)`, for which
CMake often chooses the C compiler as the assembler when using
toolchains that support it (which would have to be the case for projects
using the approach).

Revert the change for now to preserve the old behavior for such projects.
We can re-introduce it with a policy in a future version of CMake.

Fixes: #21469
Issue: #14516, #20716
2020-11-19 17:06:03 -05:00
Brad King 1d1d78bbe1 Merge topic 'ci-updates' into release-3.19
ec5223666b gitlab-ci: update macOS jobs to use Xcode 12.0
fa0c02e9df ci: update to use CMake 3.19.0

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5516
2020-11-18 13:36:01 -05:00
Brad King ec5223666b gitlab-ci: update macOS jobs to use Xcode 12.0 2020-11-18 11:49:55 -05:00
Brad King fa0c02e9df ci: update to use CMake 3.19.0 2020-11-18 11:48:16 -05:00
Brad King 222bf361e4 CMake 3.19.0 v3.19.0 2020-11-18 07:46:23 -05:00
Brad King b9239c08ed Merge branch 'release-3.18' into release-3.19 2020-11-18 07:40:58 -05:00
Brad King 513fff7508 Merge topic 'rename_cuda_memcheck' into release-3.19
fea49b2df0 CTest: Rename CudaMemcheck to CudaSanitizer

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5514
2020-11-18 07:29:54 -05:00
Brad King 1a059d91af CMake 3.18.5 v3.18.5 2020-11-18 06:34:00 -05:00
Brad King ca9a182d23 Merge topic 'gitlab-ci-msvc-14.28' into release-3.19
a282714be9 gitlab-ci: Update Windows builds to MSVC 19.28

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5513
2020-11-17 16:40:43 -05:00
Tobias Ribizel fea49b2df0 CTest: Rename CudaMemcheck to CudaSanitizer 2020-11-17 21:06:30 +01:00
Brad King a282714be9 gitlab-ci: Update Windows builds to MSVC 19.28 2020-11-17 13:34:51 -05:00
Brad King c9764c902d Merge topic 'msvc-14.28' into release-3.19
c862e15418 Suppress MSVC 14.28 C5105 warning triggered by Windows SDK

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5512
2020-11-17 13:10:32 -05:00
Brad King c862e15418 Suppress MSVC 14.28 C5105 warning triggered by Windows SDK
Issue: #21446
2020-11-17 11:50:50 -05:00
Craig Scott c22f434c83 Merge topic 'xcode-clean-lib-paths' into release-3.19
b1ef2fffe7 Xcode: Clean library paths to avoid linker duplicate symbol definitions

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5511
2020-11-16 14:23:52 -05:00
Brad King 87ef956865 Merge topic 'ci-fedora33' into release-3.19
6e35919e15 gitlab-ci: use Fedora 33 to build sources
061f7d5ca3 gitlab-ci: update Linux CI to use Fedora 33
bd62d2ecf3 ci: update to Fedora 33 for Linux builds
ada3170625 ci: install gmock in the Fedora 31 image
86f196f634 Tests/FindBoost/TestPython: support finding 3.8 and 3.9
6a83417908 clang-tidy: ignore new warnings from newer versions
d2b648ec4c clang-tidy: ignore `misc-no-recursion`

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5504
2020-11-16 11:16:12 -05:00
Gusts Kaksis b1ef2fffe7 Xcode: Clean library paths to avoid linker duplicate symbol definitions 2020-11-16 07:14:57 +11:00
Brad King c35c4ae85c Merge topic 'qtifw-archivegen' into release-3.19
5ab75dd7dd CPack/IFW: Locate the archivegen utility

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5503
2020-11-13 09:45:32 -05:00
Brad King 140e06e344 Merge topic 'qtifw-4.0' into release-3.19
63ae96a317 CPack/IFW: Add support for QtIFW 4.0

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5502
2020-11-13 09:44:27 -05:00
Brad King ddd6979aab Merge topic 'doc-cstd' into release-3.19
48645cabe3 Help: MSVC now has C standard level flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5500
2020-11-13 09:43:07 -05:00
Brad King d8b50fd185 Merge topic 'xcode-compiler-id-path' into release-3.19
bcbae3f71e Xcode: Extract CMAKE_<LANG>_COMPILER from compiler id with multiple archs
a070565a66 Merge branch 'FindRuby-restore-VENDORLIB_DIR' into release-3.18
3969c86b51 Merge branch 'cuda_vs_skip_computation' into release-3.18

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5506
2020-11-13 09:41:25 -05:00
Brad King 18f152e9c0 Merge topic 'xcode-compiler-id-arch' into release-3.19
98849039cc Xcode: Default to arm64 arch on Apple Silicon hosts during compiler id

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5505
2020-11-13 09:40:09 -05:00