Commit Graph

11190 Commits

Author SHA1 Message Date
Brad King
da7ad7997e WriteCompilerDetectionHeader: Add policy to remove module
See justification in the policy documentation.

Closes: #17842
2020-12-05 21:57:08 +11:00
Brad King
bb4d70c165 Merge topic 'GoogleTest-disabled-underscore'
dff56b0b97 GoogleTest: Match the full 'DISABLED_' prefix to disable tests

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Matthew Woehlke <matthew.woehlke@kitware.com>
Merge-request: !5567
2020-12-04 08:30:40 -05:00
Brad King
76685b985d Merge topic 'explicit-LANGUAGE-flag'
48aac247e9 Compile with explicit language flag when source LANGUAGE property is set
2e67a75acd Embarcadero: Simplify addition of -P flag for C++

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5522
2020-12-04 08:27:55 -05:00
Brad King
7068189657 Merge topic 'compiler-id-extra-text'
f25ac39dee CMakeDetermineCompilerId: Tolerate stray text around INFO strings
5cb66f17ca CMakeDetermineCompilerId: Add whitespace to clarify logic
1ee99104f7 CMakeDetermineCompilerId: Filter IAR-AVR format INFO strings earlier

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5570
2020-12-04 08:27:02 -05:00
Brad King
f25ac39dee CMakeDetermineCompilerId: Tolerate stray text around INFO strings
When cross-compiling with Xcode our compiler id test binary may be
compiled with multiple architectures.  The INFO strings should be
identical and therefore de-duplicated.  However, this can be broken by
stray text that happens to sit immediately before or after an INFO
string.  Filter out such text so we can match clean INFO strings.

Fixes: #21526
2020-12-03 14:37:21 -05:00
Brad King
5cb66f17ca CMakeDetermineCompilerId: Add whitespace to clarify logic
Also initialize a variable closer to its use.
2020-12-03 14:37:08 -05:00
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
dff56b0b97 GoogleTest: Match the full 'DISABLED_' prefix to disable tests
Test names that start in `DISABLED` not followed by an underscore are
not disabled.

Fixes: #21543
2020-12-03 09:33:34 -05:00
Brad King
8bdde2b161 Merge topic 'nvidia-cuda-ninja-deps'
8981e3e7cc NVIDIA-CUDA: rely on new capabilities for deps generation

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5566
2020-12-03 08:57:16 -05:00
Brad King
0eead931a3 Merge topic 'versionadded'
5000f93a91 Help: Fix grammar in `.. versionadded` directives
8fea95319b Help: Add `.. versionadded` directives to module docs
8634561dca Help: Improve formatting for FindBoost and FindCUDA
ea59b0cd34 Help: Fix version note for CMAKE_PROJECT_<PROJECT-NAME>_INCLUDE
05c3060b10 Help: Fix cmake_parse_arguments version note
dafcef8b50 Help: Improve styling for versionadded/deprecated directives
6ae216daef Tests: Make RunCMake.CMP0106 expected output robust to line number changes

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5560
2020-12-03 08:49:25 -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
a64f5aeea5 Merge topic 'llvm-rc-preprocess-as-c'
bdfa5ac7f6 Merge branch 'master' into llvm-rc-preprocess-as-c
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
48aac247e9 Compile with explicit language flag when source LANGUAGE property is set
This change was originally made by commit 74b1c9fc8e (Explicitly specify
language flag when source LANGUAGE property is set, 2020-06-01,
v3.19.0-rc1~722^2), but it was reverted by commit 30aa715fac (Revert
"specify language flag when source LANGUAGE property is set",
2020-11-19) to restore compatibility with pre-3.19 behavior.

Implement the change again, but add policy CMP0119 to make this change
while preserving compatibility with existing projects.

Note that the `Compiler/{Clang,Intel,MSVC}-CXX` modules do not need to
specify `-TP` for their MSVC-like variants because we already use the
flag in `CMAKE_CXX_COMPILE_OBJECT`.  Similarly for `Compiler/XL-CXX`
and `Platform/Windows-Embarcadero`.

Note also that this does not seem possible to implement for XL C.
Even with `-qsourcetype=c`, `xlc` complains about an unknown suffix:
`1501-218 (W) file /.../AltExtC.zzz contains an incorrect file suffix`.
It returns non-zero even with `-qsuppress=1501-218`.

