Commit Graph

50473 Commits

Author SHA1 Message Date
Brad King
1ee99104f7 CMakeDetermineCompilerId: Filter IAR-AVR format INFO strings earlier
Remove the bytes between characters from the entire list at once.
2020-12-03 14:34:04 -05:00
Brad King
6cf88734a5 Merge topic 'llvm-rc-preprocess-as-c' into release-3.19
f7ff0d34f0 llvm-rc: Force C language for the clang gnu frontend

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5564
2020-12-03 08:37:21 -05:00
Brad King
79077df26b Merge topic 'FindHDF5-hdf5hl_fortran-variable' into release-3.19
175beadd4c FindHDF5: support the hdf5hl_fortran-based variable names
adf108441e FindHDF5: improve error messages when a location variable isn't known

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5563
2020-12-02 09:22:52 -05:00
Brad King
859ecbe446 Merge topic 'ti-c-only-standard' into release-3.19
8eeddb1f0a Compiler/TI: Fix C standard flags in C-only project

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5558
2020-12-02 09:21:30 -05:00
Brad King
c14d1f1be5 Merge topic 'cray-compiler-detection' into release-3.19
9ee4a42813 Cray: Fix Cray compiler detection on new platforms

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5561
2020-12-02 09:20:07 -05:00
Brad King
dd1f26e22e Merge topic 'export-namelink' into release-3.19
38bcb5c0a3 export: Do not fail generation for separate namelink only case

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5556
2020-12-02 09:17:50 -05:00
Thomas Bernard
f7ff0d34f0 llvm-rc: Force C language for the clang gnu frontend
When preprocessing the rc file using the clang gnu front end we need to
force the source file type to a c file for the preprocessing to take
place.

Fixes: #21472
2020-12-02 08:19:44 -05:00
Ben Boeckel
175beadd4c FindHDF5: support the hdf5hl_fortran-based variable names
Fixes: #21537
2020-12-01 15:31:47 -05:00
Ben Boeckel
adf108441e FindHDF5: improve error messages when a location variable isn't known 2020-12-01 15:31:21 -05:00
Justin LaPolla
9ee4a42813 Cray: Fix Cray compiler detection on new platforms
Customer reported problems detecting the Cray compiler on their Apollo80
system. We were checking for the __CRAYXC and __CRAYXE predefined
macros. These macros reflect the platform that the compiler is running
on, i.e. Cray XC and Cray XE machines. Naturally, this didn't work on
Apollo80.

This commit uses the official Cray compiler identification macros which
are defined on every platform:

    CCE Version     C Macro     C++ Macro    Fortran Macro
    ============    ========    =========    =============
    version <  9    _CRAYC      _CRAYC       _CRAYFTN
    version >= 9    __cray__    __cray__     _CRAYFTN
2020-12-01 12:20:47 -05:00
Adam Weisi
8eeddb1f0a Compiler/TI: Fix C standard flags in C-only project
Use our compiler architecture variable for C rather than CXX.
2020-12-01 12:14:38 -05:00
Brad King
f264f1d783 Merge topic 'windows-clang-LINKER-prefix' into release-3.19
9ac9876757 Clang on Windows: 'LINKER:' prefix must be honored

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5551
2020-12-01 09:32:07 -05:00
Brad King
b76013b515 Merge topic 'ninja-regen-metadata' into release-3.19
73d1c78bf4 ci: update to use ninja 1.10.2
11f4259362 Ninja: Clean metadata after regen during build on Windows with 1.10.2+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5555
2020-12-01 09:29:11 -05:00
Brad King
9b0c7273e0 Merge topic 'pch-ios-multi-arch-nmc' into release-3.19
35432aabda PCH: Fix compiler errors on iOS multi-arch using Ninja Multi-Config

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5544
2020-12-01 09:26:57 -05:00
Deniz Bahadir
38bcb5c0a3 export: Do not fail generation for separate namelink only case
Update the change from commit 64690f6df0 (export: Do not fail generation
for namelink-only case, 2020-10-09, v3.19.0-rc1~7^2) to also handle
separate namelink-only and namelink-skip calls.

Fixes: #21529
2020-12-01 07:35:17 -05:00
Brad King
73d1c78bf4 ci: update to use ninja 1.10.2 2020-11-30 15:02:10 -05:00
Brad King
11f4259362 Ninja: Clean metadata after regen during build on Windows with 1.10.2+
Ninja 1.10.2 fixes support for `generator = 1` rules that run metadata
update commands during regeneration while a build is running.  Update
the condition added by commit ccaa0bccc4 (Ninja: Do not clean metadata
when re-generating inside a running build, 2020-01-27,
v3.17.0-rc1~73^2) to remove our workaround when Ninja is new enough.