Co-Author: Robert Maynard <robert.maynard@kitware.com>
Fixes: #14516, #20716
2020-12-02 11:39:11 -05:00
Marc Chevrier
8981e3e7cc NVIDIA-CUDA: rely on new capabilities for deps generation 2020-12-02 17:31:02 +01:00
Nikita Nemkin
8fea95319b Help: Add .. versionadded directives to module docs
Issue: #19715
2020-12-02 21:00:30 +05:00
Nikita Nemkin
8634561dca Help: Improve formatting for FindBoost and FindCUDA
* Split large literal blocks into definitions lists.
* Add section headers.
* Add links to standard commands and variables.
* Use inline literals liberally.
* Enable code highlighting in literal blocks.
* Format command signatures according to modern conventions.
2020-12-02 21:00:29 +05:00
Brad King
2e67a75acd Embarcadero: Simplify addition of -P flag for C++ 2020-12-02 10:19:16 -05:00
Brad King
9e76ad9ccd Merge topic 'ninja-deps-updates'
f8d8faff8d Ninja Generators: Homogenize configuration with Makefiles

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5557
2020-12-02 09:29:16 -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
3613b90726 Merge topic 'FindHDF5-hdf5hl_fortran-variable'
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
ed958ba685 Merge topic 'ti-c-only-standard'
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
5f96bc9aff Merge topic 'cray-compiler-detection'
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
bdfa5ac7f6 Merge branch 'master' into llvm-rc-preprocess-as-c 2020-12-02 08:21:12 -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
Marc Chevrier
f8d8faff8d Ninja Generators: Homogenize configuration with Makefiles
* Use same configuration variables to configure dependencies
* Abstract Ninja deps format from compiler one
2020-12-01 15:50:01 +01:00
Brad King
628d7ef672 Merge topic 'cuda_env_archs'
c57541d874 CUDA: Fix tests with CUDAARCHS set
c4ae9384ff CUDA: Initialize CMAKE_CUDA_ARCHITECTURES using $ENV{CUDAARCHS}

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5533
2020-12-01 09:37:07 -05:00
Brad King
29d27f67fd Merge topic 'Help-FindPython-add-version-information'
ee6f37d606 Help: FindPython: add version information

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5554
2020-12-01 09:34:34 -05:00
Brad King
644f190abb Merge topic 'windows-clang-LINKER-prefix'
9ac9876757 Clang on Windows: 'LINKER:' prefix must be honored

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5551
2020-12-01 09:32:08 -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
Marc Chevrier
ee6f37d606 Help: FindPython: add version information 2020-12-01 11:53:30 +01:00
Brad King
a24a4e18af Merge topic 'makefiles-compiler-deps-optims'
2c71d051fa Makefiles Generators: use compiler for dependencies generation
afd0f6785d Refactoring: Abstract Makefile line continuation format
b6068ce407 Refactoring: enhance include file filtering
3401403f69 Refactoring: Introduce place-holder for dependency target.
a97c41bf8b Refactoring: Makefiles Generators: Add support for various depends scanners

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Brad King <brad.king@kitware.com>
Merge-request: !5528
2020-11-30 13:26:53 -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
0a9f19c0ea Merge topic 'correct_check_compiler_flag_regression'
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
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
Brad King
b13961fb0f Merge topic 'check-lang-conditions'
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
Raul Tambre
c4ae9384ff CUDA: Initialize CMAKE_CUDA_ARCHITECTURES using $ENV{CUDAARCHS}
NVCC's default architecture may be newer than the one supported by the
machine's GPU.
In such cases it's useful to have an environment variable for initializing
CMAKE_CUDA_ARCHITECTURES to avoid specifying it for every invocation.
2020-11-30 17:57:11 +02:00
Marc Chevrier
9ac9876757 Clang on Windows: 'LINKER:' prefix must be honored
Fixes: #21094
2020-11-30 15:31:45 +01:00
Marc Chevrier
2c71d051fa Makefiles Generators: use compiler for dependencies generation
Each source compilation generates a dependencies file. These dependencies
files are consolidated in one file per target. This consolidation is done
as part of command 'cmake -E cmake_depends` launched before evaluation of
makefile dependency graph.

The consolidation uses the same approach as `CMake` dependencies management.

Fixes: #21321
2020-11-29 15:25:42 +01:00
Craig Scott
7fb0a78ab1 Merge topic 'ctest-less-findy'
705e31a31b CTest: only look for update executables when needed

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5542
2020-11-28 15:35:12 -05:00
Marc Chevrier
3401403f69 Refactoring: Introduce place-holder for dependency target.
These changes are in preparation of compiler generated dependencies support
for Makefiles generators

* compiler output and dependency target can be different for Makefiles generators
* resolve inconsistency naming for dependency file place-holder
2020-11-28 16:02:58 +01: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
Marc Chevrier
8ac63eb4b8 Merge topic 'FPHSA-usable-outside-find_package'
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
Seth R Johnson
705e31a31b CTest: only look for update executables when needed 2020-11-26 10:23:56 -05: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