Fixes: #20274
2020-11-30 14:57:48 -05:00
Cristian Adam
35432aabda PCH: Fix compiler errors on iOS multi-arch using Ninja Multi-Config
Fixes: #21401
2020-11-30 13:31:51 -05:00
Brad King
5ef2364053 Merge topic 'correct_check_compiler_flag_regression' into release-3.19
72f6b4bfbe Modules: Rename Internal/CMake{CheckCompiler => TryCompilerOrLinker}Flag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Kumar Gala <kumar.gala@gmail.com>
Merge-request: !5540
2020-11-30 12:37:14 -05:00
Brad King
36c304d17b Merge topic 'enable-extensions-on-qnx' into release-3.19
34f6d76755 QNX: Do not disable compiler extensions for CMake itself

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5537
2020-11-30 12:36:12 -05:00
Brad King
2e1eaf16a7 Merge topic 'check-lang-conditions' into release-3.19
f3d4254b3d Check*: Tolerate variables set with names of languages
01d91ae5f2 Tests: Fix RunCMake.Check* conditions for enabling Fortran

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Robert Maynard <robert.maynard@kitware.com>
Merge-request: !5536
2020-11-30 12:34:31 -05:00
Marc Chevrier
9ac9876757 Clang on Windows: 'LINKER:' prefix must be honored
Fixes: #21094
2020-11-30 15:31:45 +01:00
Craig Scott
419ef63b7b Merge topic 'presets-docs-bug' into release-3.19
ca289abea5 Help: Fix presets typo (longDescription to displayName)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5541
2020-11-29 16:01:59 -05:00
Marc Chevrier
72ede0218d Merge topic 'FPHSA-usable-outside-find_package' into release-3.19
14ecf9c2f6 FPHSA: ensure it can be used outside 'find_package'

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5539
2020-11-28 09:02:54 -05:00
Sam Freed
ca289abea5 Help: Fix presets typo (longDescription to displayName) 2020-11-28 16:32:31 +11:00
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
Marc Chevrier
14ecf9c2f6 FPHSA: ensure it can be used outside 'find_package'
Fixes: #21505
2020-11-25 16:36:12 +01:00
Stephen Kelly
34f6d76755 QNX: Do not disable compiler extensions for CMake itself
The `set(CMAKE_CXX_EXTENSIONS FALSE)` option has the effect of passing
compile option `-std=c++NN` instead of `-std=gnu++NN`.  On some
platforms, the latter form (or the secondary effects that it has, such
as setting _XOPEN_SOURCE) is required.  This typically affects platforms
such as mingw, cygwin and QNX.  The GNU-like compiers default to
`-std=gnu++NN`, which means that users can typically build source code
on those platforms by default.

While the `set(CMAKE_CXX_EXTENSIONS FALSE)` option was set here in
commit f034b0f6 (CMake compilation: do not use compiler extensions,
2020-03-14), the other changes in that commit added `#defines` which
become required in the absense of use of `-std=gnu++NN`.  However, only
platforms regularly tested in the cmake dashboard were ported, as is
reasonable.  That made CMake fail to compile on QNX and perhaps other
platforms which for which no one is submitting regular testing to the
cmake dashboard.

Make the `set(CMAKE_CXX_EXTENSIONS FALSE)` option conditional on non-QNX
to restore the QNX build.

Issue: #21503
2020-11-25 10:17:29 -05:00
Brad King
f3d4254b3d Check*: Tolerate variables set with names of languages
Fix the language checks added by commit 90dead024c (CheckCompilerFlag:
unified way to check compiler flags per language, 2020-09-25,
v3.19.0-rc1~88^2), commit 10ae907de0 (CheckSoureCompiles: Add a unified
way to check if a source compiles, 2020-09-14, v3.19.0-rc1~118^2~1), and
commit 357e2ef429 (CheckSoureRuns: Add a unified way to check if a
source runs, 2020-09-14, v3.19.0-rc1~118^2) to work when variables of
the language names are set.

Fixes: #21500
2020-11-25 09:11:21 -05:00
Brad King
01d91ae5f2 Tests: Fix RunCMake.Check* conditions for enabling Fortran 2020-11-25 08:49:38 -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